Re: How to make a blank page

2023-06-13 Thread Paul McKay
Hi
Many thanks to you all for your help. I thought you might like to know that
I found Simon's solution the best one.
Perhaps my minimal example was a little too pared down. In reality, I use
headers and footers on my music as well. So my minimal example begins:

Jean Abou's suggestion

\version "2.24.0"
\language "english"

\header {title = "Praeludium" }

myScore = \score { \relative { c'4 d e f g }}

\markup ""
\pageBreak
\myScore

puts the header on the first page and the music on the second page.

With Simon's trick I can use a variable to push the header after the
initial page break thus:

\version "2.24.0"
\language "english"
hdr = \header {title = "Praeludium" }
myScore = \score { \relative { c'4 d e f g }}
\bookpart { \markup \null }
\bookpart { \hdr  \myScore }

I guess my concept of how \pageBreak should work was gleaned from having to
use Microsoft Word. There you get a page break wherever you ask for one,
even if it makes no sense. (Followed by space above the first paragaph on
the page which is execrable. Don't get me started … )

On Mon, 12 Jun 2023 at 10:46, Valentin Petzel  wrote:

> Hello Silvain,
>
> it might help to understand that \pageBreak is not an instruction to
> insert a
> pageBreak. Think of \noPageBreak: This is a token that prevents a
> pageBreak to
> happen at the given place. Similarly \pageBreak is a token that enforces a
> pageBreak to happen at the given place (in other words the token must not
> happen within one page).
>
> Now, if you have
>
> [ page1 ]
> \pageBreak
> [ page2 ]
>
> and [page1] and [page2] are already two different pages the \pageBreak
> will not
> do anything, as there already is a pageBreak. This is similar to how
> adding
> \break at a line break will not cause an empty line. I’d suggest you do
>
> \pageBreak
> \markup\null
> \pageBreak
>
> The first \pageBreak will ensure that a new page is started, the second
> guarantees that the follwing content starts on a new page. All in all this
> will create an empty page, no matter where you insert it. You can even do
> a
> function for this:
>
> emptyPage =
> #(define-scheme-function () ()
>(collect-music-aux add-score #{ \pageBreak #})
>(add-text (markup #:null))
>(collect-music-aux add-score #{ \pageBreak #}))
>
> \emptyPage
> \markup "a"
> \emptyPage
> \markup "b"
>
> Cheers,
> Valentin
>
> Am Montag, 12. Juni 2023, 08:28:36 CEST schrieb Silvain Dupertuis:
> > I tried this trick, which seems to work :
> >
> > \markup " "
> > \pageBreak
> >
> > produces a blank page
> >
> > It seems that there must be something on the page for \pageBreak to
> produce
> > a page.
> >
> > Of course, there is also possibilities to add blank pages to a PDF
> document.
> > Le 11.06.23 à 15:41, Paul McKay a écrit :
> > > \version "2.24.0"
> > > \language "en"
> > > myScore = \score { \relative { c'4 d e f g }}
> > > \pageBreak
> > > \myScore
>
>


Re: How to make a blank page

2023-06-12 Thread Valentin Petzel
Hello Silvain,

it might help to understand that \pageBreak is not an instruction to insert a 
pageBreak. Think of \noPageBreak: This is a token that prevents a pageBreak to 
happen at the given place. Similarly \pageBreak is a token that enforces a 
pageBreak to happen at the given place (in other words the token must not 
happen within one page).

Now, if you have

[ page1 ]
\pageBreak
[ page2 ]

and [page1] and [page2] are already two different pages the \pageBreak will not 
do anything, as there already is a pageBreak. This is similar to how adding 
\break at a line break will not cause an empty line. I’d suggest you do

\pageBreak
\markup\null
\pageBreak

The first \pageBreak will ensure that a new page is started, the second 
guarantees that the follwing content starts on a new page. All in all this 
will create an empty page, no matter where you insert it. You can even do a 
function for this:

emptyPage =
#(define-scheme-function () ()
   (collect-music-aux add-score #{ \pageBreak #})
   (add-text (markup #:null))
   (collect-music-aux add-score #{ \pageBreak #}))

\emptyPage
\markup "a"
\emptyPage
\markup "b"

Cheers,
Valentin

Am Montag, 12. Juni 2023, 08:28:36 CEST schrieb Silvain Dupertuis:
> I tried this trick, which seems to work :
> 
> \markup " "
> \pageBreak
> 
> produces a blank page
> 
> It seems that there must be something on the page for \pageBreak to produce
> a page.
> 
> Of course, there is also possibilities to add blank pages to a PDF document.
> Le 11.06.23 à 15:41, Paul McKay a écrit :
> > \version "2.24.0"
> > \language "en"
> > myScore = \score { \relative { c'4 d e f g }}
> > \pageBreak
> > \myScore



signature.asc
Description: This is a digitally signed message part.


Re: How to make a blank page

2023-06-12 Thread Silvain Dupertuis

I tried this trick, which seems to work :

\markup " "
\pageBreak

produces a blank page

It seems that there must be something on the page for \pageBreak to produce a 
page.

Of course, there is also possibilities to add blank pages to a PDF document.

Le 11.06.23 à 15:41, Paul McKay a écrit :

\version "2.24.0"
\language "en"
myScore = \score { \relative { c'4 d e f g }}
\pageBreak
\myScore



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: How to make a blank page

2023-06-11 Thread Simon Albrecht

Hi Paul,

On 11.06.23 15:41, Paul McKay wrote:
A solution which would also allow me to insert a blank space between 
scores (so I could begin a 2nd movement on an even-numbered page) 
would be good, but my current request is just for an initial one.


Jean already gave one solution, another common one would be to use a 
blank bookpart (each bookpart always starts on a new page).


%%
\version "2.24.0"

\bookpart { \markup \null }
\bookpart { \score { c' } }
\bookpart { \markup "Page intentionally left blank for page-turning 
purposes." }

\bookpart { \score { d' } }
%%

I don’t quite know what you mean by referring to the even-numbered page; 
maybe this could help: 
, 
especially the note at the bottom regarding odd/even.


Hope that helps,
Simon



Re: How to make a blank page

2023-06-11 Thread Jean Abou Samra
Le dimanche 11 juin 2023 à 14:41 +0100, Paul McKay a écrit :
> Hi
> I'm engraving a piece in two sections. The first section fits on one page and 
> the second one is rather longer and requires 2 pages. I would like the pdf to 
> have a blank page at the start because I
> often view pdf's with 2 pages side by side. All my searches have not helped. 
> My minimum not-working example is:
> 
> \version "2.24.0"
> \language "en"


You probably meant \language "english"


> myScore = \score { \relative { c'4 d e f g }}
> \pageBreak
> \myScore
> 
> My understanding of the documentation says that this ought to produce an 
> initial blank page.


I would be curious to understand what section of the documentation you are 
reading and why you believe it implies this.

\pageBreak means "the element before and the element after must not be on the 
same page". In this case, there is no element before, so nothing to do for 
\pageBreak.

You can achieve what you're after with

myScore = ...

\markup ""
\pageBreak
\myScore



signature.asc
Description: This is a digitally signed message part


How to make a blank page

2023-06-11 Thread Paul McKay
Hi
I'm engraving a piece in two sections. The first section fits on one page
and the second one is rather longer and requires 2 pages. I would like the
pdf to have a blank page at the start because I often view pdf's with 2
pages side by side. All my searches have not helped. My minimum not-working
example is:

\version "2.24.0"
\language "en"
myScore = \score { \relative { c'4 d e f g }}
\pageBreak
\myScore

My understanding of the documentation says that this ought to produce an
initial blank page. It doesn't. A solution which would also allow me to
insert a blank space between scores (so I could begin a 2nd movement on an
even-numbered page) would be good, but my current request is just for an
initial one.
Thanks in advance for your help
Paul McKay