# Set the length of 1ex

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

-
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
... and what exactly do you need it for? Maybe there is some other way than changing 1ex which is really impossible. – yo' 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
@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

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}

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9126444458961487, "perplexity": 2152.840754729875}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-48/segments/1448398447773.21/warc/CC-MAIN-20151124205407-00041-ip-10-71-132-137.ec2.internal.warc.gz"}