7

I use fleqn as a document class, but now I solve problem, how to align few equations to the center and few to the right.

I've tried \setlength{\mathindent}{1cm} but after that is the problem that I can't use previously used fleqn aligning.

Could you help me with any solution?

Thank you very much in advance!

8

I don't think this is a good option since it makes your document inconsistent; that being said, you coud give a try to the nccmath package; declaring the fleqn package option you will have flushed left equations, and using the ceqn environment you can center some chosen equation(s):

\documentclass{article}
\usepackage[fleqn]{nccmath}

\begin{document}

\begin{align}
a &= b \\
&= c \\
&= d.
\end{align}

\begin{ceqn}
\begin{align}
a &= b \\
&= c \\
&= d.
\end{align}
\end{ceqn}

\end{document}
  • It looks nice. But I have problem with my TeXworks. During the loading process TeXworks write me error message "! LaTeX Error: File `nccmath.sty' not found." So I saved "nccmath.sty" to my style folder but there is still the same problem. – astrak Dec 18 '12 at 20:32
  • Maybe will be better to write down my document setting.\documentclass[fleqn,a4paper,11pt]{article} (\manypackages) \usepackage{nccmath} \begin{document} – astrak Dec 18 '12 at 20:40
  • @astrak I don't know which LaTeX distribution you are using, but here you find advise on installing packages for TeX Live tex.stackexchange.com/q/73016/3954 and for MikTeX tex.stackexchange.com/q/2063/3954 – Gonzalo Medina Dec 18 '12 at 20:50
  • I found help in user guide of the nccmath package. Thank you very much for help! – astrak Dec 18 '12 at 20:58
  • @astrak: FYI, I used to use the nccmath package package but ran into numerous issues that I decided to drop it. See Is there a replacement for nccmath?. If all you want is the felqn environment, you can use Stefan Kottwitz's solution from nccmath affecting minipage widths. – Peter Grill Dec 18 '12 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.