Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8bdf0bf

Browse files
committed
Fix PDF generation.
The \\ introduced in the \author in boilerplate.tex broke the PDF generation because line breaks are not allowed in the "Document Info" metadata stored in the PDF file. This changes the line break to a ", " (comma-space) in that context.
1 parent 82de71d commit 8bdf0bf

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

Doc/texinputs/howto.cls

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@
4848
%
4949
\renewcommand{\maketitle}{
5050
\py@doHorizontalRule
51-
\@ifundefined{pdfinfo}{}{
51+
\@ifundefined{pdfinfo}{}{{
52+
% This \def is required to deal with multi-line authors; it
53+
% changes \\ to ', ' (comma-space), making it pass muster for
54+
% generating document info in the PDF file.
55+
\def\\{, }
5256
\pdfinfo{
5357
/Author (\@author)
5458
/Title (\@title)
5559
}
56-
}
60+
}}
5761
\begin{flushright}
5862
{\rm\Huge\py@HeaderFamily \@title} \par
5963
{\em\large\py@HeaderFamily \py@release} \par

Doc/texinputs/manual.cls

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,16 @@
6363
\let\footnotesize\small
6464
\let\footnoterule\relax
6565
\py@doHorizontalRule%
66-
\@ifundefined{pdfinfo}{}{
66+
\@ifundefined{pdfinfo}{}{{
67+
% This \def is required to deal with multi-line authors; it
68+
% changes \\ to ', ' (comma-space), making it pass muster for
69+
% generating document info in the PDF file.
70+
\def\\{, }
6771
\pdfinfo{
6872
/Author (\@author)
6973
/Title (\@title)
7074
}
71-
}
75+
}}
7276
\begin{flushright}%
7377
{\rm\Huge\py@HeaderFamily \@title \par}%
7478
{\em\LARGE\py@HeaderFamily \py@release \par}

0 commit comments

Comments
 (0)