[l2h] What is a good way to introduce five or six consecutive blank spaces within text in a .html file produced using LaTeX2HTML?
Peter Flynn
peter at silmaril.ie
Sat Oct 15 00:23:51 CEST 2011
On 14/10/11 15:44, Pat Somerville wrote:
[...]
> Now for my education can anyone explain to me why in modifying a tag in
> the HyperText Markup (HTML) document source code of the output file of
> the form MyFile.html to include " "
> that the display of such a MyFile.html in both the Konqueror-4.6.00 and
> Mozilla Firefox-6.0.2 Web browsers produced what looked like only about
> two blank spaces instead of the six blank spaces commanded?
"A space" is not a unit of width except when using a monospace
(typewriter) typeface. In normal variable-width typefaces "a space" is a
quantity set by the type designer appropriate for a default word-space.
You cannot use multiple spaces and expect them to multiply widthwise
except when using a monospace typeface.
In HTML, multiple normal space-characters always get collapsed to a
single space (except in monospace formats like the pre element type). In
variable-width typefaces, multiple non-breaking spaces will produce a
small increase in white-space but certainly not "six blank spaces"
because there is no such concept as "six blank spaces" because a space
is not a unit of measurement.
A non-breaking space is what it says: it replaces a space where you want
a single space to appear, but the line must never be broken at that
point. Using multiple instances of them to try and align material is
usually pointless because they will create different results in
different browsers and different typefaces.
If you need to align material, use a table; or if you want to force a
blank space of a known width, use a span element and set its style to
use margin-right of the required dimension, eg
<span style="margin-right:6em"></span>
Some browsers may elide this, so you might have to use
<span style="margin-right:5em"> </span>
///Peter
More information about the latex2html
mailing list