lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tex is running out of room for \dimen


From: Mats Bengtsson
Subject: Re: tex is running out of room for \dimen
Date: Thu, 30 Aug 2001 15:51:09 +0200

> I had asked this question on the list previously:
> 
>     Laura> My complete dowland "book" is now over 150 pages, which is large
>     Laura> compared to my other lilypond book files, and maybe for 
> lilypond-book
>     Laura> input files in general, but certainly not large as compared with 
> lots
>     Laura> of LaTeX files in the world.
> 
>     Laura> Since I added the last two or three songs to the book, I have been
>     Laura> getting several error messages whenever I run latex on the
>     Laura> lilypond-book output:
> 
>     Laura> ! No room for a new \dimen .
>     Laura> address@hidden ...\else \errmessage {No room for a new #3}
>     Laura>                                                   \fi 
>     Laura> l.389 }\input lilyponddefs\newdimen\outputscale
>     Laura>                                                 
> \outputscale=\lilypondpapero...
> 
>     Laura> ? 
> 
>     Laura> As far as I can tell, they're harmless; I just hit carriage return 
> at
>     Laura> the question mark, and the latex output seems to be fine.  But does
>     Laura> anyone know what I should do to get rid of them?
> 
> Since I didn't get any answer here, I tried  asking on comp.text.tex,
> and Peter Wilson asked whether the \newdimen\outputscale occurred more
> than once, and I checked, and lilypond-book seems to be putting it
> into every .tex file it generates.  So I asked him whether that was a
> bug, and he replied:
> 
>     Peter>     If it isn't a bug it's certainly a major infelicity. It is 
> possible to
>     Peter> write code to check if a command has already been defined or if a 
> file has
>     Peter> has been previously input, so they can correct the problem.
> 
>     Peter>     For the latter something along the lines (where FILE is the 
> name of a
>     Peter> file to be input):
>     Peter> % FILE.tex
>     Peter> \ifx\FILEisloaded\relax\endinput\else\let\FILEisloaded=\relax\fi
>     Peter> .... definitions/code (will be read only once)
>     Peter> \endinput
>     Peter> % end of FILE.tex
> 
> Could lilypond-book be revised to include logic like this?

As far as I understand, we do have such logic in 
lilyponddefs.tex wich contains many of the general settings.
The silly thing is that \newdimen\outputscale declaration
isn't done within that file but in the generated tex file
for each score. 

Try the patch below (untested)

  /Mats

diff -u tex/lilyponddefs.tex.orig tex/lilyponddefs.tex  
--- tex/lilyponddefs.tex.orig   Thu Aug 30 15:46:40 2001
+++ tex/lilyponddefs.tex        Thu Aug 30 15:48:34 2001
@@ -78,5 +78,6 @@
         \csname%
         nolilyfooter\texsuffix\endcsname
 \fi
-
+% Moved here from the generated code to save resources.
+\newdimen\outputscale 
 \endinput
diff -u scm/tex.scm.orig scm/tex.scm
--- scm/tex.scm.orig    Tue Jul 24 13:39:37 2001
+++ scm/tex.scm Thu Aug 30 15:47:13 2001
@@ -106,7 +106,7 @@
         (ly-gulp-file "music-drawing-routines.ps"))
      (if (defined? 'ps-testing) "/testing true def%\n" "")
      "}"
-     "\\input lilyponddefs\\newdimen\\outputscale 
\\outputscale=\\lilypondpaperoutputscale pt\\turnOnPostScript"))
+     "\\input lilyponddefs\\outputscale=\\lilypondpaperoutputscale 
pt\\turnOnPostScript"))
 
   ;; Note: this string must match the string in ly2dvi.py!!!
   (define (header creator generate) 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]