|
Posted by Jukka K. Korpela on 11/18/05 11:08
"Stefan" <stefan.haier@web.de> wrote:
> does anyone know, how to make a Tabstop at the decimal-point like Word
> can do?
Basically, you don't, but you can simulate it if you are willing to
do some extra work. All methods are more or less awkward, and the method
defined in the HTML specifications does _not_ work. Here's one trick:
- right-pad the numbers in a column of a table so that they have the
same number of characters after the decimal separator; if you don't
like padding with zeros, use
- no-break spaces and a monospace font
- the figure space character and a font that contains it
- <span class="dummy">00</span> with
.dummy { color: white; background: white; } in CSS
(with the risk that indexing robots think you're spamming)
- align the cells to the right (<td align="right"> in each cell,
or some technique that has the same effect - beware of browser
differences then, since e.g. <col align="right"> should not work
though it works on IE)
(Can you make Word present a table with columns aligned on the decimal
separator? I didn't know that. Or do you mean writing something in a tabular-
like manner but not as a table? This is mildly HTML-related, since you could
then take a look at the HTML that Word spits out, first as rendered - does it
preserve the alignment? - and then maybe at the source level if you dare.)
> I did'nt want use the code, gereatet by word, because it is to
> fat.
It can be made smaller by saving as "compact" or "filtered" HTML and by
doing some additional cleanup like removing the <style> element.
> For nearly 1 K of Source-Data, there was generatet a HTML-Doc with
> over 100 K.
I didn't know Source-Data was a temperature!
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
[Back to original message]
|