lilypond-user
[Top][All Lists]
Advanced

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

Re: lyLuaTex (solved)


From: David Bellows
Subject: Re: lyLuaTex (solved)
Date: Wed, 23 Nov 2022 20:16:01 -0800

> 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 <lilypond@tremagi.org.uk> 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 <Options><Configure TeXstudio>:
>
> 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 <Tools><Build and View(F5)> 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
>



reply via email to

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