embedding self-describing bibtex in dvi or pdf
Mike Marchywka
marchywka at hotmail.com
Wed Oct 30 01:07:33 CET 2019
On Tue, Oct 29, 2019 at 06:07:27PM +0000, Mike Marchywka wrote:
> On Tue, Oct 29, 2019 at 12:23:14PM +0000, Mike Marchywka wrote:
> > On Tue, Oct 29, 2019 at 01:10:16PM +0100, Enrico Schumann wrote:
> > >
[...]
> > >
> > > Package 'hyperref' allows you to write user-defined key-value pairs
> > > into a PDF:
> > >
> > > \documentclass{article}
> > > \usepackage{hyperref}
> > > \hypersetup{
> > > pdfinfo={
> > > x-bib-author = {A. Writer},
> > > x-bib-journal = {Test}
> > > }
> > > }
> > > \begin{document}
> > > Test
> > > \end{document}
> > >
> > > I am not sure, however, if pdfinfo can extract them.
This does sort of work except on quick usage a couple of problems.
If I define this,
\newcommand{\mjmaddbib}[2]{\hypersetup{ pdfinfo={ x-bib-#1 = {#2}}}}
And create a file with stuff like this,
\mjmaddbib{year}{\mjmbibyear}
\mjmaddbib{author1email}{\mjmemail}
\mjmaddbib{contact}{\mjmemail}
\mjmaddbib{author1id}{orcid.org/0000-0001-9237-455X}
\newcommand{\mjmpagesin}{ \input \mjmbasename.last_page }
%\mjmaddbib{pages}{\input{\mjmbasename.last_page}}
\mjmaddbibe{pages}{\mjmpagesin}
\mjmaddbib{filename}{\mjmbasename}
It sort of works except there are spaces in the key name
before numbers and the "input" is ignored in the pages entry
( this seems to work ok to make the human readable bibtex in the document) ,
exiftool -struct -f -x -ee allbib.pdf | grep X-bib
X-bib-title : Adding Citation Features to Shares for e-Commerce, News, and other Non-academic Sites
X-bib-author : Mike J Marchywka
[...]
X-bib-year : 2019
X-bib-author 1email : marchywka at hotmail.com
X-bib-contact : marchywka at hotmail.com
X-bib-author 1id : orcid.org/0000-0001-9237-455X
X-bib-pages : allbib.lastpage
X-bib-filename : allbib
--
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