[Mac OS X TeX] TEX -> EPDF?
Ross Moore
ross at ics.mq.edu.au
Thu Dec 6 16:34:38 EST 2001
>
> So far, it only seems to work right the first time it is called, and I
The \newpage is irrelevant, and you should probably suppress the
blank spaces created from the end of lines, after a '}'.
e.g. \setlength{\parindent}{0cm}%
^---- suppresses end-of-line token
> can't figure out why. This is ok because I really want one equation per
> file, since Omnigraffle (and presumably most graphics programs) can only
> embed the first page.
> Now, does anyone know how to get the \pdfinfo command to work properly? I
What do you find is going wrong ?
I'd guess that \pdfinfo{/Subject (#1)} is rather dangerous,
as any active tokens within the #1 would not expand into the text
of their name.
Instead, you'll need something more intricate, such as:
{\let\zz\catcode
\zz`m=12 \zz`a=12 \zz`c=12 \zz`r=12 \zz`o=12
% avoid the letters m a c r o in the name of this next macro
\gdef\stipening macro:->#1@@!@@{#1}
}
\def\shipoutpdf#1{%
\bgroup \def\tmp{#1}%
\edef\tmpinfo{/Subject (\expandafter\stipening\meaning\tmp@@!@@)}%
% \show\tmpinfo
\expandafter\pdfinfo\expandafter{\tmpinfo}%
\egroup
.... other stuff here ....
}
Test: \shipoutpdf{$ \alpha^2 + \beta^2 = \gamma^2 $}
> think it would be _really cool_ if the PDF subject was the original tex
> for the equation.
Try the above.
Cheers,
Ross Moore
> Regards,
>
> Nick Matsakis
>
> ----------------------------------------------
>
> % Note, the argument to this macro requires latex that can be formatted in
> % a horizontal box. Thus, no "displaymath". If you want display style
> % math, write your argument like "$\displaystyle 1 + 1 = 2$"
> \newcommand*{\shipoutpdf}[1]{
> \newpage
> \pdfinfo{/Subject (#1)}
> \setlength{\parindent}{0cm}
> \setlength{\leftmargin}{0cm}
> \setbox0=\vbox{\kern -1truein
> \hbox{\kern -1truein #1 \kern 1truein}%
> \kern1truein}%
> \dimen0\ht0
> \advance\dimen0\dp0
> \setlength{\pdfpageheight}{\dimen0}
> \setlength{\pdfpagewidth}{\wd0}
> \shipout\box0
> }
>
>
>
>
>
>
> -----------------------------------------------------------------
> To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
> "unsubscribe macosx-tex" (no quotes) in the body.
> For additional HELP, send email to <info at email.esm.psu.edu> with
> "help" (no quotes) in the body.
> This list is not moderated, and I am not responsible for
> messages posted by third parties.
> -----------------------------------------------------------------
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
More information about the MacOSX-TeX
mailing list