problem with a variable in pdfinfo, probably something obvious

Heiko Oberdiek heiko.oberdiek at
Wed Jun 17 20:32:10 CEST 2020


On 2020-06-17 16:05, Mike Marchywka wrote:
> X-bib-pages                     :  covid19.lastpage

> \newcommand{\mjmaddbib}[2]{\hypersetup{ pdfinfo={ x-bib-#1 = {#2}}}\mjmsummabib{#1}{#2}}

> \mjmaddbib{pages}{ \input{\mjmbasename.last_page}}

> %   PAGES =         \{6\},
>    PAGES =         \{ \input{\mjmbasename.last_page} \},

This is a job for package `catchfile`
It provides commands to read the contents of a file
into a macro. Example:


(The purpose of setting \endlinechar to -1 is to remove unnecessary
spaces at the end.)

Yours sincerely

More information about the texhax mailing list.