[texhax] including graphics
James Quirk
jjq at galcit.caltech.edu
Mon Aug 16 18:38:16 CEST 2010
On Mon, 16 Aug 2010, Heiko Oberdiek wrote:
> On Mon, Aug 16, 2010 at 04:51:23PM +0200, Susan Dittmar wrote:
>
> > I assume you directly generate
> > pdf using pdflatex, then you can use either pdf or png format for images.
> > No other formats are recognized by pdflatex.
>
> Also JPEG and JBIG2 are supported. And the PostScript output of MetaPost
> is supported at TeX macro level (by Hans Hagen). Thus the
> driver file pdftex.def for LaTeX's graphics/graphicx package
> knows the following extensions:
> .png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,%
> .PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2%
>
If you're talking of including graphics, as opposed to \includegraphics,
then there's also the /RichMedia route to consider. For instance:
\documentclass{article}
\begin{document}
\mbox{}
\def\R{\space 0 R}\def\use{\immediate\pdfobj useobjnum}%
\def\my #1 {\pdfobj
reserveobjnum\expandafter\edef\csname#1\endcsname{\the\pdflastobj}}%
\my RMcontent \my RMsettings \my RMconfiguration \my RMinstances \my
RMinstance
\my RMasset \my RMparams \my RMbinding \my RMassets \my
RMconfigurations
\my RMwindow
\pdfannot {%
/Subtype/RichMedia/NM (crash)/F 4/RichMediaContent \RMcontent\R
/RichMediaSettings \RMsettings\R
}%
\use\RMcontent {<</Assets \RMassets\R/Configurations
\RMconfigurations\R>>}%
\use\RMsettings {<</Activation <<
/Type/RichMediaActivation/Condition/PO/Configuration
\RMconfiguration\space 0 R
/Presentation<</Style/Windowed/Window \RMwindow\space 0 R>>
>>
>>}%
\use\RMconfiguration {<</Instances \RMinstances\R/Subtype/Flash>>}%
\use\RMinstances {[\RMinstance\R]}%
\use\RMinstance {<</Asset \RMasset\R /Params \RMparams\R>>}%
\use\RMparams {<</Binding \RMbinding\R >>}%
\use\RMasset
{<</FS/URL/F(http://www.youtube.com/v/qB8m85p7GsU?version=3)>>}%
\use\RMbinding {/Foreground}%
\use\RMassets {<</Names[()\RMasset\R]>>}%
\use\RMconfigurations {[\RMconfiguration\R]}%
\use\RMwindow {<<>>} %
\end{document}
includes a YouTube video narrated by Arthur C. Clarke .
But with a bit of elbow grease, instead of a video, you could use
the FLEX SDK to produce a swf that acts as loader for pretty much
any graphic format you care to name. And with an embedded
local host server, it's even possible to incorporate an
interactive TeX session inside a TeX-generated PDF. Therefore,
although SWFs are generally maligned, they do open up many interesting
document possibilities.
James
More information about the texhax
mailing list