[pdftex] \pdfannot
Michael Massmann
michael.massmann at uni-bonn.de
Sun Dec 1 19:39:40 CET 2002
Dear all,
I am trying to create text notes using the \pdfannot command in pdftex.
Inserting
\marginpar{\pdfannot {/Subtype /Text /C [1 1 0] /T (This is a test title)
/Contents (These are test contents)}}
works fine apart from the curious fact that the Note Properties in the
compiled pdf document say that the "author" is "This is a test title".
I now would like to define a new command akin to that suggested by Barney
Dalton on 17 Jan 2002. I have thus included in my preamble:
\newcommand{\annotate}[2][]
{
\pdfstringdef\x at title{#1}
\edef\r{\string\r}
\pdfstringdef\x at contents{#2}
\marginpar
{
\pdfannot
{
/Subtype /Text
/C [1 1 0]
/T (\x at title)
/Contents (\x at contents)
}
}
}
and then include the following line in my text:
\annotate{This is a test title}{These are test contents}
The result after compilation is, however, that the following appears
literally as *regular text* in the pdf document
title contentsThis is a test title These are test contents
and the text note contains the following title
@@title
and these contents
@@contents
I must admit I am a complete novice to latex programming and I don't fully
understand what's going on in the \newcommand code above. I'd be very
grateful, however, if someone could point out to me where things are going
pear-shaped. Many thanks!
Regards,
Michael
P.S.: It may be of interest that I am running the
__________________________________________
Michael Massmann
Institute of Econometrics and Operations Research
University of Bonn
Adenauerallee 24-42
53113 Bonn
Germany
phone: +49 (0)228 733925
fax: +49 (0)228 739189
email: michael.massmann at uni-bonn.de
More information about the pdftex
mailing list