uliska / musicexamples

LaTeX package to manage music examples
GNU General Public License v3.0
7 stars 0 forks source link

Nested full-page examples don't work reliably #2

Open uliska opened 11 years ago

uliska commented 11 years ago

Entering a \fullPage example delays execution until the next pagebreak (or even the second-to-next, depending on the odd/even-situation). For this it saves the file name to an internal variable.

If one then enters another \fullPageMusicExample before the execution of the \afterpage command is completed this internal variable is reset to the new filename, and the first command tries to print the wrong file.

As a workaround this has to be documented. But of course one should be able to enter examples like this, because the user can't know when the example actually will be included.

I think the filename should be saved to a FIFO-buffer instead of in a plain variable. So when it comes to execution the function gets the first file name. If the buffer isn't empty after execution the command should issue a new command to print the next example after the first one. Depending on the odd/even configuration this may cause one page of text between them, and this should also be handled correctly.

Take as example:

The result should be:

This is actually quite complex and will require good testing.