Math & ScienceChanging fleqn option for part of doc only

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
christiem
Posts: 4
Joined: Wed Aug 05, 2009 8:23 pm

Changing fleqn option for part of doc only

Post by christiem »

I am looking for a way to have two different equation alignments in the same document, in this case a rather long thesis.

For the main body of the thesis, I would like (and currently have) the default alignment of equations-centered and eqno-right. For the appendices however, as they are almost entirely math derivations, I would like to change to have all the equations left-justified (with the same right-side eqno). Does anyone know a way? Ideally, since the appendices are quite long, I would like to do this once at the beginning of the appendices files, rather than for each equation.

I am currently using the following (math) packages:
\usepackage{amsmath, amssymb, amsthm}
I know there is an option within amsmath to have all equations left justified, i.e. \usepackage[fleqn]{amsmath}, however I am not sure how to turn this option on & off within the document itself (i.e. after \begin{document}...).

Thank you to all,
- Christie.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
meznaric
Posts: 10
Joined: Mon Aug 10, 2009 7:17 pm

Re: Changing fleqn option for part of doc only

Post by meznaric »

Since you are using the amsmath package, you can use the \begin{fleqn} \end{fleqn} environment for all the equations that you want left justified instead of usual. If you have already used the align or equation environment you can easily use a replace function in any of the common text editors and replace all \begin{equation} with \begin{fleqn} and similarly for \end{equation} in a selected part of the text.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Changing fleqn option for part of doc only

Post by gmedina »

meznaric wrote:Since you are using the amsmath package, you can use the \begin{fleqn} \end{fleqn} environment for all the equations that you want left justified instead of usual...
I don't think that amsmath provides such an environment. Can you please provide an example illustrating your advise?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
meznaric
Posts: 10
Joined: Mon Aug 10, 2009 7:17 pm

Re: Changing fleqn option for part of doc only

Post by meznaric »

Oh sorry, forgot to mention you need to add \usepackage{nccmath} lol. Then you use it like this:

\begin{fleqn}
Text and stuff.

\begin{align}
Equation aligned left.
\end{align}

Bla bla.

\end{fleqn}

\begin{align}
This equation is aligned like normal again.
\end{align}
ah.sheikh
Posts: 1
Joined: Fri Oct 23, 2009 7:14 pm

Re: Changing fleqn option for part of doc only

Post by ah.sheikh »

I had same problem, i tried this, but I got message " package not found", I am using LINUX.
what to do now? how can I get this package usepackage{nccmath}
thanks in adv
User avatar
christiem
Posts: 4
Joined: Wed Aug 05, 2009 8:23 pm

Re: Changing fleqn option for part of doc only

Post by christiem »

It is in the ncctools bundle,
http://www.ctan.org/tex-archive/macros/ ... /ncctools/

I gave up and just set all my equations to fleqn in the preamble.
--
"The fish seem to like me", said Tom with baited breath.
Post Reply