Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inline equation overspill

59 views
Skip to first unread message

Tom Sturges

unread,
Sep 30, 2012, 7:41:42 AM9/30/12
to
I have an inline equation, well really its just a number with some units, but its sticking awkwardly outside the margins of the text. How can I get it to sit nicely within the margins?

Here's what the code looks like...

In 2008, low temperature electron transport in graphene was shown to be ballistic, with mobilities as high as $200,000\mbox{cm}^2\mbox{V}^{-1}\mbox{s}^{-1}$ \cite{Du2008}. Additionally, graphene is a two-dimension..........

Thanks for any help =)

Marc van Dongen

unread,
Sep 30, 2012, 8:34:12 AM9/30/12
to
Howsabout:

\documentclass{article}
\usepackage{siunitx}

\begin{document}
In 2008, low temperature electron transport in graphene
was shown to be ballistic,
with mobilities as high as
\SI{20}{\metre^2\per\volt\second}~\cite{Du2008}.
Additionally, graphene is a two-dimension..........
\end{document}

Regards,


Marc van Dongen

Joseph Wright

unread,
Sep 30, 2012, 8:41:48 AM9/30/12
to
On 30/09/2012 13:34, Marc van Dongen wrote:
> \SI{20}{\metre^2\per\volt\second}~\cite{Du2008}.

Better to use \metre\squared\per\volt\second (or an abbreviated form) as
it leaves siunitx free to work 'magic' with the display of the unit.
--
Joseph Wright

Marc van Dongen

unread,
Sep 30, 2012, 9:00:38 AM9/30/12
to
Thanks. I don't use the siunitx package and I obviously haven't studied the documentation!

Regards,


Marc van Dongen

Tom Sturges

unread,
Sep 30, 2012, 11:24:04 AM9/30/12
to
Joseph and Mark, thanks for the solution! That makes a lot more sense than what I'm doing. Appreciated!

Tom Sturges

unread,
Sep 30, 2012, 11:30:46 AM9/30/12
to
oh one other related thing. that works fine but if i wanted to display 200,000 how would i do that? when i write SI{200,000}{\.......\} it shows up as 200.000 (a decimal point, not a comma)

Tom Sturges

unread,
Sep 30, 2012, 11:35:23 AM9/30/12
to
sorry actually that fix didn't work, it still overspills =S and if i include the tilda bit at the end it just drags up even more stuff out of line!

any ideas?

thanks
Message has been deleted

Enrico Gregorio

unread,
Sep 30, 2012, 4:54:16 PM9/30/12
to
Tom Sturges <sturg...@gmail.com> wrote:

> oh one other related thing. that works fine but if
> i wanted to display 200,000 how would i do that?
> when i write SI{200,000}{\.......\} it shows up as
> 200.000 (a decimal point, not a comma)

Write numbers without the comma for separating thousands:

\SI{200000}{...}

There are options for automatically inserting a separator
for thousands and the default choice is a thin space, which
is the correct separator to use according to ISO and SI
standards, AFAIK.

Ciao
Enrico

unruh

unread,
Sep 30, 2012, 5:51:29 PM9/30/12
to
On 2012-09-30, Tom Sturges <sturg...@gmail.com> wrote:
> On Sunday, 30 September 2012 16:24:04 UTC+1, Tom Sturges wrote:
>> On Sunday, 30 September 2012 14:00:39 UTC+1, Marc van Dongen wrote:
>>
>> > On Sunday, September 30, 2012 1:41:49 PM UTC+1, Joseph Wright wrote:
>>
>> >
>>
>> > > On 30/09/2012 13:34, Marc van Dongen wrote:
>> > > > \SI{20}{\metre^2\per\volt\second}~\cite{Du2008}.
>> > > Better to use \metre\squared\per\volt\second (or an abbreviated form) as
>
> oh one other related thing. that works fine but if i wanted to display 200,000 how would i do that? when i write SI{200,000}{\.......\} it shows up as 200.000 (a decimal point, not a comma)

Sounds like it is using European rather than US conventions. Try
SI{200.000}{\.......\}

Enrico Gregorio

unread,
Oct 1, 2012, 6:06:34 AM10/1/12
to
The convention siunitx for inputting numbers is that /no/
group separator (for thousands) is used, but a space is
allowed.

The comma or period is used to separate the integer from the
fractional part and is translated to the preferred separator
(default is period).

\documentclass{article}
\usepackage{siunitx}

\begin{document}
\SI{200000}{m}

\SI{200 000}{m}

\SI[group-separator={,}]{200000}{m}

\SI[group-separator={.}]{200 000}{m}
\end{document}

The output will be

200 000 m
200 000 m
200,000 m
200.000 m

(with thin spaces, not interword spaces). If one prefers to always
have the comma as group sepqrator (which wouldn't follow ISO or SI
standard, AFAIK), then

\sisetup{group-separator={,}}

can be issued in the document preamble.

The decimal separator is chosen in a similar way:

\sisetup{output-decimal-marker={,}}

would be used in continental Europe. The advantage is that
simply changing these options and leaving untouched the body
of the document, the output can change depending on the
required standard.

Ciao
Enrico

Dan Luecking

unread,
Oct 1, 2012, 9:24:35 AM10/1/12
to
On Sun, 30 Sep 2012 18:48:38 +0200, Heiko Oberdiek
<heiko.o...@googlemail.com> wrote:

>X-No-Archive: yes
>
>Tom Sturges <sturg...@gmail.com> wrote:
>
>> On Sunday, 30 September 2012 16:30:47 UTC+1, Tom Sturges wrote:
>> > On Sunday, 30 September 2012 16:24:04 UTC+1, Tom Sturges wrote:
>> >
>> > > On Sunday, 30 September 2012 14:00:39 UTC+1, Marc van Dongen wrote:
>> >
>> > >
>> >
>> > > > On Sunday, September 30, 2012 1:41:49 PM UTC+1, Joseph Wright wrote:
>> >
>> > >
>> >
>> > > >
>> >
>> > >
>> >
>> > > > > On 30/09/2012 13:34, Marc van Dongen wrote:
>> >
>> > >
>> >
>> > > >
>> >
>> > >
>> >
>> > > > >
>> >
>> > >
>> >
>> > > >
>> >
>> > >
>> >
>
>Modern art?

If you are referring to all the empty lines, that's the new
google groups. Poster's really ought to delete them (and
then quit using google groups).


Dan
To reply by email, change LookInSig to luecking
0 new messages