Code to product several versions PDF with different fonts
![](https://secure.gravatar.com/avatar/38944d5653a9e373103aaa7ff8562d8a.jpg?s=120&d=mm&r=g)
Hi, I'm preparing a document and I would like to product several versions PDF with different fonts. I dont know how to organize it : is there simple structure "if-then-else" ? could I use ConTeXt's "mode" or "environment" for this goal ? Any idea or example is very appreciated. Thank you in advance, Q.
![](https://secure.gravatar.com/avatar/a5d42c1ccacf33c72fd502fe1bb5ffa9.jpg?s=120&d=mm&r=g)
VnPenguin said this at Sun, 20 Feb 2005 18:58:41 +0100:
I dont know how to organize it : is there simple structure "if-then-else" ? could I use ConTeXt's "mode" or "environment" for this goal ?
These are all possibilities. It depends on how you want to change them. Modes sound promising if you want to change them from the command line. Taking the time to set up typescripts/typefaces so that you can change one line/word won't hurt, in any case... So what kind of interface were you imagining? adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
![](https://secure.gravatar.com/avatar/38944d5653a9e373103aaa7ff8562d8a.jpg?s=120&d=mm&r=g)
On Sun, 20 Feb 2005 18:09:47 +0000, Adam Lindsay
VnPenguin said this at Sun, 20 Feb 2005 18:58:41 +0100:
I dont know how to organize it : is there simple structure "if-then-else" ? could I use ConTeXt's "mode" or "environment" for this goal ?
These are all possibilities. It depends on how you want to change them. Modes sound promising if you want to change them from the command line. Taking the time to set up typescripts/typefaces so that you can change one line/word won't hurt, in any case...
So what kind of interface were you imagining?
Thank you for your reply. I would like to use command line. Could you give me a simple example please. For example I would like to make 3 PDF: The 1st: \usetypescript[berry][t5] \usetypescript[palatino][t5] \setupbodyfont[palatino,12pt] The 2nd with: \usetypescript[berry][t5] \usetypescript[postscript][t5] \setupbodyfont[postscript,12pt] The 3rd with my typescript .... Thank you, Q.
![](https://secure.gravatar.com/avatar/a5d42c1ccacf33c72fd502fe1bb5ffa9.jpg?s=120&d=mm&r=g)
VnPenguin said this at Sun, 20 Feb 2005 19:17:41 +0100:
I'm preparing a document and I would like to product several versions PDF with different fonts.
I would like to use command line. Could you give me a simple example please.
% I've adapted this for gwTeX default encodings. % Convert back to t5 as appropriate! \doifmode{palatino} {\usetypescript[adobekb][8r] \usetypescript[palatino][8r] \setupbodyfont[palatino,12pt]} \doifmode{times} {\usetypescript[adobekb][8r] \usetypescript[postscript][8r] \setupbodyfont[postscript,12pt]} \starttext \input knuth \showfontstrip \stoptext ...and run with: texexec --pdf --mode=palatino filename texexec --pdf --mode=times filename -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
![](https://secure.gravatar.com/avatar/38944d5653a9e373103aaa7ff8562d8a.jpg?s=120&d=mm&r=g)
On Sun, 20 Feb 2005 18:34:20 +0000, Adam Lindsay
VnPenguin said this at Sun, 20 Feb 2005 19:17:41 +0100:
I'm preparing a document and I would like to product several versions PDF with different fonts.
I would like to use command line. Could you give me a simple example please.
% I've adapted this for gwTeX default encodings. % Convert back to t5 as appropriate! ...
Thank you very much ! Q.
![](https://secure.gravatar.com/avatar/6af06dcf5f958fe4ec149408292d6acd.jpg?s=120&d=mm&r=g)
If you have the modes defined in a layout.tex you can say in the main file: \enablemode[times] %\enablemode[palatino] %\enablemode[..] \environment layout. So by adding the appropriate \enablemode you even do not need to run the commandline ... Willi Adam Lindsay wrote:
VnPenguin said this at Sun, 20 Feb 2005 19:17:41 +0100:
I'm preparing a document and I would like to product several versions PDF with different fonts.
I would like to use command line. Could you give me a simple example please.
% I've adapted this for gwTeX default encodings. % Convert back to t5 as appropriate!
\doifmode{palatino} {\usetypescript[adobekb][8r] \usetypescript[palatino][8r] \setupbodyfont[palatino,12pt]}
\doifmode{times} {\usetypescript[adobekb][8r] \usetypescript[postscript][8r] \setupbodyfont[postscript,12pt]} \starttext \input knuth \showfontstrip \stoptext
...and run with: texexec --pdf --mode=palatino filename texexec --pdf --mode=times filename
participants (3)
-
Adam Lindsay
-
VnPenguin
-
Willi Egger