4

to make my problem visible, I have created following simple file:

\documentclass[a4paper,12pt]{article}
\usepackage{musixtex}
\setlength{\parindent}{0em}
\begin{document}
\begin{music} 
\startpiece
\notes\nq{hgf}\enotes\alaligne
\notes\nq{hgf}\enotes
\endpiece
\end{music}
\end{document}

Processing this with latex file musixflx file latex file gives a rather nasty output, because between the clef and the first note in the first line, there is nearly no space. The problem does not occur in subsequent lines, and it does not occur when using \startextract ... \endextract instead of \startpiece ... \endpiece, but this is no option for \startextract allows only one line of music. Has anybody any idea, why this happen, and how to fix it?

Best regards, Volker

1

Please try add something like this before \startpiece

\hsize150mm

enter image description here

Below is the updated version of my answer:

If you extend your scores to the length of acutal musical lines, it will shown correctly. However if you'd like to only exhibit what in your example file, you can use \sk or \noteskip to forward one note's distance.\hsk for half note skip.

\qsk for one note head width, \tqsk,\hqsk,\qqsk for two third, half thirds, or one quarter. \bqsk,\btsk,\bhsk to skip backwardly.

Importantly, you'd need package xspace too, or else the bars at the end of the line will scatter apart.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{musixtex}
\usepackage{xspace}

\setlength{\parindent}{0em}
\begin{document}
\begin{music} 
%\hsize150mm % \hsize moves all the lines horizontally to the right 
\startpiece
\notes\hsk\nq{hgf}\enotes\alaligne
\notes\bhsk\nq{hgf}\enotes
\endpiece
\end{music}

\end{document}

I tridd my best, I suggest you still wait for the better answers, I am also curious to see the professional anwser! Jesus bless!

2
  • Hi Paul, thanks for the answer! Yes, there is now more space between clef and first note, but still the first line does not look like the following - what I do expect. – Volker Dec 29 '18 at 13:37
  • @Volker I update the answer, you can keep the question and wait for better and professional answers, I am curious too. – Paul Chen Dec 29 '18 at 20:30
1

I think the difference comes from the \afterruleskip extra space added after each bar. The firstline does not have this space, so you can just add it manually:

\documentclass[a4paper,12pt]{article}
\usepackage{musixtex}
\setlength{\parindent}{0em}
\begin{document}
\begin{music} 
\startpiece \addspace\afterruleskip
\notes\nq{hgf}\enotes\alaligne
\notes\nq{hgf}\enotes
\endpiece
\end{music}
\end{document}

Then the notes on the two lines are aligned.

2
  • Hi, thanks for this! Yes, now it looks as expected! Yet, I still think, this extra coding should not be necessary. – Volker Feb 11 '19 at 13:41
  • Yet, in musixtex official documentation, almost all \startpiece are followed with \addspace\afterruleskip, so I think it is necessary. – JPG Feb 11 '19 at 17:36

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.