diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2009-08-23 11:11:32 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2009-08-23 11:11:32 +0000 |
commit | 8fc3039c82d48605b5ca8b2eda3f4fdd755681e1 (patch) | |
tree | 3cd9bbdd599bc4d1ac0409e167fee2136e4c0ec9 /Master/texmf-dist/tex/context/base/spec-xet.mkii | |
parent | 850fc99b7cd3ae7a20065531fe866ff7bae642ec (diff) |
this is context 2009.08.19 17:10
git-svn-id: svn://tug.org/texlive/trunk@14827 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/spec-xet.mkii')
-rw-r--r-- | Master/texmf-dist/tex/context/base/spec-xet.mkii | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/spec-xet.mkii b/Master/texmf-dist/tex/context/base/spec-xet.mkii new file mode 100644 index 00000000000..0cbd55ba7fd --- /dev/null +++ b/Master/texmf-dist/tex/context/base/spec-xet.mkii @@ -0,0 +1,66 @@ +%D \module +%D [ file=spec-xtx, +%D version=2004.11.08, +%D title=\CONTEXT\ Special Macros, +%D subtitle=\XETEX\ support, +%D author={Adam Lindsay \& Hans Hagen \& \unknown}, +%D date=\currentdate, +%D copyright={Adam Lindsay \& Hans Hagen}] + +\unprotect + +\definespecial\doinsertfile + {\dofileinsertion{xtx}\@@DriverImageType} + +\definefileinsertion{xtx}{jpg}{\xtxhandleotherimage} +\definefileinsertion{xtx}{png}{\xtxhandleotherimage} +\definefileinsertion{xtx}{gif}{\xtxhandleotherimage} +\definefileinsertion{xtx}{tif}{\xtxhandleotherimage} +\definefileinsertion{xtx}{pdf}{\xtxhandlepdfimage } + +\def\checkpdfimagepagenumber + {\edef\pdfimagepagenumber + {\ifx\@@DriverImagePage\empty\else\ifnum\@@DriverImagePage>\zerocount + \space page\space\@@DriverImagePage\space + \fi\fi}} + +\def\xtxhandleotherimage + {\XeTeXpicfile "\@@DriverImageFile" + \ifdim\@@DriverImageWidth >\zeropoint \!!width \@@DriverImageWidth \space\fi + \ifdim\@@DriverImageHeight>\zeropoint \!!height \@@DriverImageHeight \fi + \relax} + +\def\xtxhandlepdfimage + {\checkpdfimagepagenumber + \XeTeXpdffile "\@@DriverImageFile" + \pdfimagepagenumber + \ifdim\@@DriverImageWidth >\zeropoint \!!width \@@DriverImageWidth \space\fi + \ifdim\@@DriverImageHeight>\zeropoint \!!height \@@DriverImageHeight \fi + \relax} + +\def\dogetXTXfiguresize + {\setbox\foundexternalfigure\vbox{\XeTeXpicfile "\@@DriverImageFile"\relax}% + \xdef\analyzedfigurewidth {\the\wd\foundexternalfigure}% + \xdef\analyzedfigureheight{\the\ht\foundexternalfigure}} + +\def\dogetXTXpdfsize + {\checkpdfimagepagenumber + \setbox\foundexternalfigure\vbox{\XeTeXpdffile "\@@DriverImageFile" \pdfimagepagenumber\relax}% + \xdef\analyzedfigurewidth {\the\wd\foundexternalfigure}% + \xdef\analyzedfigureheight{\the\ht\foundexternalfigure}} + +\definefilechecker{xtx}{png}{\dogetXTXfiguresize} +\definefilechecker{xtx}{jpg}{\dogetXTXfiguresize} +\definefilechecker{xtx}{gif}{\dogetXTXfiguresize} +\definefilechecker{xtx}{tif}{\dogetXTXfiguresize} +\definefilechecker{xtx}{pdf}{\dogetXTXpdfsize } + +\definespecial\dogetfiguresize + {\dofilechecker{xtx}\@@DriverImageType} + +%D The figure object system caused no end of headaches. They all +%D went away with this single line: + +\setupexternalfigures[\c!object=\v!no] + +\protect \endinput |