Musixtex slur starts before note

I Try to Write some notes with a slur but the slur starts before the note what I'm doing wrong?

\documentclass{standalone}
\usepackage{musixtex}
\begin{document}
\begin{music}
\startpiece
\NOtes \qu {h}  \Dqbu hh \cu g \qu{f}  \islurd0{g}\cu{g}\enotes \bar
\NOtes  \tslur0{g} \qu g \qp \qp  \enotes
\Endpiece
\end{music}
\end{document}

• I do not know why you were upvoted four times. In the musixtex documentation the consequences of spaces and other mistakes is explained quite well. Jul 16 '21 at 19:29

In musixtex every not required space can cause an error, or better: causes an error. This is how it should be:

\documentclass{standalone}
\usepackage{musixtex}
\begin{document}
\begin{music}
\startpiece
\NOtes\qu h\Dqbu hh\cu g\qu f\islurd0g\cu g\enotes\bar
\NOtes\tslur0g\qu g\qp\qp\enotes
\Endpiece
\end{music}
\end{document}


Point is: if you only want to typeset music, do not use LaTeX, but Plain, then musixflx your file and compile it again with Plain. The reason for this is, that now you cannot add an extra space after the key, which is done normally in Plain, because notes should not start so close to the key.

Placeing cu{g} before the slur helps:

\documentclass{standalone}
\usepackage{musixtex}
\begin{document}
\begin{music}
\startpiece
\NOtes \qu {h}  \Dqbu hh \cu g \qu{f}  \cu{g}\islurd0{g}\enotes \bar
\NOtes
\tslur0{g} \qu g \qp \qp  \enotes
\Endpiece
\end{music}
\end{document}


• Thanks it is better than before but not 100% perfect. When i do \islurd0{g}\cu{g}\tslur0{g} \qu{g} the slur is closer to the \cu{g}. But for some reason there is a bug with \endnotes or \bar Jul 16 '21 at 16:02