problem with a variable in pdfinfo, probably something obvious

Mike Marchywka marchywka at hotmail.com
Wed Jun 17 21:17:51 CEST 2020


On Wed, Jun 17, 2020 at 08:32:10PM +0200, Heiko Oberdiek via texhax wrote:
> Hello,
> 
> 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`
> (https://www.ctan.org/pkg/catchfile).
> It provides commands to read the contents of a file
> into a macro. Example:
> 
> \usepackage{catchfile}
> \CatchFileEdef\mjmpages{\mjmbasename.last_page}{\endlinechar=-1\relax}
> \mjmaddbib{pages}{\mjmpages}
> 
> (The purpose of setting \endlinechar to -1 is to remove unnecessary
> spaces at the end.)

Thanks, that seems to work. I was a little concerned with tlmgr could
not install it but it was already there :) I'll have to look at
how much flexibility there is in creating packages and
maybe I can create one that does most of what these auxillary
files do in my build scripts. 

I guess I can get rid of the bib_crap file :)


> 
> Yours sincerely
>   Heiko

-- 

mike marchywka
306 charles cox
canton GA 30115
USA, Earth 
marchywka at hotmail.com
404-788-1216
ORCID: 0000-0001-9237-455X


More information about the texhax mailing list.