bug-lilypond
[Top][All Lists]

## Re: lilypond-book doesn't always add \RequirePackage{graphics} version 2

 From: Bernard Hurley Subject: Re: lilypond-book doesn't always add \RequirePackage{graphics} version 2.7.18 /ChangeLog/1.4302/Sun Nov 27 14:37:50 2005/ Date: Mon, 28 Nov 2005 04:54:43 +0000

On Mon, 2005-11-28 at 03:16 +0000, Bernard Hurley wrote:

> Note that RequirePackage{graphics} has not been added to the file. It
> appears that the initial comment is causing the confusion. When it is
> deleted the file is processed correctly.
>
actually it if you put a comment _anywhere_ before \begin{document} then
\RequirePackage{graphics} is not generated.

I think I know where the problem lies - although my python is not good
enough for me to correct it:

The \RequirePackage{graphics} is generated by the function
"modify_preamble". However this is called as:
modify_preamble (chunks[0])
i.e. on the first "chunk". If a comment occurs before "\begin{document}"
then there will be no "\begin{document}" in this chunk and so the code
generation will not occur.

--