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

non-centered equations

482 views
Skip to first unread message

Troels Pedersen

unread,
Sep 16, 2003, 1:21:59 PM9/16/03
to
How can I change the horizontal placement of an equation.
In stead of:
Bla bla bla Bla bla bla Bla bla bla
f(x)=x^2 (2.16)

I want to doo something like
Bla bla bla Bla bla bla Bla bla bla
f(x)=x^2 (2.16)

Best Regards Troels Pedersen
-----
Stud. Polyt. Troels Pedersen
Aalborg University * Institute of Electronic Systems
Frederik Bajers Vej 7 A * Room A3-219
DK-9220 Aalborg Oe * DENMARK

Private: Troels Pedersen * Sonjavej 18 B
DK-9000 * Aalborg * DENMARK * Phone +45 98 78 09 49

Web-page: http://kom.auc.dk/~tped00/

Lars Madsen

unread,
Sep 16, 2003, 1:39:14 PM9/16/03
to

use the fleqn documentclass option.

BTW: There is a danish mailing list regarding latex. Find the address at
http://www.tug.dk

--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
AMSMATH Intro: http://www.ams.org/tex/short-math-guide.html
LaTeX Intro: http://people.ee.ethz.ch/~oetiker/lshort/lshort.pdf
Graphics Intro: http://www.ctan.org/tex-archive/info/epslatex.pdf
Remember to post minimal working examples.

Julian V. Noble

unread,
Sep 16, 2003, 7:39:21 PM9/16/03
to

In LaTeX put the equation within

\begin{equation} \label{Eq:stuff}
stuff
\end{equation}

and it will be numbered, not centered, and can be referred to.

--
Julian V. Noble
Professor Emeritus of Physics
j...@lessspamformother.virginia.edu
^^^^^^^^^^^^^^^^^^
http://galileo.phys.virginia.edu/~jvn/

"Science knows only one commandment: contribute to science."
-- Bertolt Brecht, "Galileo".

Troels Pedersen

unread,
Sep 17, 2003, 2:36:01 PM9/17/03
to
> In LaTeX put the equation within
>
> \begin{equation} \label{Eq:stuff}
> stuff
> \end{equation}
>
> and it will be numbered, not centered, and can be referred to.
This does not work for me (this is infact what I do, when I include
displayed math in my report). The centering/other justification
must be changed in the preamble as I want it to be the general layout of
my report.

Is there a variable as "\equationindent" or "equation placement" or do I
have to change the document-class?

Morten Høgholm

unread,
Sep 17, 2003, 3:06:00 PM9/17/03
to
On Wed, 17 Sep 2003 20:36:01 +0200, Troels Pedersen <tpe...@kom.auc.dk>
wrote:

> This does not work for me (this is infact what I do, when I include
> displayed math in my report). The centering/other justification
> must be changed in the preamble as I want it to be the general layout of
> my report.

Then the fleqn-option is your friend. All major classes support it and of
course amsmath does as well (just out it at the \documentclass and amsmath
will find it).


>
> Is there a variable as "\equationindent" or "equation placement" or do I
> have to change the document-class?

Change an option to the document class rather.
--
Morten Høgholm
I haven't got a smelly address.

Morten Høgholm

unread,
Sep 17, 2003, 3:09:44 PM9/17/03
to
On Tue, 16 Sep 2003 19:39:21 -0400, Julian V. Noble <j...@virginia.edu>
wrote:

> Troels Pedersen wrote:
>>
>> How can I change the horizontal placement of an equation.
>> In stead of:
>> Bla bla bla Bla bla bla Bla bla bla
>> f(x)=x^2 (2.16)
>>
>> I want to doo something like
>> Bla bla bla Bla bla bla Bla bla bla
>> f(x)=x^2 (2.16)
>>
>

> In LaTeX put the equation within
>
> \begin{equation} \label{Eq:stuff}
> stuff
> \end{equation}
>
> and it will be numbered, not centered, and can be referred to.

Huh? Now how's that supposed to work? I'm certain you forgot to mention
that it usually requires the fleqn option to the document class...

Stephan Klumpp

unread,
Sep 17, 2003, 3:43:48 PM9/17/03
to
Hi Troels

> How can I change the horizontal placement of an equation.
> In stead of:
> Bla bla bla Bla bla bla Bla bla bla
> f(x)=x^2 (2.16)
>
> I want to doo something like
> Bla bla bla Bla bla bla Bla bla bla
> f(x)=x^2 (2.16)
>

You can controll the indent for equations using the variabel
\mathindent. It is normaly set to 72pt by default.
For example:

\setlength{\mathindent}{20pt}
\begin{equation}
stuff}
\end{equation}


will set the indent for equation "stuff" more to the left.

Hope this will help you!

Stephan
-------------------------------------------------------------
Dipl.-Phys. Stephan Klumpp

Fachbereich Physik
Universität Kaiserslautern
Erwin-Schrödinger-Straße
D-67653 Kaiserslautern

Tel.: +49 (0631) 205 2325
Fax : +49 (0631) 205 2394

