[Tex/LaTex] Word spacing in LaTeX

spacing

How to implement word spacing in LaTeX? For websites this is done with CSS:

word-spacing: 0.5em;

This is for reference about other tags

  • paper: custom
  • layout:
  • layoutoffset:(h,v)=(0.0pt,0.0pt)
  • modes:
  • h-part:(L,W,R)=(0.0pt, 72.26999pt, 0.0pt)
  • v-part:(T,H,B)=(0.0pt, 72.26999pt, 0.0pt)
  • \paperwidth=72.26999pt
  • \paperheight=72.26999pt
  • \textwidth=72.26999pt
  • \textheight=72.26999pt
  • \oddsidemargin=-72.26999pt
  • \evensidemargin=-72.26999pt
  • \topmargin=-109.26999pt

Best Answer

Other answers have pointed to \spaceskip: I think an example might be useful. In the first paragraph, TeX is using the usual justified approach. In paragraph two, I've set up to use a ragged-right margin in much the same way as ragged2e does. This uses the interword space taken from the font. In the third paragraph, I've explicitly set the interword space to 0.5 em (the other ragged-right parameters continue to apply).

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[1]

\parfillskip 0 pt plus 1 fil\relax
\leftskip    0 pt           \relax
\rightskip   0 pt plus 2 em \relax
\spaceskip \fontdimen 2 \font
\lipsum[1]

\spaceskip   0.5 em         \relax
\lipsum[1]

\end{document}
Related Question