4

The following code produces a strange rendered percentage symbol which looks like this: Strange Percentage Symbol
Here's my code:

\documentclass[12pt, a4paper, twoside, %openright, 
toc=listof, BCOR=5mm, bibliography=totoc, parskip=half]{scrreprt}
\usepackage{helvet}
\usepackage[ngerman]{babel} 
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\begin{document}
11-13\%
\end{document}

Now I used the board search and came across this solution: Combining Helvetica and Symbol fonts with mathspec But since I'm not too familiar with all these LaTeX packages and I'm not using them, I didn't want to just add them to my code, but wanted to know, which lines i need to add to get my code working without possibly changing anything else which i might not want. Thanks in advance

18
  • 2
    That can't be exactly the code that produced the output. I guess you meant to escape the % with a backslash?
    – Thruston
    Oct 9, 2015 at 13:56
  • yes absolutly, gonna edit!
    – Max
    Oct 9, 2015 at 13:58
  • Loading the package helvet changes the default sans-serif font, but loading the package does not change the default text font from serif to sans-serif. You should try \sffamily 11-13\%. Be sure not to forget to escape the % symbol.
    – Mico
    Oct 9, 2015 at 13:58
  • Could be \textsf{11-13\%}.
    – Sigur
    Oct 9, 2015 at 14:00
  • 1
    Getting a decent matcvh to computer modern might be tricky, as it's so light. The pdf samples at tug.dk/FontCatalogue/seriffonts.html do have the percent sign, from those you might try Literaturnaya, but it isn't included by default.
    – Chris H
    Oct 9, 2015 at 15:05

3 Answers 3

4

If you really want the matching % from the original font, but without the "little bow" (as I interpret your comment to Mico), then one option is to define a new \% that paints over the offending "bow". Here, I have made it work for different text size changes.

In the MWE, I define \overlayclr so that you can see what I am painting over (when I set it to red). I show the original \% at the far right, so you can see that the size of the revised glyph matches the original.

\documentclass[12pt, a4paper, twoside, %openright, 
toc=listof, BCOR=5mm, bibliography=totoc, parskip=half]{scrreprt}
\usepackage{helvet}
\usepackage[ngerman]{babel} 
%\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage{graphicx,xcolor,stackengine,scalerel}
\let\svpct\%
\def\overlayclr{white}
\renewcommand{\%}{\scalerel*{\stackon[0pt]{\stackon[0pt]{\normalsize\svpct}{\smash{%
  \textcolor{\overlayclr}{\rotatebox{56.8}{\rule[-4.55pt]{2.5pt}{1.5pt}}}}}}%
  {\smash{\textcolor{\overlayclr}{%
  \rotatebox{27}{\kern-.84pt\rule[-2.5pt]{1.5pt}{2.5pt}}}}}}{\svpct}}
\begin{document}
\Huge11-13\%\quad{\def\overlayclr{red}11-13\%\svpct}\par
\normalsize11-13\%\quad{\def\overlayclr{red}11-13\%\svpct}
\end{document}

enter image description here

1
  • Wow, this looks like a really sick solution! And it also looks like a lot of effort, thank you very much for that! And after all it fulfills my wishes even further than the other two solutions.
    – Max
    Oct 9, 2015 at 16:08
6

You can get the percent sign in whatever family you want by using

\DeclareRobustCommand{\%}{{%
  \mbox{%
    \fontencoding{\encodingdefault}%
    \fontfamily{<family>}%
    \selectfont
    \symbol{`\%}%
  }%
}}

and the only problem is to choose the right <family> name. For Helvetica it would be phv, but the percent symbol would stick out like a sore thumb in a serif font context.

The little bow is customary for serif fonts; among the free ones I can see the Kpfonts and Bookman without it, but the symbol would be again in a non compatible style with the default fonts.

Here's a possible choice for <family>:

enter image description here

If you plan to use \% in math mode, change \mbox into \text (and load amsmath).

And now that you can appreciate the differences in style, stick with the default.

4
  • Quick question: why the double braces?
    – campa
    Oct 9, 2015 at 15:30
  • 2
    @campa In the (unlikely) case it is used as $x_\%$
    – egreg
    Oct 9, 2015 at 15:32
  • thank you very much for your help. This seems to be an even mor appropriate solution than the one provided by mico. i'm going to experiment with that later. Do you know where i can find the <family> name for the literaturnaya font, that @ChrisH suggested?
    – Max
    Oct 9, 2015 at 15:34
  • @Max That would require a quite complex installation on TeX Live. And all for getting this percent sign. Not much different from jkp
    – egreg
    Oct 9, 2015 at 15:49
1

If you want to render the default percent symbol in Helvetica, without changing any other aspect of the text font, you could proceed by inserting the following instructions in the preamble:

\usepackage{helvet}   % select Helvetica as the sans-serif font
\let\origpercent\%    % save the "original" "\%" macro
\renewcommand{\%}{\textsf{\origpercent}}
2
  • Thank you very much, this is what i was looking for. After all the %-symbol now looks a little bit alien in the text. Is there maybe a percent-symbol that looks almost the same like the one in my image but only does not have that little bow?
    – Max
    Oct 9, 2015 at 14:37
  • @Max you'll need to find one from a serif font similar to computer modern, but with separate components. Then you'll need to get it working. Unfortunately % isn't shown in the samples at tug.dk/FontCatalogue/seriffonts.html
    – Chris H
    Oct 9, 2015 at 14:50

You must log in to answer this question.

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