lilypond-user
[Top][All Lists]
Advanced

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

Re: Mix MusixTex and LilyPond


From: Hartmut Leister
Subject: Re: Mix MusixTex and LilyPond
Date: Mon, 13 Feb 2012 15:55:14 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1

Hello again,

after some tries I wrote a little bash script, which creates a PDF from
a TEX document holding both MusixTex (MT) and LilyPond (LY) code.
It uses latex, lilypond-book and musixtex. Intermediate files are stored
in a subdir

I decided against including eps files created from MT and LY, since I
found it easier that way. Using pdflatex instead of latex+dvipdf
wouldn't work for me.
I'm sure there's more elegant ways to do this, but that's what does the
job for me :-)

Hope, this helps somebody.

Best wishes
Hartmut

[1] run this in the projects main folder:
#!/bin/bash
SUBDIR=out
FILE=mainfile.tex
FILEDVI=mainfile.dvi
FILEPDF=mainfile.pdf

# remove old files
rm *.mx2
rm -r $SUBDIR

# add directory to TEXINPUTS search path
mkdir $SUBDIR
export TEXINPUTS=.:`pwd`//:

# Lilypond übersetzen
lilypond-book --output=out/ $FILE
cd $SUBDIR

# musixtex übersetzen
latex --interaction nonstopmode  $FILE
musixflx $FILE


# PDF erzeugen
latex --interaction nonstopmode  $FILE
dvipdf $FILEDVI $FILEPDF
echo $FILEDVI "converted to" $FILEPDF
cp $FILEPDF ../$FILEPDF
cd ..

[2] my main latex file:
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}

\usepackage{musixtex}
\startmuflex

% different more specifice commands and includes

\begin{document}

\begin{lilypond}
        % some lilypond code here
\end{lilypond}

% some musixtex code here

\end{document}


-- 
Hartmut Leister <address@hidden>
Hofer Straße 58a, 04317 Leipzig
0175/8491877
http://www-user.tu-chemnitz.de/~harl
--
E-Mails richtig schreiben:
http://www-user.tu-chemnitz.de/~harl/email_nettiquette.php
http://www-user.tu-chemnitz.de/~harl/gpg.php



reply via email to

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