2

I love LaTeX. Unfortunatly some years passed since I last used it. Now I want to layout a leaflet with several songs and nodes. I found musixtex which seems to work awesome. The only thing I do not understand:

  • How can I use two column mode (with multicols package) automatically so it breaks one musixtex line into two (or more) if it does not fit into one column?

As an example my script

\documentclass{article}
\usepackage{musixtex}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}

\begin{music}
\generalsignature{1}
\startextract
\NOtes\zsong{Nun }\qu g\en
\NOtes\zsong{dan }\qu g\en
\NOtes\zsong{ket }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\bar
\endextract
\end{music}

\begin{music}
\generalsignature{1}
\startextract
%\geometricskipscale
\NOtes\zsong{Nun }\qu g\en
\NOtes\zsong{dan }\qu g\en
\NOtes\zsong{ket }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\NOtes\zsong{alle- }\qu h\en
\bar
\endextract
\end{music}

\end{multicols}

\end{document}
1

My impression is that this measures are too "full". This is evident from a warning message while generating the .mx2 file:

This shouldn't happen ! Too few bars or \mulooseness too large ?

It looks fine in twocolumn mode which gives wider columns:

\documentclass[twocolumn]{article}
\usepackage{multicol,lipsum,musixtex}
\begin{document}


\lipsum[1]

\begin{music}
\parindent0ex
\generalsignature{1}
%\hsize=\columnwidth
\startpiece%
\Notes\zsong{Nun}\qu g%
\zsong{dan}\qu g%
\zsong{ket}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h\en%
\bar%
\Notes\zsong{Nun }\qu g%
\zsong{dan}\qu g%
\zsong{ket}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h\en%
\mulooseness=1%
\Stoppiece%
\end{music}
\medskip


\lipsum[1-2]
\end{document}

enter image description here


You can also make it work with manual line breaks in narrow columns.

\documentclass{article}
\usepackage{multicol,lipsum,musixtex}
\begin{document}


\begin{multicols}{2}
\lipsum[1]

\begin{music}
\parindent0ex
\generalsignature{1}
%\hsize=\columnwidth
\startpiece%
\Notes\zsong{Nun}\qu g%
\zsong{dan}\qu g%
\zsong{ket}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h
\en\zalaligne\Notes%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h\en%
\bar%
\Notes\zsong{Nun }\qu g%
\zsong{dan}\qu g%
\zsong{ket}\qu h%
\en\zalaligne\Notes%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h%
\zsong{alle-}\qu h\en%
%\mulooseness=1%
\Stoppiece%
\end{music}
\medskip


\lipsum[1-2]
\end{multicols}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.