In HTML, to get extra horizontal spacing all I would have to do is:

This is textual phrase A   This is textual phrase B

to get the following output:

This is textual phrase A...This is textual Phrase B

. = 1 invisible space character

Question#1: How do you force insert space characters?

Question#2: What is the proper way to fine control horizontal spacing instead of force adding space characters?

  • 2
    What do you want to achieve in the "fine control" you ask about in your second question? If you explained that, it might become an answerable question :) – Mariano Suárez-Álvarez Jul 24 '11 at 4:08
  • Fine control as in I can specify by a metric value instead of calculating how many space characters to insert, The \hspace{5em} example from Werner seems to be the best answer. – Level1Coder Jul 24 '11 at 4:14
  • 1
    You'll find a list of the different kinds of lengths you can specify in LaTeX here. – Werner Jul 24 '11 at 4:23

In answer to your first question: There are many ways of adding specific spaces to text. Some examples include forcing an actual "inter word space" to specifying a regular space length to specifying a length based on an object (text or otherwise). In that order you can use the following:

This is textual phrase A\ \ \ This is textual phrase B% 3 inter word spaces
This is textual phrase A\hspace{5em}This is textual phrase B% space of length 5em
This is textual phrase A\hphantom{spaces}This is textual phrase B% space equivalent to length of word 'spaces'
This is textual phrase A\hfill{}This is textual phrase B% infinitely stretchable space

This is the equivalent output:

Different spaces

Perhaps some of these methods answer your second question. However, in its general context, the answers are probably too many to list here.

  1. In (La)TeX, a 'tie' ~ is the exactly equivelant of   in HTML, say, no-break space. However, it is often misused in documents.

    See here to know: When should I use non-breaking space?

  2. It is a large topic. Generally speaking, it is better to prevent the direct using of most spacing commands in LaTeX documents. Just use semantic commands and define some if necessary. (c.f. Do semantics matter in LaTeX? If not, why not?) That's to say, one should use quote, itemize, verse, quotation, abstract instead of many \, ~, \quad, \qquad, \; or \hspace's. Do fine turning when necessary only.


    % Good


    % Bad
    {\Large Foo}\\


    % Awful

    Possible fine turning:

    % turn the format in preamble
    % ...
  • Would be nice to see the results directly – winklerrr Jan 22 '18 at 12:57

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.