TODO added (paint order should take into account linked axes)
[PyX/mjg.git] / pyx / lfs / createlfs.tex
blob2bc6038eef809d10b4a3d02364a6d2898bf8318b
1 % Copyright (C) 2002 Jörg Lehmann <joergl@users.sourceforge.net>
2 % Copyright (C) 2002 André Wobst <wobsta@users.sourceforge.net>
4 % This file is part of PyX (http://pyx.sourceforge.net/).
6 % PyX is free software; you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation; either version 2 of the License, or
9 % (at your option) any later version.
11 % PyX is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
16 % You should have received a copy of the GNU General Public License
17 % along with PyX; if not, write to the Free Software
18 % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 \endlinechar=-1 % don't add tailing space while \read
22 \message{latex style name (e.g. 12ptex)? }
23 \read-1 to\latexstylename
25 \message{latex class name (e.g. article)? }
26 \read-1 to\latexclassname
28 \message{latex class options (e.g. 12pt)? }
29 \read-1 to\latexclassopt
31 \message{initial commands (e.g. \string\usepackage\string{exscale\string})? }
32 \read-1 to\latexinit
34 \endlinechar=13
36 \newwrite\myfile
38 \newbox\mybox
40 \documentclass[\latexclassopt]{\latexclassname}
42 \latexinit
44 \newcommand{\writefontsize}[1]{
45 \setbox\mybox=\hbox{#1
46 a $a$
47 \immediate\write\myfile{%
48 \string\def\string#1{%
49 \string\font\string\pyxfont=\fontname\font
50 \string\pyxfont
51 \string\font\string\pyxfonttfa=\fontname\textfont0
52 \string\textfont0=\string\pyxfonttfa
53 \string\font\string\pyxfontsfa=\fontname\scriptfont0
54 \string\scriptfont0=\string\pyxfontsfa
55 \string\font\string\pyxfontssfa=\fontname\scriptscriptfont0
56 \string\scriptscriptfont0=\string\pyxfontssfa
57 \string\font\string\pyxfonttfb=\fontname\textfont1
58 \string\textfont1=\string\pyxfonttfb
59 \string\font\string\pyxfontsfb=\fontname\scriptfont1
60 \string\scriptfont1=\string\pyxfontsfb
61 \string\font\string\pyxfontssfb=\fontname\scriptscriptfont1
62 \string\scriptscriptfont1=\string\pyxfontssfb
63 \string\font\string\pyxfonttfc=\fontname\textfont2
64 \string\textfont2=\string\pyxfonttfc
65 \string\font\string\pyxfontsfc=\fontname\scriptfont2
66 \string\scriptfont2=\string\pyxfontsfc
67 \string\font\string\pyxfontssfc=\fontname\scriptscriptfont2
68 \string\scriptscriptfont2=\string\pyxfontssfc
69 \string\font\string\pyxfonttfd=\fontname\textfont3
70 \string\textfont3=\string\pyxfonttfd
71 \string\font\string\pyxfontsfd=\fontname\scriptfont3
72 \string\scriptfont3=\string\pyxfontsfd
73 \string\font\string\pyxfontssfd=\fontname\scriptscriptfont3
74 \string\scriptscriptfont3=\string\pyxfontssfd
80 \begin{document}
81 \immediate\openout\myfile=\latexstylename.lfs
82 {\catcode`\%=12\immediate\write\myfile{% This automatically generated file is part of PyX (http://pyx.sourceforge.net/).}}
83 {\catcode`\%=12\immediate\write\myfile{% \string\latexstylename="\expandafter\string\latexstylename"}}
84 {\catcode`\%=12\immediate\write\myfile{% \string\latexclassname="\expandafter\string\latexclassname"}}
85 {\catcode`\%=12\immediate\write\myfile{% \string\latexclassopt="\expandafter\string\latexclassopt"}}
86 {\catcode`\%=12\immediate\write\myfile{% \string\latexinit="\expandafter\string\latexinit"}}
87 \writefontsize{\tiny}
88 \writefontsize{\scriptsize}
89 \writefontsize{\footnotesize}
90 \writefontsize{\small}
91 \writefontsize{\normalsize}
92 \writefontsize{\large}
93 \writefontsize{\Large}
94 \writefontsize{\LARGE}
95 \writefontsize{\huge}
96 \writefontsize{\Huge}
97 \immediate\closeout\myfile
98 \end{document}