10

Seems that when using the eulervm package the % symbol is taken from computer modern. I find this a bit suprising and not so suiting. The percentage symbol is really thin...

Does anyone know of some good looking alternatives to this? At least I don't think I have missed any library parameters for it.

\documentclass{article}
\usepackage[euler-digits]{eulervm}
\begin{document}
$40\%$
\end{document}

enter image description here

Edit: Perhaps something can be built using the 0 symbol from Euler and if so can such a build be made to be used automagicly for %-symbol in math mode?

1
  • 4
    I'm afraid the Euler fonts don't have a suiting percent sign.
    – egreg
    Oct 3, 2013 at 14:20

2 Answers 2

10

use xelatex or lualatex and the new Euler font from https://github.com/khaledhosny/euler-otf/blob/master/euler.otf

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Neo Euler}
\begin{document}
40\%
\end{document}

and also for math:

\documentclass[border=20pt]{standalone}
\usepackage{unicode-math}
\setmainfont{Neo Euler}
\setmathfont{Neo Euler}
\setmathfont[range={\mathit->\mathup}]{Neo Euler}% Euler has no italic
\begin{document}
$40\% foo$
\end{document}

enter image description here

7
  • 1
    Interesting, but won't this mean sacrificing a lot of math specific benefits that comes with the eulervm package? I am thinking of Euler version of sum symbols and such things.
    – jonalv
    Oct 4, 2013 at 8:28
  • why should it??
    – user2478
    Oct 4, 2013 at 8:37
  • Well put. So a package is not needed to mess with such things? I guess I will have to try it out and stop worrying :)
    – jonalv
    Oct 4, 2013 at 8:56
  • The font has a very nice looking % symbol, sadly though it does not seem to do letters at all. My formulas now lost all letters... :(
    – jonalv
    Oct 4, 2013 at 9:49
  • see my edited answer for math. It should help. if not give an example of what you did
    – user2478
    Oct 4, 2013 at 9:57
7

You could grow your own, using the 0 glyphs from eulervm. You can tweak the numbers to suit.

\documentclass{article}
\usepackage[euler-digits]{eulervm}
\usepackage{scalerel}
\usepackage{stackengine}
\begin{document}
\newcommand\pct{\vstretch{.8}{\stackengine{1ex}%
  {$\stretchrel*{/}{\%}\kern-3pt\scriptscriptstyle0$}
  {$\kern-.6pt\scriptscriptstyle0$}{O}{l}{F}{F}{L}}}
$40\pct$
\end{document}

enter image description here

2
  • 1
    Nice, is it possible to get this \pct macro to be called automagicly for % symbol in math mode so one don't have to remember to write \pct?
    – jonalv
    Oct 4, 2013 at 7:58
  • 5
    @jonalv \DeclareRobustCommand{\%}{\ifmmode\pct\else\char`\% \fi}
    – egreg
    Oct 4, 2013 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .