4

I am trying to use dynamics marks on my text by using the musixtex package. It works well except for the mezzo piano mark (\mp), which is not recognized. According to the manual (section 2.17.5) my code is correct (http://icking-music-archive.org/software/musixtex/musixdoc.pdf). Can someone spot what is wrong here?

\documentclass{article}
\usepackage{musixtex}
\begin{document}
\pppp, \ppp, \pp, \p, \mf, \f, \ff, \fff, \ffff, \sF % all these work fine
\mp % but this doesn't
\end{document} 

1 Answers1

6

\mp is actually a command defined by \LaTeX itself and it can only be used in maths mode (where it yields ), that's why you get an error. To overwrite the command, just add \let\mp\mezzopiano after \usepackage{musixtex}.

Be aware, that in doing so you overwrite a LaTeX command, that other packages may or may not heavily rely on - or at least expect to work in a certain way.

You could also just use the longer name \mezzopiano if you do not want to overwrite \mp.


As \mp is a LaTeX macro, the package is wary of overwriting it. While all the other commands are defined as you would expect, e.g. mezzo-forte: \def\mf{{\ppff m\p@kern\f@kern f}} in musixtex.tex, mezzo-piano is defined as: \def\mp@{{\ppff m\p@kern p}} (note the @); just after that, the longer command \mezzopiano is defined: \let\mezzopiano\mp@.

Similarly, the macro for sforzando is not called \sf but \sF to avoid clashes with important LaTeX macros (\sf switches to sans serif font). Following that example, you could use \let\mP\mezzopiano instead of \let\mp\mezzopiano, so you do not overwrite standard commands.

\documentclass{article}
\usepackage{musixtex}
\let\mp\mezzopiano
\begin{document}
\pppp, \ppp, \pp, \p, \mf, \f, \ff, \fff, \ffff, \sF
\mp
\end{document} 
moewe
  • 175,683