I think that I may have misunderstood your question... if you want the
possibility of two different outputs (hence the use of tags) you'll need to
use different book blocks. Paper instructions must be made on the top of
the file or on a paper block (on top of a file or at first in the paper
block).

%%Start of code
\version "2.24.0"
someMusic = \relative c'' { c8 d e f g f e d }
\book {
#(set-default-paper-size "a4" 'portrait)
\paper { #(set-paper-size "a4" 'portrait) }
\score { { \repeat unfold 16 { \someMusic } } }
} % end of book block
\book {
\paper { #(set-paper-size "a4" 'landscape) }
\score { { \repeat unfold 16 { \someMusic } } }
} % end of book block (different document)
%%EOF

Em qua., 9 de abr. de 2025 às 09:08, Lucas Cavalcanti <lucaspi...@gmail.com>
escreveu:

> Tags don't need to always reference musical expressions; you can use tags
> on \set commands too (like "tag #'tablature { \set TabStaff.minimumFret =
> #2 }").
> But in this case you have presented, it would be wiser to use the
> \bookpart block to each section that needs the paper rotated (using the
> set-paper-size function)... if this "solution" would actually work.
>
> I'm attaching faulty and wrong code to illustrate what I thought would be
> the answer. The code compiles but does not give the expected output.
>
> I would like to emphasize that this subject - to be able to change page
> settings (rotation and size) mid book - is, in my opinion, very much
> important. Should even be in the learning manual or the documentation if
> possible.
>
> %%Start of faulty code.
> %Please, turn on 'wrap lines'.
> \version "2.24.0"
> someMusic = \relative c'' { c8 d e f g f e d }
> \book {
> #(set-default-paper-size "a4" 'portrait)
> \bookpart { % bookpart in portrait
> \paper { #(set-paper-size "a4" 'portrait) }
> \score { { \repeat unfold 16 { \someMusic } } }
> } % end of bookpart
> \bookpart { % bookpart in landscape
> \paper { #(set-paper-size "a4" 'landscape) } % this will give a
> "glitch"(?). this paper page (and subsequently all of this bookpart block)
> should be all rotated.
> \score { { \repeat unfold 16 { \someMusic } } }
> } % end of bookpart
> } % end of book
> %%EOF
>
>
> Em qua., 9 de abr. de 2025 às 08:15, damianlegassick <
> damianlegass...@mac.com> escreveu:
>
>> Hi all
>>
>> If I wanted do something equivalent to this (which I know does not work)
>> - what's the best way to go about it?
>>
>> \tag #'landscape  #(set-default-paper-size "a4" 'landscape)
>> \tag #'portrait #(set-default-paper-size "a4" )
>>
>> thanks
>>
>> Damian
>>
>

Reply via email to