mailto: klu...@physik.uni-kl.de

Arbeitsgruppe Atomphysik und Angewandte Elektronenoptik
http://3beam.physik.uni-kl.de
-------------------------------------------------------------

Hartmut Henkel

unread,
Sep 17, 2003, 4:48:01 PM9/17/03
to
Stephan Klumpp <klu...@physik.uni-kl.de> wrote:
>
>You can controll the indent for equations using the variabel
>\mathindent. It is normaly set to 72pt by default.

Yes. No: \mathindent (only available with the `fleqn' class option) is
set by default to the value of \leftmargini (see fleqn.clo), which is the
default list indentation and depends on the class size option. E. g. for
`10pt' article default size, \leftmargini is 25pt. Example:

\documentclass[a4paper,fleqn]{article}
\begin{document}
\begin{equation} y=x^2 \end{equation}
\begin{itemize} \item left-aligned! \end{itemize}
\end{document}
--
Hartmut Henkel, Oftersheim, Germany

Stephan Klumpp

unread,
Sep 17, 2003, 5:16:34 PM9/17/03
to
Hartmut Henkel wrote:

Oh sorry, I forgot something! I have had the same problem like Troels
Pedersen this evening except that I'm using iopart.cls currently. There
the fleqn-option is already active and \mathindent is set to 72pt.
I just have not realised that I have used a special case! Sorry again.
Thanks for mention out this point. It saves me a lot of time not making
this mistake when I will article.cls again and wondering why my code is
not working there!

Best wishes ...

Stephan
-------------------------------------------------------------
Dipl.-Phys. Stephan Klumpp

Fachbereich Physik
Technische Universität Kaiserslautern

Hartmut Henkel

unread,
Sep 17, 2003, 5:47:36 PM9/17/03
to
Stephan Klumpp <klu...@physik.uni-kl.de> wrote:
>
>I just have not realised that I have used a special case!

What's `default', anyway? :-) Even `article' is a special case. I
was just learning from the thread, never used fleqn before. Actually
\leftmargini in the article class is 2.5em, which happens to be 25pt
plus some rounding error. Have fun!

Greetings Hartmut

Robin Fairbairns

unread,
Sep 17, 2003, 5:50:05 PM9/17/03
to
Troels Pedersen <tpe...@kom.auc.dk> writes:
>How can I change the horizontal placement of an equation.
>In stead of:
>Bla bla bla Bla bla bla Bla bla bla
> f(x)=x^2 (2.16)
>
>I want to doo something like
>Bla bla bla Bla bla bla Bla bla bla
> f(x)=x^2 (2.16)

your question, as posed here, has been well answered -- use the fleqn
class option, or the fleqn package option if you're using amsmath.sty

however, it appears that you want to use flush left for some equations
and centred for others. this sounds to me like an extraordinarily bad
design idea, and i suggest you ought to think long and hard about why
exactly you want this peculiar format.

it's certainly possible to abstract the code that's used in the
class/package option and make it into some flush left equation
environment. but (having checked that it's possible -- i've not
actually tried it) i wouldn't want to go further until i hear some
real justification of _why_ you want to do this.

the reason i'm taking this school-masterly approach is that i would be
very surprised if what you want to do isn't better achieved by some
regular construct in amsmath. using the regular construct will have
the advantage of retaining some unity of design style in your
document, which is *always* a good thing.
--
Robin (the partially spineless) Fairbairns, Cambridge

Robin Fairbairns

unread,
Sep 17, 2003, 6:09:37 PM9/17/03
to
Stephan Klumpp <klu...@physik.uni-kl.de> writes:
>Hi Troels
>> How can I change the horizontal placement of an equation.
>> In stead of:
>> Bla bla bla Bla bla bla Bla bla bla
>> f(x)=x^2 (2.16)
>>
>> I want to doo something like
>> Bla bla bla Bla bla bla Bla bla bla
>> f(x)=x^2 (2.16)
>
>You can controll the indent for equations using the variabel
>\mathindent. It is normaly set to 72pt by default.

\mathindent is only defined if you start with a fleqn option (at
least, that's true in the standard classes and in amsmath.sty). i don't
know of any class that sets it to 72pt (i.e., just shy of an inch).

>For example:
>
>\setlength{\mathindent}{20pt}
>\begin{equation}
>stuff}
>\end{equation}
>
>will set the indent for equation "stuff" more to the left.

actually, 20pt (2em if you're using computer modern at 10pt) is what
the standard classes set the indent to if you use fleqn. (it's
different -- more complicated, but better thought through -- in
amsmath.)

see my post later in this thread.

Hartmut Henkel

unread,
Sep 17, 2003, 6:19:36 PM9/17/03
to
Robin Fairbairns <r...@cl.cam.ac.uk> wrote:
>
>actually, 20pt (2em if you're using computer modern at 10pt) is what
>the standard classes set the indent to if you use fleqn.

it's 2.5em, 25pt.

\documentclass[fleqn]{article}
\begin{document}
\showthe\mathindent
\dimen0=2.5em\showthe\dimen0
\end{document}

0 new messages