I set the global setting as \setlength\mathindent{0pt} ,but I want to indent a particular equation.
How to do so?
Asked
Active
Viewed 1,243 times
0
Hawkingo
- 113
-
3Please, can you put an example for your question, if possible? Thank you very much. Does question help you? https://tex.stackexchange.com/questions/147570/how-to-indent-equations – Sebastiano Apr 13 '20 at 12:27
1 Answers
2
A comment up front: I will assume that you've set \setlength\mathindent{0pt}, not \setlength\mathindent[0pt]. I will also assume that you've set the option fleqn either at the document class level or while loading the amsmath package.
Equation-specific indentation from the left can be achieved by inserting spacing commands such as \quad and \qquad or, if you need really fine control, either \mkern ("math kern"; this commands takes lengths in multiples of mu, where 18mu=1em) or \hspace, \hskip, and other horizontal-spacing commands.
\documentclass[fleqn]{article}
\usepackage{amsmath}
\setlength\mathindent{0pt}
\begin{document}
\begin{align*}
&1+1=2\\
&\mkern18mu 1+1=2\\
&\quad 1+1=2\\ % width of \quad=1em=18mu
&\mkern72mu 1+1=2\\
&\qquad\qquad 1+1=2\\ % width of \qquad=2em=36mu
&\hskip3cm 1+1=2\\
&\hspace*{3cm} 1+1=2
\end{align*}
\end{document}
Mico
- 506,678
-
your assumption are correct, but I was looking for some command that would just arrange the equation normally in the centre and ignore the setlength effect for the particular case. – Hawkingo Apr 13 '20 at 14:21
-
2@Hawkingo - Your write-up noted that you wanted to "indent a particular equation"; nothing about centering it on a line. In view of the fact that my answer is evidently of no use to you, would you like me to delete it? Please advise. – Mico Apr 13 '20 at 15:06
-
It's upto you. others might get help from your answer, if it's not me. – Hawkingo Apr 14 '20 at 22:16
