[XeTeX] XETEX and Lilypond

Alan Munn amunn at gmx.com
Sun Feb 28 21:37:53 CET 2010


On Feb 28, 2010, at 3:23 PM, Fr. Michael Gilmary wrote:
>
>
>
> Hi Raphael:
>
> Here's a sample of your original = document.tex with a couple  
> changes (using the ifxetex package, etc --- change the fonts to suit  
> your needs). Also attached is an engine you can run via TeXShop if  
> you're on Mac (copy it to ~/Library/TeXShop/Engines/ and it should  
> appear in the drop down box for engines ... or you can use the  
> preliminary %!TEX TS-program =  Lilypond-XeLaTeX line as in the  
> included file). Otherwise, just use the lilypond-book as you have  
> learned and it will do as you need.
>
> You might have to look into the engine file to set the path to your  
> Lilypond.app.

Yes.  With a default installation of LilyPond the LILYPONDFOLDER  
should be set to just /Applications not /Applications/LilyPond/#current

Alan


>
>
>
> HTH.
>
>
>
> -- 
> United in adoration of Jesus,
>
>
> fr. michael gilmary, mma
>
> Most Holy Trinity Monastery
> 67 Dugway Road
> Petersham, MA 01366-9725
>
>
> #!/bin/tcsh
> # Updated on 2006/10/17 - Thanks to Marc Schonbrun!
> #
> ##########################
> # HOW TO USE THIS FILE:  #
> ##########################
> #
> # 0) Set the variable LILYPONDFOLDER below to the absolute path
> #    of the folder containing the Lilypond application.
> #    For example, if you have put the Lilypond app in a folder
> #    called Music inside the Applications folder, the path
> #    is /Applications/Music and the line below must read
> #
> #       set LILYPONDFOLDER = /Applications/Music
> #
> #    If Lilypond is installed in the Applications folder,
> #    then just skip this step.
> #
> set LILYPONDFOLDER = /Applications/Lilypond/#current
> set path = ($path $LILYPONDFOLDER/LilyPond.app/Contents/Resources/ 
> bin/)
>
> #
> # 1) Rename this file by dropping the .txt suffix
> #    and put it into your Library/TeXShop/Engines folder.
> #
> # 2) Run the Terminal application (which you find in the Utilities  
> folder)
> #    and, in the Terminal window, type:
> #
> #       cd  ~/Library/TeXShop/Engines
> #
> #    then, press the Enter key and type:
> #
> #       chmod +x Lilypond-LaTeX.engine
> #
> #    and press Enter again. The above command makes this script  
> executable.
> #
> # 3) Switch to TeXShop, open a LaTeX file with Lilypond code,
> #    choose the Lilypond-LaTeX engine and typeset!
> #
> #######
> # HINT
> #######
> #
> # Write:
> #
> #    %!TEX TS-program = Lilypond-LaTeX
> #
> # at the very beginning of your document: this will let TeXShop
> # automatically switch to the right engine!
> #
> #######
> # NOTE about including pictures with \includegraphics:
> #######
> #
> # you may want to include the following in the preamble of your
> # source file:
> #
> #    \usepackage{graphicx}
> #    \graphicspath{{../}}
> #
> # since the generated LaTeX file is put into a subdirectory
> # of the current directory.
> #
> # In general, if your directory structure is as follows
> #
> #   MyLilyPondDocs/
> #   MyLilyPondDocs/lilybook.lytex
> #   MyLilyPondDocs/MyPictures/
> #   MyLilyPondDocs/MyPictures/pic1.eps
> #   ...
> #   MyLilyPondDocs/MyPictures/picn.eps
> #
> #   the preamble of lilybook.lytex should contain:
> #
> #    \graphicspath{{../MyPictures/}}
> #
> # The trailing slash "/" is required!
> #
>
> # Create directory to put all temporary stuff
> mkdir -p "$1:r"-out/
> cd "$1:r"-out
> rm "$1:r".tex
> cd ../
>
> if ({ lilypond-book -I "$1:r"-out --output="$1:r"-out --pdf  "$1" })  
> then
>
>  cd "$1:r"-out
>
>  if ({ xelatex --output-driver="xdvipdfmx -qq -E" "$1" }) then
>        mv "$1:r".pdf ..
>  endif
> endif
> #cp "$1:r".pdf ../
> #open "$1:r".pdf
> <music.tex>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex

-- 
Alan Munn
amunn at gmx.com




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20100228/76724b06/attachment.html>


More information about the XeTeX mailing list