Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Although it should be possible to create a single musical dynamic symbol (like ff for fortissimo or sfz for sforzato) by creating an in-line lilypond-book fragment, hiding the staff etc. and somehow centering these symbols around an invisible note, I was wondering if there was a simpler way to do the same? Is there a workaround in LaTeX for this which would not require invoking lilypond-book for only putting a simple dynamic symbol?

share|improve this question

2 Answers 2

up vote 7 down vote accepted

MusiXTeX uses the normal "bold italic" font for the dynamic marks: {\textbf{\textit{sfz}}, but with a small kern between the letters.

It's so not necessary to load all of MusiXTeX:

\documentclass{article}
\newcommand{\muskern}{\kern-.15ex } % what MusiXTeX does

% if only a couple of dynamic marks are needed, this is easier
\newcommand{\sfz}{\textnormal{\textbf{\textit{s\muskern f\muskern z}}}}

% a more general command
\makeatletter
\newcommand\dynmark[1]{{\normalfont\bfseries\itshape
  \@tfor\next:=#1\do{\put@muskern\next}\/}}
\newcommand{\put@muskern}{\let\put@muskern\muskern}
\makeatother

\begin{document}

X\sfz X

X\dynmark{sfz}X

X\dynmark{ppp}X

\end{document}

enter image description here

share|improve this answer
    
Ok, I could have looked up their definitions ;) –  cgnieder May 1 '13 at 17:26
    
Thanks so much for this! Although lilypond's dynamic fonts look by far much more professional, I can live with this solution for the time being. –  Siska Ádám May 1 '13 at 19:10

With musixtex maybe:

\documentclass{article}
\usepackage{musixtex}
\begin{document}

fortissimo: \ff, sforzato: \sF

\end{document}

enter image description here

See section 2.17.5 of the manual.

share|improve this answer
    
The s of sf looks weird, it’s too thin compared to the f. –  doncherry May 1 '13 at 18:11
    
@doncherry I thought so, too. Looking at examples of typeset notes the s is thinner than the f but to me it seems that the s should be bold and the f even more bold... –  cgnieder May 1 '13 at 18:21
    
Hi, I tried this method, but unfortunately it seems that MusiXTeX will not work with the times package. Inserting \usepackage{times} in your code example will halt with an error on my system (TeX Live 2012, Mac OS X 10.6) –  Siska Ádám May 1 '13 at 19:06
    
@SiskaÁdám It works if you load times after musixtex. –  cgnieder May 1 '13 at 19:18
    
Thank you! It really works. Weird... Anyway, I checked the commands that you suggested and their result has almost nothing to do with real dynamic marks (for example, if you check a forte sign in a printed score, you'd see that they get `fatter' around the dash). egreg's solution is also a bit far from perfect, but somehow they are more acceptable. But thanks anyway for the help. –  Siska Ádám May 1 '13 at 19:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.