Equally space all words

Because the words are equally spaced, they line up like an array, unless I turn on \parindent or \centering. I also added \doublespacing from setspace, since the whole idea is to have room for annotation.

Works across paragraphs. Don't try this in math mode. An optional argument allows the desired word width to be set.

With this solution, \fixlen calls on the recursion routine \fixlenpar, which will filter through the data a paragraph at a time as #1 until it runs out of paragraphs. It passes each paragraph to \fixlenword, which is also a recursion routine that filters through each successive paragraph a word at a time as #1. With each word, it places it in a fixed-width, center-aligned \makebox.

\documentclass{article}
\newcommand\fixlen[2][10ex]{\def\fixwidth{#1}\fixlenpar#2\par\relax}
\long\def\fixlenpar#1\par#2\relax{%
  \fixlenword#1 \relax%
  \ifx\relax#2\relax\def\next{}\else\par\def\next{\fixlenpar#2\relax}\fi\next}
\def\fixlenword#1 #2\relax{%
  \makebox[\fixwidth][c]{#1}%
  \ifx\relax#2\relax\def\next{}\else\ \def\next{\fixlenword#2\relax}\fi\next}

\parindent0pt\relax
\parskip 1em\relax
\usepackage{setspace}
\doublespacing
\begin{document}
\fixlen{%
I want to create a document which I can annotate by hand (that is, write above each word in pencil), but, unfortunately, the word length isn't a good indicator of how long the annotation is. I would like to have each word treated as if they were all of the same length so that the space between the end of one word and the start of the next, next word is the same. I hope I can make this clear

Before:

Some sample text to indicate what I mean.

Note that shorter words, such as to and I have much larger spaces between the words to compensate for their shorter length. Thanks for any help.}

\end{document}

enter image description here


The inter-word spacing is controlled by three parameters; \fontdimen2 (the normal inter-word space), \fontdimen3 (the amount of stretch of the inter-word space), and \fontdimen4 (the amount of shrink). So, one possibility is to change these parameters as required.

\documentclass{article}
\begin{document}

\spaceskip=8\fontdimen2\font plus 1.5\fontdimen3\font
minus 1.5\fontdimen4\font

Some sample text to indicate what I mean.

\end{document}

enter image description here

Tags:

Spacing