|
From: Randewijk P-J <pjr...@su...> - 2005-10-27 09:41:11
|
Dear John,
JDH> -----Original Message-----
JDH> From: John Hunter [mailto:jdh...@ac...]=20
JDH> I don't think you need both. I think you could just do
JDH>=20
JDH> rcParams['font.latex.filename'] =3D 'mypresentation.llfc'
JDH> rcParams['font.latex.filename'] =3D None
Good idea... nice and clean...
JDH> PJ> The "low level font command" input file has the
JDH> PJ> following included:
JDH>=20
JDH> I think it would be much easier for us to deal with this=20
JDH> if you submit it as a proper patch against CVS and upload=20
JDH> it to the sf site.
I'm not following... This "low level font command" input file is user
specific...
JDH> PJ> ... def get_tex_command(self, tex, fname): fh =3D
JDH> PJ> file(fname, 'w') if rcParams['text.tex.engine'] =3D=3D
JDH> PJ> 'latex': print >>fh, r"""\documentclass{article}
JDH> PJ> \usepackage{%s} \setlength{\paperwidth}{72in}
JDH> PJ> \setlength{\paperheight}{72in} \pagestyle{empty}
JDH> PJ> \begin{document}""" % (rcParams['font.latex.package'])
JDH> PJ> if rcParams['font.latex.inputfile']: inputfile =3D
JDH> PJ> rcParams['font.latex.inputfile.filename'] if
JDH> PJ> os.path.exists(inputfile): print >>fh, r"\input{%s}" %
JDH> PJ> inputfile print >>fh, r"""%s \end{document}""" % tex
JDH>=20
JDH> I worry that this is starting to get hairy -- perhaps we=20
JDH> should look into separating the latex from the code more cleanly.
I think the problem here has to do with Windows line breaks on non
Windows computers...
Was the attached file just as "hairy"...?
JDH> I think it would be much easier for us to deal with this=20
JDH> if you submit it as a proper patch against CVS and upload=20
JDH> it to the sf site. Could I trouble you to do that?
Yes, but first I would like to add a some python code to allow for a
"LaTeX preamble" input file for stuff like:
\DeclareMathAlphabet\mathscr{T1}{futs}{m}{it}
For custom mathscript or for custom macro definitions used within mpl
text..
User would also be able to load additional packages, like:
\usepackage[afrikaans,english]{babel} % Or other languages
\usepackage[iso,english]{isodate} % For ISO style date format in
conjunction with the babel package
\usepackage{numprint} % For 123 456,789 number format
instead of 123,456.789
There would then be two optional LaTeX input files:
- a "LaTeX preamble" input file and/or
- a "low level font command" input file
(it would be difficult to combine them into one...)
Selectable with:
rcParams[latex.preamble.filename'] =3D 'MySimmulation.prbl
rcParams[latex.lowlevelfontcommand.filename] =3D 'MyPresentation.llfc'
Any suggestions for better rcParams names... (and extension... or is it
necessary, it could actually be anything... but a standard would be...
"nice")
Finally, with:
\usepackage{helvet}
in the "LaTeX preamble" input file,=20
rcParams['font.latex.package'] would become unnecessary... but IMHO
should be retained...
Kind regards,
Peter-Jan Randewijk
Senior Lektor - Drywingselektronika & Elektriese Aandrywing =20
=20
-oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo-=20
Departement E&E. Ingenieurswese
Universiteit Stellenbosch=20
Privaatsak X1=20
Matieland, 7603
Suid-Afrika
Tel: +27 (0) 21 808 4457 (w)=20
Faks: +27 (0) 21 808 3951 (w)=20
Tel: +27 (0) 21 883 8592 (h)=20
Sel: +27 (0) 83 556 5809 (h)
-oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo-=20
|