I want to mention musical piece meter directly in the text, like:

This piece is written in 4/4.

Is there a way to get time signature (4/4) in form of fraction with no fraction bar? I tried musixtex package but when I do:


The fraction is much bigger than the rest of the text. Of course I can try to make it smaller to fit the text but maybe there's a simpler way to do this?

  • 1
    You could do something like \newcommand*\meter[2]{\resizebox*{!}{.7\baselineskip}{\meterfrac{#1}{#2}}} and then use \meter{4}{4} in the text. BTW: \begin{music} and \end{music} isn't actually needed here. – clemens Oct 19 '12 at 13:26
  • Thanks for the tip. (You're right, I checked and environment is not needed - but it was not the reason for meter fraction to be so large.) – nuoritoveri Oct 19 '12 at 14:29
  • btw, isn't C used for 4/4 meter? (I understand that you want a general solution, I'm just making sure that I'm not missing some point.) – yo' Oct 19 '12 at 15:29
  • @tohecz: In my experience there is free variation between the two, as they are interchangeable. – Jon Purdy Oct 19 '12 at 17:54
  • @tohecz C might be used, but it's less popular nowadays (though I think widely understandable) and I have never encountered this in normal text, only in notation (but I don't posses much experience in this field). – nuoritoveri Oct 19 '12 at 22:58

I can propose two solutions:


%%% solution 1

%%% solution 2

This is common time: \setmetera{4}{4}

This is a ternary time: \setmetera{3}{4}


This is common time: \setmeterb{4}{4}

This is a ternary time: \setmeterb{3}{4}

enter image description here

Some comments on the second solution

The definition of \setmeterb uses some low level TeX trickery. I use \ensuremath for being able to use \vcenter that will center the result with respect to the line (the "geometric center" will actually be slightly above the baseline).

In the \vcenter I set an alignment built with the primitive \halign, which avoids all the things LaTeX does with tabular in order to ensure equal spacing between rows, which is exactly what we don't want in this case where the two rows consist only of numbers; in particular the insertion of interline glue is disabled with \offinterlineskip. So the final trick is to set one centered column

\halign{\hfil#\hfil\cr ...}

and then add the two rows, separated by 1pt of white space. The # must actually be ## because we're using it in a definition.

  • 2
    Many thanks, I used solution2 and it looks very nice (I didn't want the fraction to make lines separator larger). – nuoritoveri Oct 19 '12 at 14:31

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.