[metapost] Scientific format for large numbers

Laurence Finston lfinsto1 at gwdg.de
Tue Sep 20 09:49:03 CEST 2005


On Mon, 19 Sep 2005, Richard Vernhes wrote:

> I obtain 3.2x10^4, as expected,
> but x10^4 is written on the line below 3.2.

The basic way of preventing line breaking in TeX is to put material into
an '\hbox':

label(btex \hbox{$3.2\times 10^4$} etex, origin);

This actually works without the '\hbox', though:

label(btex $3.2\times 10^4$ etex, origin);

However, I don't know whether either or both variants would interfere with
LaTeX or the macro packages you're using.

You can put a space before '\times' if you like.  TeX takes care of
spacing in math mode by itself.

Laurence Finston



More information about the metapost mailing list