4

The beams of the following example are not vertically aligned on the same level/staff lines.

Is there any way to achieve vertical alignment?

\documentclass{memoir}
\usepackage{musixtex}

\begin{document}

\begin{music} 
\instrumentnumber{1}%
\setclef1\bass%
\nobarnumbers%
\startextract%
\Notesp%
    \ibu0D0\qb0{.C}%
\enotes\notes%
    \tbbu0\tbu0\qb0C%
    \ibbu0C0\rlap{\qsk\tbbu0}\qb0C%
\enotes\Notesp%
    \tbu0\qb0{.C}%
\enotes\Notes%
    \ibu0D0\qb0C\tbu0\qb0C%
\enotes%
\endextract%
\end{music}

\end{document}

enter image description here

0
1

This seems to work:

\documentclass{article}
\usepackage{musixtex}

\begin{document}

\begin{music}
  \instrumentnumber{1}\setclef1\bass
  \nobarnumbers
  \startextract
    \Notes
      \ibu0C0\qb0{.C}\tbbu0\tqh0C%
    \en
    \Notes
      \ibu0C0\roff{\tbbu0}%
      \qb0C\tbu0\qb0{.C}%
    \en
    \Notes
      \Dqbu CC%
    \en
  \endextract
\end{music}

\end{document}

enter image description here

1
  • Thank you very much. I just changed the spacing commands. Oct 5 '17 at 15:41
1

I don't think this is possible in MusiXTeX. In any case, MusiXTeX is very hard to use and no longer being developed.

You may be able to do this with the PMX preprocessor for MusiXTeX, but I'm not going to learn how to use it just to find out! See section 2.2.11 of the manual pmx276.pdf, for example.

The input to PMX looks more like Lilypond than raw MusiXTeX, so you might as well use lilypond-book instead and get even more control over the notation.

To do this with lilypond-book, give your input file the extension .lytex (not .tex)

\documentclass{memoir}

\begin{document}

\begin{lilypond}
{
  \clef "bass" \omit Staff.TimeSignature \relative c,
  {
    c8.[ c16] c16[ c8.] c8[ c8]
  }
}
\end{lilypond}

\end{document}

Create the .tex file from the .lytex with lilypond-book --pdf foo.lytex. Then run pdflatex foo or however you want to compile foo.tex.

Note, the --pdf option in lilypond-book creates a PDF containing an image of the notation, which is included in the .tex file. The image can be in output other formats as well as .pdf.

See http://lilypond.org/ for full documentation.

enter image description here

2

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.