[XeTeX] documentation on programming language (in macros)?
Bernhard Barkow
bb at creativeeyes.at
Sat Feb 26 10:06:48 CET 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 26. Feb 2005, at 6:31, Roger Hart wrote:
> I certainly very much appreciate all the extremely generous and expert
> help that I've received with my many very ignorant and simple novice
> questions about latex etc. So please let me apologize for asking one
> more, and I do hope I may forgiven for stating this, since I really
> don't know anything about programming in TeX and LaTeX at this point,
> but it seems to me that making ps4pdf work with xelatex should be
> pretty trivial exercise:
>
> 1) add a section of code that tests to see if the environment is
> xelatex, and if it is, use \XeTeXpdffile, instead of the corresponding
> pdflatex command, to insert the contents of myfilename-pics, one page
> at a time;
>
> 2) if the environment is not xelatex, then process according to
> ps4pdf, either creating a -pics file under latex + dvips +ps2pdf, and
> even allowing the usual processing under pdflatex.
>
> That is, something like,
>
> case of xelatex {
> %set definitions
> \newcounter{pdfpage}
> \setcounter{pdfpage}{1}
> %redefine ps4pdf for xelatex
> \renewcommand{ps4pdf}{
> \XeTeXpdffile "scratch-xy-pics.pdf" page pdfpage
> \stepcounter{pdfpage}
> }
> }
> case of latex + dvips +ps2pdf {
> process what is already in ps4pdf
> }
> case of pdftex{
> process what is already in ps4pdf
> }
>
>
> Or even,
>
> if xelatex {
> insert pages as above
> }
> else
> \usepackage{ps4pdf}
> endif
>
I don't know about ps4pdf; I never used it, because I decided to use
pdftex exclusively some time ago, and if really necessary I keep my
graphics files as both eps and pdf. However, checking for XeTeX works
like this:
\ifx\XeTeXversion\undefined
\newcommand{\testb}{This is not XeTeX!}
\else
\newcommand{\testb}{This is XeTeX \number\XeTeXversion\XeTeXrevision!}
\fi
HTH,
Bernhard Barkow
____________________________________________________
_________________________________ Bernhard Barkow __
__ __
__ mail bb at creativeeyes.at __ www.creativeeyes.at __
__ Phone +43 699 12660415 __ Fax +43 1 8775334 __
___________________ gpg key ID _ A89F09C45921020D __
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
iD8DBQFCIDwsqJ8JxFkhAg0RAm3LAKCZYa6l5FcrALI1mvvVnSzc62QHEwCgh0eg
zcOzDkG8hNMCnRJZID/gMaM=
=O9d4
-----END PGP SIGNATURE-----
More information about the XeTeX
mailing list