3

The task is to write music chords, on a staff, using package MusixTex.

MWE shows a way to place a note within a chord marginally to the right in case it overlaps with other ones.

Works OK when notes without sharps or flat are included in the chord (Cmaj6) but when there is an accidental (F7) it appears on the vertical axis of the chord notes.

Moreover when there is more than one accidental in the chord (Bbm7) then they align with each other.

Is there a way to adjust the distance of the accidentals from the notes, or is there another better way to write chords?

\documentclass[12pt]{article}
\usepackage{musixtex}
\begin{document}
\begin{music}
\instrumentnumber{1}
\setstaffs{1}{1}
\setclef{1}{6}
\meterskip5pt
\setsize{1}{\Largevalue}
\startpiece
\Notes\zchar{13}{C\textsuperscript{maj6}}\sk\loff{\zh{{J}{L}{N}}}\wh{a}\en\barre
\Notes\zchar{13}{F\textsuperscript{7}}\sk\loff{\zh{{F}{H}{J}}}\wh{_L}\en\barre
\Notes\zchar{13}{B$\flat$\textsuperscript{m7}}\sk\loff{\zh{_{I}_{K}{M}}}\wh{_a}\en\barre
\endpiece
\end{music}
\end{document}

-

0

For the accidental on a right shifted note use \loffset, and to shift an accidental on chord use \lfl or \lsh. See musixtex documentation for more info.

\documentclass[12pt]{article}
\usepackage{musixtex}
\begin{document}
\begin{music}
\instrumentnumber{1}
\setstaffs{1}{1}
\setclef{1}{6}
\meterskip5pt
\setsize{1}{\Largevalue}
\startpiece
\Notes\zchar{13}{C\textsuperscript{maj6}}\sk\loff{\zh{{J}{L}{N}}}\wh{a}\en\barre
\Notes\zchar{13}{F\textsuperscript{7}}\sk\loff{\zh{{F}{H}{J}}}\loffset{1.0}{\fl L}\wh{L}\en\barre
\Notes\zchar{13}{B$\flat$\textsuperscript{m7}}\sk\loff{\lfl{I}\zh{I}\zh{_{K}{M}}}\loffset{1.5}{\fl a}\wh{a}\en\barre\en\barre
\endpiece
\end{music}
\end{document}

You can adjust the offset to the value you want.

| improve this answer | |

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.