4

the normal % character is a little bit bigger than numbers so I want to reduce its size by the command {\small }. I tried it with the command \renewcommand{\%}{{\small \%}} but that produces the error: TeX capacity exceeded, sorry [grouping levels=255] \% It's possible to solve it by entering \newcommand{\test}{{\small \%}} but that leaves me to change the expression in around 30 documents with a possibility of making an error myself.

MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\renewcommand{\%}{{\small \%}}
\begin{document}

\%
{\small \%}

(1\%)
(1{\small \%})

\end{document}

An example of the bad looking % charakter (done by changing one command to %\renewcommand{\%}{{\small \%}}:

example of %-size

8

If you want a solution suitable for all sizes you can try (requires graphicx package)

\let\oldpercent\%
\renewcommand{\%}{\scalebox{0.85}{\oldpercent}}

enter image description here

MWE to generate the example:

\documentclass{article}
\usepackage{graphicx}

\let\oldpercent\%
\renewcommand{\%}{\scalebox{0.85}{\oldpercent}}

\begin{document}

\tiny 1\%

\scriptsize 1\%

\footnotesize 1\%

\small 1\%

\normalsize 1\%

\large 1\%

\Large 1\%

\LARGE 1\%

\huge 1\%

\Huge 1\%

\end{document} 
  • 1
    Thanks @David. Without your packages half of the things we can do with TeX wouldn't be doable... :-) – karlkoeller Sep 1 '13 at 15:45
4

You can do

\let\oldpercent\%
\renewcommand{\%}{{\small \oldpercent}}

But note this only does the right thing at normal size, it will always use \small even if the current size is \huge.

  • 1
    I suppose one could cater to the fact that the surrounding text might not be set in "normalsize" by loading the relsize package and setting \renewcommand{\%}{{\smaller \oldpercent}}... :-) – Mico Sep 1 '13 at 14:54

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.