Skip to content

Commit

Permalink
Merge pull request #1535 from kmuto/pdfmetainfo
Browse files Browse the repository at this point in the history
prefer hypersetup for pdf information
  • Loading branch information
kmuto authored Aug 16, 2020
2 parents de7aefa + fc7124b commit 276b9ac
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 23 deletions.
28 changes: 18 additions & 10 deletions templates/latex/review-jlreq/review-base.sty
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,24 @@
pdfcreator={Re:VIEW \review@reviewversion, with LaTeX}
}
\else
\newcommand*\PDFDocumentInformation[1]{%
\AtBeginShipoutFirst{\special{pdf:docinfo <<#1>>}}}
\@onlypreamble\PDFDocumentInformation
\PDFDocumentInformation{
/Title (\review@booktitlename)
\ifdefined\review@autnames /Author (\review@autnames)\fi
% /Subject ()
% /Keywords (,,)
/Creator (Re:VIEW \review@reviewversion, with LaTeX)
}
\def\recls@tmp{ebook}\ifx\recls@cameraready\recls@tmp
\hypersetup{
pdftitle={\review@booktitlename},
pdfauthor={\ifdefined\review@autnames\review@autnames\fi},
pdfcreator={Re:VIEW \review@reviewversion, with LaTeX}
}
\else
\newcommand*\PDFDocumentInformation[1]{%
\AtBeginShipoutFirst{\special{pdf:docinfo <<#1>>}}}
\@onlypreamble\PDFDocumentInformation
\PDFDocumentInformation{
/Title (\review@booktitlename)
\ifdefined\review@autnames /Author (\review@autnames)\fi
% /Subject ()
% /Keywords (,,)
/Creator (Re:VIEW \review@reviewversion, with LaTeX)
}
\fi
\fi

\RequirePackage{pxrubrica}
Expand Down
36 changes: 23 additions & 13 deletions templates/latex/review-jsbook/review-base.sty
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\ProvidesClass{review-base}[2020/08/14]
\ProvidesClass{review-base}[2020/08/15]
\RequirePackage{ifthen}
\@ifundefined{Hy@Info}{% for jsbook.cls
\RequirePackage[dvipdfmx,bookmarks=true,bookmarksnumbered=true]{hyperref}
Expand Down Expand Up @@ -60,18 +60,6 @@

\newcommand{\parasep}{\vspace*{3zh}}

\newcommand*\PDFDocumentInformation[1]{%
\AtBeginShipoutFirst{\special{pdf:docinfo <<#1>>}}}
\@onlypreamble\PDFDocumentInformation

\PDFDocumentInformation{
/Title (\review@booktitlename)
\ifdefined\review@autnames /Author (\review@autnames)\fi
% /Subject ()
% /Keywords (,,)
/Creator (Re:VIEW \review@reviewversion, with LaTeX)
}

\RequirePackage{pxrubrica}
\@ifpackagelater{pxrubrica}{2017/04/20}{%
\rubysetup{J}}{%
Expand Down Expand Up @@ -378,6 +366,28 @@
\renewcommand{\appendixname}{\reviewappendixname}
\fi

% PDF meta information
\def\recls@tmp{ebook}\ifx\recls@cameraready\recls@tmp
\hypersetup{
pdftitle={\review@booktitlename},
pdfauthor={\ifdefined\review@autnames\review@autnames\fi},
pdfcreator={Re:VIEW \review@reviewversion, with LaTeX}
}
\else
\newcommand*\PDFDocumentInformation[1]{%
\AtBeginShipoutFirst{\special{pdf:docinfo <<#1>>}}}
\@onlypreamble\PDFDocumentInformation

% for non hyperref. escaped character will be displayed funny...
\PDFDocumentInformation{
/Title (\review@booktitlename)
\ifdefined\review@autnames /Author (\review@autnames)\fi
% /Subject ()
% /Keywords (,,)
/Creator (Re:VIEW \review@reviewversion, with LaTeX)
}
\fi

%% maxwidth is the original width if it is less than linewidth
%% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\def\maxwidth{%
Expand Down

0 comments on commit 276b9ac

Please sign in to comment.