Converting PMX preprocessed MusiXTeX code to proper LaTeX code











up vote
2
down vote

favorite












I want to include a MusiXTeX script into a normal LaTeX document, in order to be able to add another piece of music to the same output pdf document (which will be one DIN A4 page).



When working only with MusiXTeX, the scripts won't contain a documentclass (e.g. {scrartcl}) or a begin{document}, whereas some commands from MusiXTeX seem to be unnecessary when loading MusiXTeX into LaTeX as a package (usepackage{musixtex}) (I think this holds true for the input commands) or even error causing (such as nopagenumbers or bye).



Let's take the following PMX preprocessed MusiXTeX code as an example:



%%%%%%%%%%%%%%%%%
%
% Saabund.tex
%
%%%%%%%%%%%%%%%%
input musixtex
input pmx
setmaxslurs{24}setmaxinstruments{24}%
normalmusicsize%
nopagenumbers
tracingstats=2relax
hsize=524pt
vsize740pt
defnbinstruments{1}
setstaffs11
setclef10
setname1{ }
generalsignature{-1}%
generalmetermeterC%
parindent 0pt
elemskip1ptafterruleskip1.000ptbeforeruleskip0ptrelax
stafftopmarg0ptstaffbotmarg5Interligneinterstaff{10}relax
nostartrule
readmod{Saabund}
nobarnumbers%
input musixlyr %
startmuflexstartpieceaddspaceafterruleskip%
globalparskip 0pt plus 12Interligne minus 99Interligne%
defupstrut{znotes&zcharnote{upamt}{~}en}%
znoteszcharnote{16}{titles{2.0}{}{0}%
{Saabund on j"{a}lle "{o}"{o}}{2.0}{}{0}}en%
% Bar count 1
starteq%
pnotes{4.00}%
pmxlyr{Saa-bund on j"{a}-lle "{o}"{o}, mis mei-le t"{a}h-te-de vaik-set ra-hu toob.}spread{-6}%
hu fen%
pnotes{2.83}qu fqu fen%
% Bar count 2
xbar
pnotes{3.46}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fqu fen%
% Bar count 3
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}qu{'a}en%
pnotes{2.00}ibu1f2qb1ftbu1qb1{'a}en%
% Bar count 4
alaligne
pnotes{2.00}spread{-6}ibu1g{-1}qb1{'a}qb1{`g}qb1ftbu1qb1een%
pnotes{4.00}pcaesura00hu fen%
% Bar count 5
xbar
pnotes{4.00}%
pmxlyr{L~{o}pp-e-nud p"{a}ev-a-t"{o}"{o} ja puh-ke-aeg ta-sa v"{a}rs-keid j~{o}u-de koob.}%
hu{'a}en%
pnotes{2.83}qu{'a}qu aen%
% Bar count 6
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}pcaesura00qu{'a}qu aen%
% Bar count 7
alaligne
endeq%
pnotes{3.46}spread{-6}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fen%
pnotes{2.00}ibl1{'a}2qb1atbl1qb1cen%
% Bar count 8
xbar
pnotes{2.00}ibu1{'b}{-1}qb1cqb1bqb1atbu1qb1{`g}en%
pnotes{4.00}pcaesura00hu{'a}en%
% Bar count 9
xbar
pnotes{4.00}%
pmxlyr{Kuu, s"{a}-rav kuu, h~{o}-be-da-ne kuu uj-ub o-ma val-gus-voos.}%
hl{'c}en%
pnotes{2.83}qu{'a}qu{`f}en%
% Bar count 10
alaligne
pnotes{4.00}spread{-6}pcaesura00hu cen%
pnotes{2.00}ibu1{'a}0qb1{`f}qb1{'c}qb1atbu1qb1{`f}en%
% Bar count 11
xbar
pnotes{4.00}pcaesura00hu cen%
pnotes{2.00}ibu1e{-1}qb1fqb1eqb1dtbu1qb1cen%
% Bar count 12
xbar
pnotes{2.83}qu bqu cen%
pnotes{4.00}hu fen%
Endpiece
vfillejectendmuflex
bye


Even bigger problems arise after editing the script as suggested above (compare end of post). At first all the notes are stacked in about no space, then trying to run musixflx on it, as suggested in this question, throws the error message: "File not found: jobname.mx1". So I am trying to run etex on the script, which on its part can't read the documentclass and stuff...



How to break this vicious circle?





documentclass{scrartcl}
usepackage[utf8]{inputenc} % for characters in lyrics
usepackage{musixtex}

input musixtex
input pmx
setmaxslurs{24}setmaxinstruments{24}%
normalmusicsize%
%nopagenumbers
begin{document}
tracingstats=2relax
hsize=524pt
vsize740pt
defnbinstruments{1}
setstaffs11
setclef10
setname1{ }
generalsignature{-1}%
generalmetermeterC%
parindent 0pt
elemskip1ptafterruleskip1.000ptbeforeruleskip0ptrelax
stafftopmarg0ptstaffbotmarg5Interligneinterstaff{10}relax
nostartrule
readmod{Saabund}
nobarnumbers%
input musixlyr %
startmuflexstartpieceaddspaceafterruleskip%
globalparskip 0pt plus 12Interligne minus 99Interligne%
defupstrut{znotes&zcharnote{upamt}{~}en}%
znoteszcharnote{16}{titles{2.0}{}{0}%
{Saabund on j"{a}lle "{o}"{o}}{2.0}{}{0}}en%
% Bar count 1
starteq%
pnotes{4.00}%
pmxlyr{Saa-bund on j"{a}-lle "{o}"{o}, mis mei-le t"{a}h-te-de vaik-set ra-hu toob.}spread{-6}%
hu fen%
pnotes{2.83}qu fqu fen%
% Bar count 2
xbar
pnotes{3.46}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fqu fen%
% Bar count 3
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}qu{'a}en%
pnotes{2.00}ibu1f2qb1ftbu1qb1{'a}en%
% Bar count 4
alaligne
pnotes{2.00}spread{-6}ibu1g{-1}qb1{'a}qb1{`g}qb1ftbu1qb1een%
pnotes{4.00}pcaesura00hu fen%
% Bar count 5
xbar
pnotes{4.00}%
pmxlyr{L~{o}pp-e-nud p"{a}ev-a-t"{o}"{o} ja puh-ke-aeg ta-sa v"{a}rs-keid j~{o}u-de koob.}%
hu{'a}en%
pnotes{2.83}qu{'a}qu aen%
% Bar count 6
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}pcaesura00qu{'a}qu aen%
% Bar count 7
alaligne
endeq%
pnotes{3.46}spread{-6}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fen%
pnotes{2.00}ibl1{'a}2qb1atbl1qb1cen%
% Bar count 8
xbar
pnotes{2.00}ibu1{'b}{-1}qb1cqb1bqb1atbu1qb1{`g}en%
pnotes{4.00}pcaesura00hu{'a}en%
% Bar count 9
xbar
pnotes{4.00}%
pmxlyr{Kuu, s"{a}-rav kuu, h~{o}-be-da-ne kuu uj-ub o-ma val-gus-voos.}%
hl{'c}en%
pnotes{2.83}qu{'a}qu{`f}en%
% Bar count 10
alaligne
pnotes{4.00}spread{-6}pcaesura00hu cen%
pnotes{2.00}ibu1{'a}0qb1{`f}qb1{'c}qb1atbu1qb1{`f}en%
% Bar count 11
xbar
pnotes{4.00}pcaesura00hu cen%
pnotes{2.00}ibu1e{-1}qb1fqb1eqb1dtbu1qb1cen%
% Bar count 12
xbar
pnotes{2.83}qu bqu cen%
pnotes{4.00}hu fen%
Endpiece
vfillejectendmuflex
%bye
end{document}









share|improve this question
























  • Could someone add a PMX tag, please?
    – mattu
    Apr 13 at 18:57















up vote
2
down vote

favorite












I want to include a MusiXTeX script into a normal LaTeX document, in order to be able to add another piece of music to the same output pdf document (which will be one DIN A4 page).



When working only with MusiXTeX, the scripts won't contain a documentclass (e.g. {scrartcl}) or a begin{document}, whereas some commands from MusiXTeX seem to be unnecessary when loading MusiXTeX into LaTeX as a package (usepackage{musixtex}) (I think this holds true for the input commands) or even error causing (such as nopagenumbers or bye).



Let's take the following PMX preprocessed MusiXTeX code as an example:



%%%%%%%%%%%%%%%%%
%
% Saabund.tex
%
%%%%%%%%%%%%%%%%
input musixtex
input pmx
setmaxslurs{24}setmaxinstruments{24}%
normalmusicsize%
nopagenumbers
tracingstats=2relax
hsize=524pt
vsize740pt
defnbinstruments{1}
setstaffs11
setclef10
setname1{ }
generalsignature{-1}%
generalmetermeterC%
parindent 0pt
elemskip1ptafterruleskip1.000ptbeforeruleskip0ptrelax
stafftopmarg0ptstaffbotmarg5Interligneinterstaff{10}relax
nostartrule
readmod{Saabund}
nobarnumbers%
input musixlyr %
startmuflexstartpieceaddspaceafterruleskip%
globalparskip 0pt plus 12Interligne minus 99Interligne%
defupstrut{znotes&zcharnote{upamt}{~}en}%
znoteszcharnote{16}{titles{2.0}{}{0}%
{Saabund on j"{a}lle "{o}"{o}}{2.0}{}{0}}en%
% Bar count 1
starteq%
pnotes{4.00}%
pmxlyr{Saa-bund on j"{a}-lle "{o}"{o}, mis mei-le t"{a}h-te-de vaik-set ra-hu toob.}spread{-6}%
hu fen%
pnotes{2.83}qu fqu fen%
% Bar count 2
xbar
pnotes{3.46}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fqu fen%
% Bar count 3
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}qu{'a}en%
pnotes{2.00}ibu1f2qb1ftbu1qb1{'a}en%
% Bar count 4
alaligne
pnotes{2.00}spread{-6}ibu1g{-1}qb1{'a}qb1{`g}qb1ftbu1qb1een%
pnotes{4.00}pcaesura00hu fen%
% Bar count 5
xbar
pnotes{4.00}%
pmxlyr{L~{o}pp-e-nud p"{a}ev-a-t"{o}"{o} ja puh-ke-aeg ta-sa v"{a}rs-keid j~{o}u-de koob.}%
hu{'a}en%
pnotes{2.83}qu{'a}qu aen%
% Bar count 6
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}pcaesura00qu{'a}qu aen%
% Bar count 7
alaligne
endeq%
pnotes{3.46}spread{-6}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fen%
pnotes{2.00}ibl1{'a}2qb1atbl1qb1cen%
% Bar count 8
xbar
pnotes{2.00}ibu1{'b}{-1}qb1cqb1bqb1atbu1qb1{`g}en%
pnotes{4.00}pcaesura00hu{'a}en%
% Bar count 9
xbar
pnotes{4.00}%
pmxlyr{Kuu, s"{a}-rav kuu, h~{o}-be-da-ne kuu uj-ub o-ma val-gus-voos.}%
hl{'c}en%
pnotes{2.83}qu{'a}qu{`f}en%
% Bar count 10
alaligne
pnotes{4.00}spread{-6}pcaesura00hu cen%
pnotes{2.00}ibu1{'a}0qb1{`f}qb1{'c}qb1atbu1qb1{`f}en%
% Bar count 11
xbar
pnotes{4.00}pcaesura00hu cen%
pnotes{2.00}ibu1e{-1}qb1fqb1eqb1dtbu1qb1cen%
% Bar count 12
xbar
pnotes{2.83}qu bqu cen%
pnotes{4.00}hu fen%
Endpiece
vfillejectendmuflex
bye


Even bigger problems arise after editing the script as suggested above (compare end of post). At first all the notes are stacked in about no space, then trying to run musixflx on it, as suggested in this question, throws the error message: "File not found: jobname.mx1". So I am trying to run etex on the script, which on its part can't read the documentclass and stuff...



How to break this vicious circle?





documentclass{scrartcl}
usepackage[utf8]{inputenc} % for characters in lyrics
usepackage{musixtex}

input musixtex
input pmx
setmaxslurs{24}setmaxinstruments{24}%
normalmusicsize%
%nopagenumbers
begin{document}
tracingstats=2relax
hsize=524pt
vsize740pt
defnbinstruments{1}
setstaffs11
setclef10
setname1{ }
generalsignature{-1}%
generalmetermeterC%
parindent 0pt
elemskip1ptafterruleskip1.000ptbeforeruleskip0ptrelax
stafftopmarg0ptstaffbotmarg5Interligneinterstaff{10}relax
nostartrule
readmod{Saabund}
nobarnumbers%
input musixlyr %
startmuflexstartpieceaddspaceafterruleskip%
globalparskip 0pt plus 12Interligne minus 99Interligne%
defupstrut{znotes&zcharnote{upamt}{~}en}%
znoteszcharnote{16}{titles{2.0}{}{0}%
{Saabund on j"{a}lle "{o}"{o}}{2.0}{}{0}}en%
% Bar count 1
starteq%
pnotes{4.00}%
pmxlyr{Saa-bund on j"{a}-lle "{o}"{o}, mis mei-le t"{a}h-te-de vaik-set ra-hu toob.}spread{-6}%
hu fen%
pnotes{2.83}qu fqu fen%
% Bar count 2
xbar
pnotes{3.46}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fqu fen%
% Bar count 3
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}qu{'a}en%
pnotes{2.00}ibu1f2qb1ftbu1qb1{'a}en%
% Bar count 4
alaligne
pnotes{2.00}spread{-6}ibu1g{-1}qb1{'a}qb1{`g}qb1ftbu1qb1een%
pnotes{4.00}pcaesura00hu fen%
% Bar count 5
xbar
pnotes{4.00}%
pmxlyr{L~{o}pp-e-nud p"{a}ev-a-t"{o}"{o} ja puh-ke-aeg ta-sa v"{a}rs-keid j~{o}u-de koob.}%
hu{'a}en%
pnotes{2.83}qu{'a}qu aen%
% Bar count 6
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}pcaesura00qu{'a}qu aen%
% Bar count 7
alaligne
endeq%
pnotes{3.46}spread{-6}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fen%
pnotes{2.00}ibl1{'a}2qb1atbl1qb1cen%
% Bar count 8
xbar
pnotes{2.00}ibu1{'b}{-1}qb1cqb1bqb1atbu1qb1{`g}en%
pnotes{4.00}pcaesura00hu{'a}en%
% Bar count 9
xbar
pnotes{4.00}%
pmxlyr{Kuu, s"{a}-rav kuu, h~{o}-be-da-ne kuu uj-ub o-ma val-gus-voos.}%
hl{'c}en%
pnotes{2.83}qu{'a}qu{`f}en%
% Bar count 10
alaligne
pnotes{4.00}spread{-6}pcaesura00hu cen%
pnotes{2.00}ibu1{'a}0qb1{`f}qb1{'c}qb1atbu1qb1{`f}en%
% Bar count 11
xbar
pnotes{4.00}pcaesura00hu cen%
pnotes{2.00}ibu1e{-1}qb1fqb1eqb1dtbu1qb1cen%
% Bar count 12
xbar
pnotes{2.83}qu bqu cen%
pnotes{4.00}hu fen%
Endpiece
vfillejectendmuflex
%bye
end{document}









share|improve this question
























  • Could someone add a PMX tag, please?
    – mattu
    Apr 13 at 18:57













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I want to include a MusiXTeX script into a normal LaTeX document, in order to be able to add another piece of music to the same output pdf document (which will be one DIN A4 page).



When working only with MusiXTeX, the scripts won't contain a documentclass (e.g. {scrartcl}) or a begin{document}, whereas some commands from MusiXTeX seem to be unnecessary when loading MusiXTeX into LaTeX as a package (usepackage{musixtex}) (I think this holds true for the input commands) or even error causing (such as nopagenumbers or bye).



Let's take the following PMX preprocessed MusiXTeX code as an example:



%%%%%%%%%%%%%%%%%
%
% Saabund.tex
%
%%%%%%%%%%%%%%%%
input musixtex
input pmx
setmaxslurs{24}setmaxinstruments{24}%
normalmusicsize%
nopagenumbers
tracingstats=2relax
hsize=524pt
vsize740pt
defnbinstruments{1}
setstaffs11
setclef10
setname1{ }
generalsignature{-1}%
generalmetermeterC%
parindent 0pt
elemskip1ptafterruleskip1.000ptbeforeruleskip0ptrelax
stafftopmarg0ptstaffbotmarg5Interligneinterstaff{10}relax
nostartrule
readmod{Saabund}
nobarnumbers%
input musixlyr %
startmuflexstartpieceaddspaceafterruleskip%
globalparskip 0pt plus 12Interligne minus 99Interligne%
defupstrut{znotes&zcharnote{upamt}{~}en}%
znoteszcharnote{16}{titles{2.0}{}{0}%
{Saabund on j"{a}lle "{o}"{o}}{2.0}{}{0}}en%
% Bar count 1
starteq%
pnotes{4.00}%
pmxlyr{Saa-bund on j"{a}-lle "{o}"{o}, mis mei-le t"{a}h-te-de vaik-set ra-hu toob.}spread{-6}%
hu fen%
pnotes{2.83}qu fqu fen%
% Bar count 2
xbar
pnotes{3.46}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fqu fen%
% Bar count 3
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}qu{'a}en%
pnotes{2.00}ibu1f2qb1ftbu1qb1{'a}en%
% Bar count 4
alaligne
pnotes{2.00}spread{-6}ibu1g{-1}qb1{'a}qb1{`g}qb1ftbu1qb1een%
pnotes{4.00}pcaesura00hu fen%
% Bar count 5
xbar
pnotes{4.00}%
pmxlyr{L~{o}pp-e-nud p"{a}ev-a-t"{o}"{o} ja puh-ke-aeg ta-sa v"{a}rs-keid j~{o}u-de koob.}%
hu{'a}en%
pnotes{2.83}qu{'a}qu aen%
% Bar count 6
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}pcaesura00qu{'a}qu aen%
% Bar count 7
alaligne
endeq%
pnotes{3.46}spread{-6}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fen%
pnotes{2.00}ibl1{'a}2qb1atbl1qb1cen%
% Bar count 8
xbar
pnotes{2.00}ibu1{'b}{-1}qb1cqb1bqb1atbu1qb1{`g}en%
pnotes{4.00}pcaesura00hu{'a}en%
% Bar count 9
xbar
pnotes{4.00}%
pmxlyr{Kuu, s"{a}-rav kuu, h~{o}-be-da-ne kuu uj-ub o-ma val-gus-voos.}%
hl{'c}en%
pnotes{2.83}qu{'a}qu{`f}en%
% Bar count 10
alaligne
pnotes{4.00}spread{-6}pcaesura00hu cen%
pnotes{2.00}ibu1{'a}0qb1{`f}qb1{'c}qb1atbu1qb1{`f}en%
% Bar count 11
xbar
pnotes{4.00}pcaesura00hu cen%
pnotes{2.00}ibu1e{-1}qb1fqb1eqb1dtbu1qb1cen%
% Bar count 12
xbar
pnotes{2.83}qu bqu cen%
pnotes{4.00}hu fen%
Endpiece
vfillejectendmuflex
bye


Even bigger problems arise after editing the script as suggested above (compare end of post). At first all the notes are stacked in about no space, then trying to run musixflx on it, as suggested in this question, throws the error message: "File not found: jobname.mx1". So I am trying to run etex on the script, which on its part can't read the documentclass and stuff...



How to break this vicious circle?





documentclass{scrartcl}
usepackage[utf8]{inputenc} % for characters in lyrics
usepackage{musixtex}

input musixtex
input pmx
setmaxslurs{24}setmaxinstruments{24}%
normalmusicsize%
%nopagenumbers
begin{document}
tracingstats=2relax
hsize=524pt
vsize740pt
defnbinstruments{1}
setstaffs11
setclef10
setname1{ }
generalsignature{-1}%
generalmetermeterC%
parindent 0pt
elemskip1ptafterruleskip1.000ptbeforeruleskip0ptrelax
stafftopmarg0ptstaffbotmarg5Interligneinterstaff{10}relax
nostartrule
readmod{Saabund}
nobarnumbers%
input musixlyr %
startmuflexstartpieceaddspaceafterruleskip%
globalparskip 0pt plus 12Interligne minus 99Interligne%
defupstrut{znotes&zcharnote{upamt}{~}en}%
znoteszcharnote{16}{titles{2.0}{}{0}%
{Saabund on j"{a}lle "{o}"{o}}{2.0}{}{0}}en%
% Bar count 1
starteq%
pnotes{4.00}%
pmxlyr{Saa-bund on j"{a}-lle "{o}"{o}, mis mei-le t"{a}h-te-de vaik-set ra-hu toob.}spread{-6}%
hu fen%
pnotes{2.83}qu fqu fen%
% Bar count 2
xbar
pnotes{3.46}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fqu fen%
% Bar count 3
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}qu{'a}en%
pnotes{2.00}ibu1f2qb1ftbu1qb1{'a}en%
% Bar count 4
alaligne
pnotes{2.00}spread{-6}ibu1g{-1}qb1{'a}qb1{`g}qb1ftbu1qb1een%
pnotes{4.00}pcaesura00hu fen%
% Bar count 5
xbar
pnotes{4.00}%
pmxlyr{L~{o}pp-e-nud p"{a}ev-a-t"{o}"{o} ja puh-ke-aeg ta-sa v"{a}rs-keid j~{o}u-de koob.}%
hu{'a}en%
pnotes{2.83}qu{'a}qu aen%
% Bar count 6
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}pcaesura00qu{'a}qu aen%
% Bar count 7
alaligne
endeq%
pnotes{3.46}spread{-6}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fen%
pnotes{2.00}ibl1{'a}2qb1atbl1qb1cen%
% Bar count 8
xbar
pnotes{2.00}ibu1{'b}{-1}qb1cqb1bqb1atbu1qb1{`g}en%
pnotes{4.00}pcaesura00hu{'a}en%
% Bar count 9
xbar
pnotes{4.00}%
pmxlyr{Kuu, s"{a}-rav kuu, h~{o}-be-da-ne kuu uj-ub o-ma val-gus-voos.}%
hl{'c}en%
pnotes{2.83}qu{'a}qu{`f}en%
% Bar count 10
alaligne
pnotes{4.00}spread{-6}pcaesura00hu cen%
pnotes{2.00}ibu1{'a}0qb1{`f}qb1{'c}qb1atbu1qb1{`f}en%
% Bar count 11
xbar
pnotes{4.00}pcaesura00hu cen%
pnotes{2.00}ibu1e{-1}qb1fqb1eqb1dtbu1qb1cen%
% Bar count 12
xbar
pnotes{2.83}qu bqu cen%
pnotes{4.00}hu fen%
Endpiece
vfillejectendmuflex
%bye
end{document}









share|improve this question















I want to include a MusiXTeX script into a normal LaTeX document, in order to be able to add another piece of music to the same output pdf document (which will be one DIN A4 page).



When working only with MusiXTeX, the scripts won't contain a documentclass (e.g. {scrartcl}) or a begin{document}, whereas some commands from MusiXTeX seem to be unnecessary when loading MusiXTeX into LaTeX as a package (usepackage{musixtex}) (I think this holds true for the input commands) or even error causing (such as nopagenumbers or bye).



Let's take the following PMX preprocessed MusiXTeX code as an example:



%%%%%%%%%%%%%%%%%
%
% Saabund.tex
%
%%%%%%%%%%%%%%%%
input musixtex
input pmx
setmaxslurs{24}setmaxinstruments{24}%
normalmusicsize%
nopagenumbers
tracingstats=2relax
hsize=524pt
vsize740pt
defnbinstruments{1}
setstaffs11
setclef10
setname1{ }
generalsignature{-1}%
generalmetermeterC%
parindent 0pt
elemskip1ptafterruleskip1.000ptbeforeruleskip0ptrelax
stafftopmarg0ptstaffbotmarg5Interligneinterstaff{10}relax
nostartrule
readmod{Saabund}
nobarnumbers%
input musixlyr %
startmuflexstartpieceaddspaceafterruleskip%
globalparskip 0pt plus 12Interligne minus 99Interligne%
defupstrut{znotes&zcharnote{upamt}{~}en}%
znoteszcharnote{16}{titles{2.0}{}{0}%
{Saabund on j"{a}lle "{o}"{o}}{2.0}{}{0}}en%
% Bar count 1
starteq%
pnotes{4.00}%
pmxlyr{Saa-bund on j"{a}-lle "{o}"{o}, mis mei-le t"{a}h-te-de vaik-set ra-hu toob.}spread{-6}%
hu fen%
pnotes{2.83}qu fqu fen%
% Bar count 2
xbar
pnotes{3.46}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fqu fen%
% Bar count 3
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}qu{'a}en%
pnotes{2.00}ibu1f2qb1ftbu1qb1{'a}en%
% Bar count 4
alaligne
pnotes{2.00}spread{-6}ibu1g{-1}qb1{'a}qb1{`g}qb1ftbu1qb1een%
pnotes{4.00}pcaesura00hu fen%
% Bar count 5
xbar
pnotes{4.00}%
pmxlyr{L~{o}pp-e-nud p"{a}ev-a-t"{o}"{o} ja puh-ke-aeg ta-sa v"{a}rs-keid j~{o}u-de koob.}%
hu{'a}en%
pnotes{2.83}qu{'a}qu aen%
% Bar count 6
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}pcaesura00qu{'a}qu aen%
% Bar count 7
alaligne
endeq%
pnotes{3.46}spread{-6}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fen%
pnotes{2.00}ibl1{'a}2qb1atbl1qb1cen%
% Bar count 8
xbar
pnotes{2.00}ibu1{'b}{-1}qb1cqb1bqb1atbu1qb1{`g}en%
pnotes{4.00}pcaesura00hu{'a}en%
% Bar count 9
xbar
pnotes{4.00}%
pmxlyr{Kuu, s"{a}-rav kuu, h~{o}-be-da-ne kuu uj-ub o-ma val-gus-voos.}%
hl{'c}en%
pnotes{2.83}qu{'a}qu{`f}en%
% Bar count 10
alaligne
pnotes{4.00}spread{-6}pcaesura00hu cen%
pnotes{2.00}ibu1{'a}0qb1{`f}qb1{'c}qb1atbu1qb1{`f}en%
% Bar count 11
xbar
pnotes{4.00}pcaesura00hu cen%
pnotes{2.00}ibu1e{-1}qb1fqb1eqb1dtbu1qb1cen%
% Bar count 12
xbar
pnotes{2.83}qu bqu cen%
pnotes{4.00}hu fen%
Endpiece
vfillejectendmuflex
bye


Even bigger problems arise after editing the script as suggested above (compare end of post). At first all the notes are stacked in about no space, then trying to run musixflx on it, as suggested in this question, throws the error message: "File not found: jobname.mx1". So I am trying to run etex on the script, which on its part can't read the documentclass and stuff...



How to break this vicious circle?





documentclass{scrartcl}
usepackage[utf8]{inputenc} % for characters in lyrics
usepackage{musixtex}

input musixtex
input pmx
setmaxslurs{24}setmaxinstruments{24}%
normalmusicsize%
%nopagenumbers
begin{document}
tracingstats=2relax
hsize=524pt
vsize740pt
defnbinstruments{1}
setstaffs11
setclef10
setname1{ }
generalsignature{-1}%
generalmetermeterC%
parindent 0pt
elemskip1ptafterruleskip1.000ptbeforeruleskip0ptrelax
stafftopmarg0ptstaffbotmarg5Interligneinterstaff{10}relax
nostartrule
readmod{Saabund}
nobarnumbers%
input musixlyr %
startmuflexstartpieceaddspaceafterruleskip%
globalparskip 0pt plus 12Interligne minus 99Interligne%
defupstrut{znotes&zcharnote{upamt}{~}en}%
znoteszcharnote{16}{titles{2.0}{}{0}%
{Saabund on j"{a}lle "{o}"{o}}{2.0}{}{0}}en%
% Bar count 1
starteq%
pnotes{4.00}%
pmxlyr{Saa-bund on j"{a}-lle "{o}"{o}, mis mei-le t"{a}h-te-de vaik-set ra-hu toob.}spread{-6}%
hu fen%
pnotes{2.83}qu fqu fen%
% Bar count 2
xbar
pnotes{3.46}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fqu fen%
% Bar count 3
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}qu{'a}en%
pnotes{2.00}ibu1f2qb1ftbu1qb1{'a}en%
% Bar count 4
alaligne
pnotes{2.00}spread{-6}ibu1g{-1}qb1{'a}qb1{`g}qb1ftbu1qb1een%
pnotes{4.00}pcaesura00hu fen%
% Bar count 5
xbar
pnotes{4.00}%
pmxlyr{L~{o}pp-e-nud p"{a}ev-a-t"{o}"{o} ja puh-ke-aeg ta-sa v"{a}rs-keid j~{o}u-de koob.}%
hu{'a}en%
pnotes{2.83}qu{'a}qu aen%
% Bar count 6
xbar
pnotes{3.46}qlp{'b}en%
pnotes{2.00}cl{'c}en%
pnotes{2.83}pcaesura00qu{'a}qu aen%
% Bar count 7
alaligne
endeq%
pnotes{3.46}spread{-6}qup gen%
pnotes{2.00}cu{'a}en%
pnotes{2.83}pcaesura00qu fen%
pnotes{2.00}ibl1{'a}2qb1atbl1qb1cen%
% Bar count 8
xbar
pnotes{2.00}ibu1{'b}{-1}qb1cqb1bqb1atbu1qb1{`g}en%
pnotes{4.00}pcaesura00hu{'a}en%
% Bar count 9
xbar
pnotes{4.00}%
pmxlyr{Kuu, s"{a}-rav kuu, h~{o}-be-da-ne kuu uj-ub o-ma val-gus-voos.}%
hl{'c}en%
pnotes{2.83}qu{'a}qu{`f}en%
% Bar count 10
alaligne
pnotes{4.00}spread{-6}pcaesura00hu cen%
pnotes{2.00}ibu1{'a}0qb1{`f}qb1{'c}qb1atbu1qb1{`f}en%
% Bar count 11
xbar
pnotes{4.00}pcaesura00hu cen%
pnotes{2.00}ibu1e{-1}qb1fqb1eqb1dtbu1qb1cen%
% Bar count 12
xbar
pnotes{2.83}qu bqu cen%
pnotes{4.00}hu fen%
Endpiece
vfillejectendmuflex
%bye
end{document}






music musixtex pmx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









Alan Munn

157k27421695




157k27421695










asked Apr 13 at 18:56









mattu

215




215












  • Could someone add a PMX tag, please?
    – mattu
    Apr 13 at 18:57


















  • Could someone add a PMX tag, please?
    – mattu
    Apr 13 at 18:57
















Could someone add a PMX tag, please?
– mattu
Apr 13 at 18:57




Could someone add a PMX tag, please?
– mattu
Apr 13 at 18:57















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f426430%2fconverting-pmx-preprocessed-musixtex-code-to-proper-latex-code%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f426430%2fconverting-pmx-preprocessed-musixtex-code-to-proper-latex-code%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

サソリ

広島県道265号伴広島線

Accessing regular linux commands in Huawei's Dopra Linux