TransWikia.com

Musical notes are not aligned correctly

TeX - LaTeX Asked by Marco on March 4, 2021

I am following a course on music and want to make my notes with LaTeX and MusixTeX. I have 2 staves for 1 instrument and the notes are not alligned vertically. When I put all notes on 1 note line the result is worse. All notes are printed at 1 position.

What do I do wrong or is this normal?

documentclass[twoside,a4paper,10pt]{article}
usepackage[utf8]{inputenc}
usepackage[english,dutch]{babel}
usepackage[T1]{fontenc}
usepackage{musixtex}

begin{document}
begin{music}
instrumentnumber{1}
setstaffs1{2}
startpiece
  notes zh{ceg} | zh{j} en
  notes zh{fhj} | zh{j} en
  notes zh{gik} | zh{k} en
  notes zh{ceg} | zh{l} en
  notes zh{fhj} | zh{m} en
  notes zh{gik} | zh{n} en
  notes zh{ceg} | zh{n} en
  notes zh{fhj} | zh{o} en
  notes zh{gik} | zh{p} en
endpiece
end{music}
end{document}

enter image description here

One Answer

Get rid of the spaces around the |.

documentclass[twoside,a4paper,10pt]{article}
%usepackage[utf8]{inputenc}
%usepackage[english,dutch]{babel}
usepackage[T1]{fontenc}
usepackage{musixtex}

begin{document}
begin{music}
instrumentnumber{1}
setstaffs1{2}
startpiece
  notes zh{ceg}|zh{j} en
  notes zh{fhj}|zh{j} en
  notes zh{gik}|zh{k} en
  notes zh{ceg}|zh{l} en
  notes zh{fhj}|zh{m} en
  notes zh{gik}|zh{n} en
  notes zh{ceg}|zh{n} en
  notes zh{fhj}|zh{o} en
  notes zh{gik}|zh{p} en
endpiece
end{music}
end{document}

enter image description here

Correct answer by Steven B. Segletes on March 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP