Re: Hiding lyrics extenders on empty measures

2022-11-23 Thread Jacques Menu
Hello Werner,

As it turns out, it’s Score.LyricHyphen.stencil I have to play with, since in 
my actual score, the end of the word 'Kum — ba — ya' occurs at the beginning of 
the coda :




But :

\override Score.LyricHyphen.stencil = ##f 
kum — ba --
\revert Score.LyricHyphen.stencil
ya

prevents the hyphen I need  after ‘ba’ at the end of measure 13 from being 
visible : it’s either all hyphens of none of them.

So I use :

Lo -- ord Kum --
\once  \override LyricText.X-offset = #-0.5
"ba  -"

instead, at the cost of this minus sign being slightly too thick.

Would be nice to be able to be able to hide all the hyphens except the first 
one in such a situation.

A nice day!

JM




Re: Hiding lyrics extenders on empty measures

2022-11-23 Thread Werner LEMBERG

> As it turns out, it’s Score.LyricHyphen.stencil I have to play with,
> since in my actual score, the end of the word 'Kum -- ba -- ya'
> occurs at the beginning of the coda [...]

This is an interesting case, which probably nobody has thought of
previously (at least I can't remember this ever being discussed).  I
agree that LilyPond should be able to handle this, for example with a
predefined command like `\trailingHyphen`.

Jean?


Werner


Page reference problem

2022-11-23 Thread Jacques Menu
Hello folks,

The simple example in the doc works fine, but what if the score contains 
parallel music? An extra staff is printed in my attempts.

Thanks for the help!

JM




\version "2.23.80"

% disposition
% --

\header {
  title= "Kumbaya"
  composer = "Negro-spiritual"
}

\paper {
  print-page-number = ##t
  print-first-page-number = ##f

  oddHeaderMarkup = \markup {
DenierePage à la page \page-ref #'DenierePage "0" "?"
  }
  %  evenHeaderMarkup = \oddHeaderMarkup
  evenHeaderMarkup = \markup {
\unless \on-first-page
\fill-line {
  \line {
\fromproperty #'header:title
" - Page "
\concat {
  \fromproperty #'page:page-number-string
  "/"
  \page-ref #'DenierePage "0" "?"
  % "0": un chiffre suffit pour indiquer la largeur du chanmp à prévoir
  % "2' ou "3": devrait pouvoir être "?"
}
  }
  \line {
DenierePage à la page \page-ref #'DenierePage "0" "?"
  }
}
  }
}

\layout {
  \context {
\Score
% autoBeaming = ##f % to display tuplets brackets
  }

  \context {
\Voice
  }
}


\book {
  \score {
{
  <<
a1
b1
  >>

  \label #'DenierePage %%% HERE
}
  }
}



Re: Page reference problem

2022-11-23 Thread David Kastrup
Jacques Menu  writes:

> Hello folks,
>
> The simple example in the doc works fine, but what if the score
> contains parallel music? An extra staff is printed in my attempts.

I don't see an extra Staff.  You get one Staff for every independently
started music in your \score.

> \book {
>   \score {
> {
>   <<
> a1
> b1
>   >>
>
>   \label #'DenierePage %%% HERE
> }
>   }
> }
>

One Staff for a1, one Staff for b1, and one Staff for \label #'DenierePage

You'll see the same when writing

\score {
  {
<< a1 b >>
c
  }
}


-- 
David Kastrup



Re: Page reference problem

2022-11-23 Thread Jacques Menu
Hello David,

Thanks for your answer.

My problem is : how can I get the last page number computed alright, but 
without this extra staff for the label itself?

JM

> Le 23 nov. 2022 à 13:29, David Kastrup  a écrit :
> 
> Jacques Menu  writes:
> 
>> Hello folks,
>> 
>> The simple example in the doc works fine, but what if the score
>> contains parallel music? An extra staff is printed in my attempts.
> 
> I don't see an extra Staff.  You get one Staff for every independently
> started music in your \score.
> 
>> \book {
>>  \score {
>>{
>>  <<
>>a1
>>b1
 
>> 
>>  \label #'DenierePage %%% HERE
>>}
>>  }
>> }
>> 
> 
> One Staff for a1, one Staff for b1, and one Staff for \label #'DenierePage
> 
> You'll see the same when writing
> 
> \score {
>  {
><< a1 b >>
>c
>  }
> }
> 
> 
> -- 
> David Kastrup




Re: Page reference problem

2022-11-23 Thread David Kastrup
Jacques Menu  writes:

>> Le 23 nov. 2022 à 13:29, David Kastrup  a écrit:
>> 
>> Jacques Menu  writes:
>> 
>>> Hello folks,
>>> 
>>> The simple example in the doc works fine, but what if the score
>>> contains parallel music? An extra staff is printed in my attempts.
>> 
>> I don't see an extra Staff.  You get one Staff for every independently
>> started music in your \score.
>> 
>>> \book {
>>>  \score {
>>>{
>>>  <<
>>>a1
>>>b1
> 
>>> 
>>>  \label #'DenierePage %%% HERE
>>>}
>>>  }
>>> }
>>> 
>> 
>> One Staff for a1, one Staff for b1, and one Staff for \label #'DenierePage
>> 
>> You'll see the same when writing
>> 
>> \score {
>>  {
>><< a1 b >>
>>c
>>  }
>> }
>
> Thanks for your answer.
>
> My problem is : how can I get the last page number computed alright,
> but without this extra staff for the label itself?

By putting the label into one of the existing staves rather than in a
staff of its own?

-- 
David Kastrup



Re: Future of OpenLilyLib

2022-11-23 Thread Graham King


> On 22 Nov 2022, at 09:31, Mark Knoop  wrote:
> 
> Thanks to all for your responses. There seems to be a general agreement
> about the desired direction but I'd still like to hear who is actually
> using this code at the moment. Is it just Kieren and me?

I've tried to get Scholarly working in the past, but failed.  I'm currently 
failing to get lyluatex working.

There are some really promising tools in OpenLilyLib, but they seem to require 
someone with Urs' level of focus and intellect to use them.  This thread is 
raising my hopes once more.


Re: Future of OpenLilyLib

2022-11-23 Thread Jean Abou Samra

Le 23/11/2022 à 16:31, Graham King a écrit :

I've tried to get Scholarly working in the past, but failed.  I'm currently 
failing to get lyluatex working.

There are some really promising tools in OpenLilyLib, but they seem to require 
someone with Urs' level of focus and intellect to use them.  This thread is 
raising my hopes once more.





I'd suggest you open a new thread about lyLuaTeX, with details
of your problems getting it to run.

(Note that lyLuaTeX isn't part of openLilyLib.)

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Future of OpenLilyLib

2022-11-23 Thread Federico Bruni
In order to run lyluatex with recent versions of lilypond (2.23.x), you 
must install the most recent version of lyluatex. In other words, you 
should install Texlive standalone and not the texlive packaged by 
distros.


See this discussion:
https://github.com/jperon/lyluatex/issues/287


Il giorno mer 23 nov 2022 alle 17:55:34 +0100, Jean Abou Samra 
 ha scritto:

Le 23/11/2022 à 16:31, Graham King a écrit :
I've tried to get Scholarly working in the past, but failed.  I'm 
currently failing to get lyluatex working.


There are some really promising tools in OpenLilyLib, but they seem 
to require someone with Urs' level of focus and intellect to use 
them.  This thread is raising my hopes once more.





I'd suggest you open a new thread about lyLuaTeX, with details
of your problems getting it to run.

(Note that lyLuaTeX isn't part of openLilyLib.)

Best,
Jean







Re: Hiding lyrics extenders on empty measures

2022-11-23 Thread Kieren MacMillan
Hi all,

> This is an interesting case, which probably nobody has thought of
> previously (at least I can't remember this ever being discussed).

I run into it all the time in my works… I simply prefix the syllable with a 
hyphen (tweaked to match the LyricHyphen) and use self-alignment-X to make it 
look like it’s doing the right thing.

> I agree that LilyPond should be able to handle this,
> for example with a predefined command like `\trailingHyphen`.

An automagic solution would be great!

Thanks,
Kieren.


Re: Future of OpenLilyLib

2022-11-23 Thread Graham King
Thanks Jean and Federico.  I'll open a new thread on lyLuaTex, to avoid 
hijacking this one.

-- Graham

> On 23 Nov 2022, at 16:59, Federico Bruni  wrote:
> 
> In order to run lyluatex with recent versions of lilypond (2.23.x), you must 
> install the most recent version of lyluatex. In other words, you should 
> install Texlive standalone and not the texlive packaged by distros.
> 
> See this discussion:
> https://github.com/jperon/lyluatex/issues/287
> 
> 
> Il giorno mer 23 nov 2022 alle 17:55:34 +0100, Jean Abou Samra 
>  ha scritto:
>> Le 23/11/2022 à 16:31, Graham King a écrit :
>>> I've tried to get Scholarly working in the past, but failed.  I'm currently 
>>> failing to get lyluatex working.
>>> There are some really promising tools in OpenLilyLib, but they seem to 
>>> require someone with Urs' level of focus and intellect to use them.  This 
>>> thread is raising my hopes once more.
>> I'd suggest you open a new thread about lyLuaTeX, with details
>> of your problems getting it to run.
>> (Note that lyLuaTeX isn't part of openLilyLib.)
>> Best,
>> Jean
> 
> 




lyLuaTex (solved)

2022-11-23 Thread Graham King
(with apologies for the digression on a previous thread[1])

 
I have now succeeded in getting lyLuaTex[2][3] working, and this posting seems 
as good a place as any to record the steps, in case anyone else might find it 
helpful.  This is a summary of a moderately painful learning curve, full of 
interruptions and blind alleys, so I hope I've captured the result properly 
(modulo any spurious linebreaks introduced in the email chain)...
 
My environment:
Ubuntu Linux 18.04
Lilypond 2.23.10 (I think this procedure should work for more up-to-date 
versions)
Texlive packages from Ubuntu (of which most are almost certainly unnecessary 
for this purpose, but never mind): texlive-base, texlive-binaries, 
texlive-extra-utils, texlive-font-utils, texlive-fonts-recommended, 
texlive-lang-english, texlive-latex-base, texlive-latex-extra, 
texlive-latex-recommended, texlive-luatex, texlive-music, texlive-pictures, 
texlive-plain-generic, texlive-pstricks.
Editor: TeXstudio 2.12.6  (my choice; yours may differ)
Install some luaTex extension packages:
mkdir -p ~/texmf/tex/latex
cd ~/texmf/tex/latex
git clone https://github.com/lualatex-tools/luaoptions 

git clone https://github.com/jperon/luatex-tools 

texhash ~/texmf 

Create a wrapper script to suppress TeXstudio complaints about $TERM [4]:
cat > ~/bin/lualatex-wrapper <<-EOF

#! /bin/bash

# Don't indent the previous line!

# Wrapper script for luatex invoked from TeXstudio. 

TERM=dumb /usr/bin/lualatex "$@"
EOF

chmod 755 ~/bin/lualatex-wrapper 

In TeXstudio, select :

In the commands tab:

LuaLaTeX: /home/yourusername/bin/lualatex-wrapper -synctex=1 
-interaction=nonstopmode -shell-escape %.tex

Note that the -shell-escape option opens a security hole if you are going to 
compile latex docs from dodgy sources.  I don't judge ;)

In the build tab:

Default compiler: txs:///lualatex

 

 
Now we should be ready to compile a fairly minimal example document:
\documentclass{article}

% Adjust the program path to match your installation:

\usepackage[program=/usr/local/lilypond/lilypond-2.23.10/bin/lilypond]{lyluatex}

\begin{document}
Here is an example:

\begin{ly}
{a' b' c''}
\addlyrics{a -- b -- c}
\end{ly}

And here is a fragment, \lilypond{\new RhythmicStaff { \time 3/4 c4( c16) c c c 
c c c c \bar "|."}} inserted inline.

\end{document}

(Remember to use  if you want to see the updated PDF)

 HTH.  Grateful thanks to all the contributors listed at [2].

-- Graham
 
 
References:
[1] https://lists.gnu.org/archive/html/lilypond-user/2022-11/msg00403.html 
 
[2] https://github.com/jperon/lyluatex  
[3] https://mirror.ox.ac.uk/sites/ctan.org/support/lyluatex/lyluatex.pdf 

[4] 
https://htmlpreview.github.io/?https://github.com/texstudio-org/texstudio/master/utilities/manual/usermanual_en.html#configuring-the-latex-related-commands
 

Re: lyLuaTex (solved)

2022-11-23 Thread David Bellows
> I have now succeeded in getting lyLuaTex[2][3] working, and this posting 
> seems as good a place as any to record the steps, in case anyone else might 
> find it helpful.  This is a summary of a moderately painful learning curve, 
> full of interruptions and blind alleys, so I hope I've captured the result 
> properly (modulo any spurious linebreaks introduced in the email chain)...

I'm running some fairly recent version of Ubuntu but instead of
installing TeX from the repository I install TeXLive from here:
https://www.tug.org/texlive/
This way I can also keep all the packages much more up to date than
what Ubuntu does. Even after all these years, we're all still better
off installing TeXLive directly instead of through the repositories.

I ran your code (without the pathname for lyluatex since it is part of
TeXLive) with the command:
lualatex --shell-escape example.tex
and it compiled just fine without any errors. I didn't have to install
anything extra, I just keep TeXLive current and everything works.

I use emacs but compile the code from the command line.

On Wed, Nov 23, 2022 at 5:59 PM Graham King  wrote:
>
> (with apologies for the digression on a previous thread[1])
>
>
> I have now succeeded in getting lyLuaTex[2][3] working, and this posting 
> seems as good a place as any to record the steps, in case anyone else might 
> find it helpful.  This is a summary of a moderately painful learning curve, 
> full of interruptions and blind alleys, so I hope I've captured the result 
> properly (modulo any spurious linebreaks introduced in the email chain)...
>
> My environment:
>
> Ubuntu Linux 18.04
> Lilypond 2.23.10 (I think this procedure should work for more up-to-date 
> versions)
> Texlive packages from Ubuntu (of which most are almost certainly unnecessary 
> for this purpose, but never mind): texlive-base, texlive-binaries, 
> texlive-extra-utils, texlive-font-utils, texlive-fonts-recommended, 
> texlive-lang-english, texlive-latex-base, texlive-latex-extra, 
> texlive-latex-recommended, texlive-luatex, texlive-music, texlive-pictures, 
> texlive-plain-generic, texlive-pstricks.
> Editor: TeXstudio 2.12.6  (my choice; yours may differ)
>
> Install some luaTex extension packages:
>
> mkdir -p ~/texmf/tex/latex
> cd ~/texmf/tex/latex
> git clone https://github.com/lualatex-tools/luaoptions
> git clone https://github.com/jperon/luatex-tools
> texhash ~/texmf
>
>
> Create a wrapper script to suppress TeXstudio complaints about $TERM [4]:
>
> cat > ~/bin/lualatex-wrapper <<-EOF
>
> #! /bin/bash
>
> # Don't indent the previous line!
>
> # Wrapper script for luatex invoked from TeXstudio.
>
> TERM=dumb /usr/bin/lualatex "$@"
> EOF
>
> chmod 755 ~/bin/lualatex-wrapper
>
> In TeXstudio, select :
>
> In the commands tab:
>
> LuaLaTeX: /home/yourusername/bin/lualatex-wrapper -synctex=1 
> -interaction=nonstopmode -shell-escape %.tex
>
> Note that the -shell-escape option opens a security hole if you are going to 
> compile latex docs from dodgy sources.  I don't judge ;)
>
> In the build tab:
>
> Default compiler: txs:///lualatex
>
>
>
>
> Now we should be ready to compile a fairly minimal example document:
>
> \documentclass{article}
>
> % Adjust the program path to match your installation:
>
> \usepackage[program=/usr/local/lilypond/lilypond-2.23.10/bin/lilypond]{lyluatex}
>
> \begin{document}
> Here is an example:
>
> \begin{ly}
> {a' b' c''}
> \addlyrics{a -- b -- c}
> \end{ly}
>
> And here is a fragment, \lilypond{\new RhythmicStaff { \time 3/4 c4( c16) c c 
> c c c c c \bar "|."}} inserted inline.
>
> \end{document}
>
> (Remember to use  if you want to see the updated 
> PDF)
>
>  HTH.  Grateful thanks to all the contributors listed at [2].
>
> -- Graham
>
>
> References:
> [1] https://lists.gnu.org/archive/html/lilypond-user/2022-11/msg00403.html
> [2] https://github.com/jperon/lyluatex
> [3] https://mirror.ox.ac.uk/sites/ctan.org/support/lyluatex/lyluatex.pdf
> [4] 
> https://htmlpreview.github.io/?https://github.com/texstudio-org/texstudio/master/utilities/manual/usermanual_en.html#configuring-the-latex-related-commands
>