Hi, Tests running lilypond-book -V --psfonts testx.lytex On files testx.lytex. with latest CVS version (1.4313)
----------------- test1.lytex ---------------- ----------------- test1.tex ---------------- %% comment %% comment \documentclass[english]{article} \documentclass[english]{article} \begin{document} \begin{document} \end{document} \end{document} ----------------- test2.lytex ---------------- ----------------- test2.tex ---------------- \documentclass[english]{article} \documentclass[english]{article} %% comment %% comment \begin{document} \begin{document} \end{document} \end{document} The code for detecting whether graphics pakages are already loaded does not work when the package is loaded as a parameter to the main class: ----------------- test3.lytex ---------------- ----------------- test3.tex ---------------- \documentclass[graphics]{article} \documentclass[graphics]{article} \begin{document} \usepackage{graphics} \end{document} \begin{document} \end{document} Some points: 1] Detecting whether LaTeX would have loaded the graphics package by the time you get to \begin{document} is impossible unless you are going to parse LaTeX package files. I have been involved in LaTeX projects where we commonly needed to load about 20 packages. So what we did was load them in a .sty file, and only had to use one \usepackage instead of 20. 2] If the issue is whether "graphics" or "graphicx" has been loaded by the time you get to \begin{document}, then it is a non-issue, LaTeX will ignore the \usepackage{graphics} if either are loaded. 3] However there still is an issue here. Suppose in five years time someone writes a package "fungraphics" that includes the same interface as "graphics" but is inconsistent with it. (Stranger things have happened!) if someone used \usepackage{fungraphics} in the preamble to a .lytex file then lilypond-book would produce invalid LaTeX. SO it is _not_ worth trying to see whether "graphics" or "graphicsx" would have been loaded, and it actually doesn't matter. BUT there is an issue of giving the user the option of _not_ generating \usepackage{graphics}. This could be done by a command line switch or maybe better with a directive like: \lilypondGraphicsAlreadyLoaded which would suppress the generation of "\usepackage{graphics}" if added to the preamble. -- Bernard Hurley <[EMAIL PROTECTED]> _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel