Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I set the length of 1ex? I tried \setlength{1ex}{4.40999pt} but I get errors.

share|improve this question
4  
ex is a font-dependent unit of measurement. See Which measurement units should one use in LaTeX? and What are the various units (ex, in, pt, etc.) expressed in mm? –  percusse Aug 12 '12 at 20:01
1  
... and what exactly do you need it for? Maybe there is some other way than changing 1ex which is really impossible. –  tohecz Aug 12 '12 at 20:12
    
Are you trying to change the font size? –  Brent.Longborough Aug 12 '12 at 20:16
    
shouldn't it be enough to set \fontdimen5 to some value? –  topskip Aug 12 '12 at 21:06
1  
@egreg I'm not sure what you mean. A quick test suggests you can alter \fontdimen5. Whether it's a good idea is another thing entirely. –  Joseph Wright Aug 13 '12 at 7:53

1 Answer 1

up vote 4 down vote accepted

As already mentioned in the comments: ex is a font dependant value and you change it by changing \fontdimen5:

\documentclass[]{scrartcl}
\usepackage[T1]{fontenc}

\begin{document}
a\hspace{1ex}b

\fontdimen5\font=1cm
a\hspace{1ex}b

\fontdimen5\font=2cm
a\hspace{1ex}b

\bfseries 
a\hspace{1ex}b 

\normalfont
a\hspace{1ex}b

\large
a\hspace{1ex}b

\small
a\hspace{1ex}b

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.