# Improve inline fraction style with Quattrocento font

I'm using the Quattrocento font in a beamer presentation (which my audience likes a lot) but I have a small problem with inline fractions like 33 1/3, which do not look very good. Specifically the "1" and "3" are placed respectively a little too low and too high, and the fraction looks too "wide".

This is the example code you require:

\documentclass{beamer}
\usepackage[sfdefault]{quattrocento}
\usepackage{xfrac}
\begin{document}
\begin{frame}
33\sfrac{1}{3} $33\sfrac{1}{3}$
\end{frame}
\end{document}


The mathmode version looks a bit better but I still don't like it. This happens also with other fractions, 33 1/3 is just an example case. I'm searching for a way to improve the appearance of the inline fraction as specified above: some kind of more compact look.

Since this happens a lot, I'd like a solution that does not clutter the code and also something that works both in normal and mathmode.

I already tried with nicefrac but I think the output is even worse.

I'm open to different approaches like changing the font only for the relevant fractions, as long as the new font doesn't look too different from Quattrocento.

• 33\enspace1/3 – egreg Jun 12 '13 at 14:47
• @egreg I want to keep the xfrac inline look – f.boc Jun 12 '13 at 16:23

I don't have your font, but based on your comment that you would like to shift the 1 and the 3 vertically, I can propose this solution, based on a different font. The v-shift, set to 2pt, may be changed to your taste. EDITED to add an h-shift, per the questioner's request.

\documentclass{beamer}
%\usepackage[sfdefault]{quattrocento}
\usepackage{verbatimbox}
\newlength\vshft
\newlength\hshft
\vshft=2pt
\hshft=1pt
\newcommand\revfrac[2]{%