Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Fix typos in PDF document properties. #73

Conversation

jhlegarreta
Copy link
Member

Fix the missing escape character to write accents in the PDF document
properties.

@jhlegarreta
Copy link
Member Author

BTW, does anyone happen to know why the PDF properties are not correctly set for book 2? Just have a look at one of the recent CDash builds, e.g.
#69
and the PDF file to check the properties:
ITKSoftware Guide Book 1 PR 69

thewtex
thewtex previously approved these changes Apr 18, 2018
@thewtex thewtex requested a review from luisibanez April 18, 2018 15:39
@thewtex
Copy link
Member

thewtex commented Apr 18, 2018

Thanks, @jhlegarreta .

I am not familiar with the PDF properies issue.

dzenanz
dzenanz previously approved these changes Apr 18, 2018
Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I currently use Chrome to view PDFs (no dedicated PDF viewer installed), so I can't examine the properties. Which viewer are you using to examine the properties?

@jhlegarreta
Copy link
Member Author

I use Adobe Acrobat Reader DC, but any other (?) allowing you to view the file should be fine. I ignore whether Chrome allows you explore the file properties.

Once downloaded, in Acrobat Reader DC at least, you open the file, then click the File menu, then the Properties section, and there you can examine the title given, the author, subject, keywords, etc.

@dzenanz
Copy link
Member

dzenanz commented Apr 18, 2018

Adobe's reader is authoritative, if this patch fixes the appearance in it it should be merged.

@jhlegarreta jhlegarreta dismissed stale reviews from dzenanz and thewtex via 0cc3713 April 19, 2018 15:23
@jhlegarreta jhlegarreta force-pushed the FixTyposInPDFDocumentProperties branch from 3e7cfe4 to 0cc3713 Compare April 19, 2018 15:23
@jhlegarreta
Copy link
Member Author

I checked the generated PDFs in CDash and unfortunately the properties do not look better:

  • Accents not fixed in book 1 authors field:
Title: ITK Software Guide
Author: Hans Johnson and Luis Iba19 an126 nez and Matthew McCormick and the Insight Software Consortium
Subject: Medical Image Segmentation and Registration Toolkit
Keywords: "Registration,Segmentation,Guide"
  • No changes for book 2:
Title: MultiResImageRegistration1TraceMetric.eps
Author: aghayoor
Subject: gnuplot plot
Keywords: "Registration,Segmentation,Guide"

So

  • There are issues with the encoding. In order to avoid these, I usually do
\usepackage[utf8]{inputenc}

According to this post, this should solve it>

\usepackage[utf8]{inputenc}

\usepackage[
  pdfencoding=auto,% or unicode
  psdextra,
]{hyperref}

But may be it's due the encoding with which the file itself is being saved in the system (?).

  • Book 2 properties are a mystery yet; keywords are OK, the rest is not.

BTW, it looks like you can inspect the properties of a PDF file from the command line via

$ pdfinfo main.pdf

Submitted a new patch set 0cc3713 using the inputenc package to see if that fixes at least the encoding issue. Let's see what CDash says.

@jhlegarreta jhlegarreta force-pushed the FixTyposInPDFDocumentProperties branch from 0cc3713 to 76354a1 Compare April 19, 2018 15:53
@jhlegarreta
Copy link
Member Author

Same result as before; trying adding

\usepackage[
  pdfencoding=auto,% or unicode
  psdextra,
]{hyperref}

in 76354a1.

@dzenanz
Copy link
Member

dzenanz commented Apr 19, 2018

Below is the header from my thesis. My name contains accents and you can check whether they appear correctly in the generated document 😄

\documentclass[a4paper,11pt,final]{book}
\usepackage[american,ngerman]{babel}
%\usepackage[hyphens]{url}
%\makeatletter
%\g@addto@macro{\UrlBreaks}{\UrlOrds}
%\makeatother
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[sc]{mathpazo}
\linespread{1.05}        % Palatino needs more leading (space between lines)
\usepackage{courier}
\usepackage{varioref}
%\vrefwarning
\usepackage{graphicx}
\usepackage[svgnames]{xcolor}
%\usepackage{fixltx2e} %fixltx2e is not required with releases after 2015
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{dcolumn}
\newcolumntype{d}[1]{D{.}{.}{#1} }
\usepackage{fancyhdr}
\usepackage{listings}
\usepackage{amsmath}
\usepackage{rotating}
\usepackage{thesis}
\usepackage{cite}
\usepackage{subfig}
\usepackage[utf8]{inputenc}
\PassOptionsToPackage{hyphens}{url}\usepackage[unicode=true,pagebackref=true]{hyperref}
%\usepackage[pdfborder={0 0 0}]{hyperref}
\hypersetup{
    pdftitle={An Efficient Inflation Method for Segmentation of Medical 3D Images},
    pdfauthor={Dženan Zukić},
    pdfpagelayout={TwoColumnRight},
}
% \usepackage{cleveref}
\usepackage[all]{hypcap}
\usepackage{hyphenat}
\usepackage{microtype}
\usepackage{textcomp}
\usepackage[labelfont=bf,indention=5mm,parskip=1mm]{caption}
\usepackage{parskip}
\setlength{\parindent}{5mm}

\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}
%\setcounter{secnumdepth}{3}
%\setcounter{tocdepth}{3}

\usepackage[section]{placeins}
\usepackage[all]{nowidow}
\pdfsuppresswarningpagegroup=1 %introduced with pdflatex 1.40.15

\begin{document}

@jhlegarreta jhlegarreta force-pushed the FixTyposInPDFDocumentProperties branch from 76354a1 to 8c5883f Compare April 20, 2018 15:33
@jhlegarreta
Copy link
Member Author

jhlegarreta commented Apr 20, 2018

Thanks for the input @dzenanz.

Unfortunately, GitHub does not display the results for 76354a1; and I already committed 8c5883f. However, in a local test I made, the addition

\usepackage[
  pdfencoding=auto,
  psdextra,
]{hyperref}

did not do the trick.

However, I think I found a workaround 😄. This post suggested using the hypersetup environment for the PDF file properties instead of setting them in the usepackage importation step.

And voilà, it worked in a small document I made with the ITK SWG properties. Cool !!

I also tested that $ pdfinfo whateverdocument.pdf does show the PDF file properties.

Let's see what CDash say to 8c5883f.

Now, we may need more time or another topic for the book 2 properties mystery.

Fix the missing escape character to write accents in the PDF document
properties.
Copy link
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, Jon!

@jhlegarreta
Copy link
Member Author

@thewtex thanks for the review ! @dzenanz thanks for all the comments and also helping find the solution !

I've checked that the PDF properties are fixed for Book 1; the properties of Book 2 remain unchanged; I'll open an issue, have a look at it and hopefully propose a fix in another topic to push things forward.

Merging.

@jhlegarreta jhlegarreta merged commit ab408e3 into InsightSoftwareConsortium:master Apr 21, 2018
@jhlegarreta jhlegarreta deleted the FixTyposInPDFDocumentProperties branch May 6, 2018 10:58
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants