1

I want one tag per line so I use align environment. But the formula is too long in my case,

enter image description here

I want to shift the entire formula a little bit to the left.

My attempt:

\begin{align}
    \hspace*{-1cm}aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
    aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{align}

and

\hspace*{-1cm}
\begin{align}
    aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
    aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{align}

However, they don't change anything.

I also tried:

\begin{equation}
\hspace*{-1cm}
    \begin{aligned}
        aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
        aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    \end{aligned}
\end{equation}

It do shift the formula but only one tag is produced.

Can anyone help me?

4
  • Welcome zo TeX.SE! You should provide complete small document with your equation, which reproduce your problem, Now we can only guess, that your equations are wider than text (column?) width, so you should consider to break them into two lines. Protruding them out of text are is bad idea, especially if your document has text in two columns.
    – Zarko
    Oct 17 at 4:04
  • @Zarko The latex template I use is for journal submission. It produces extra space before each equation. So my idea is just simply shifting the formula 1 or 2pt to the left so that the formula won't overflow
    – Kimbing Ng
    Oct 17 at 4:18
  • 1
    See my answer. Imagine, that equation is in the right column, what you will do then? I discourage this since most of journals will retype your article and on obtained result you haven't any influence.
    – Zarko
    Oct 17 at 4:22
  • @Zarko Thank you again for your advice! adjustwidth` is good! But I will follow your advice to break my equation into two lines. ^ ^
    – Kimbing Ng
    Oct 17 at 4:30
2

As I already mentioned in my comment, shift of equation outside of text area is bad idea. The outside part can overwrite text in the left column or is mode in document spinner area. So I strongly suggest to break your equations into teo lines each...

Anyway, if you persist in your intention, you can do this by use of nccmath or changepage packages:

\documentclass[twocolumn]{article}
\usepackage{nccmath}
\usepackage[strict]{changepage}

\usepackage{lipsum}
\begin{document}
\lipsum[66]
    \begin{fleqn}[-3em]
\begin{equation}
    \begin{aligned}
        aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
        aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    \end{aligned}
\end{equation}
    \end{fleqn}
\lipsum[66]
\begin{adjustwidth*}{-3em}{}
\begin{equation}
    \begin{aligned}
        aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
        aaa & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    \end{aligned}
\end{equation}
\end{adjustwidth*}
\lipsum
\end{document}

After two compilation (required by changepage) the result is:

enter image description here

Addendum: In lack of information about your document layout, from your code fragment can be concluded, that you actually have one long equation broken into two lines. Why you not break it in three lines? For example by use of the mathtools package:

\documentclass[twocolumn]{article}
\usepackage{mathtools}

\usepackage{lipsum}
\begin{document}
\lipsum[66]
\begin{equation}
\begin{multlined}
    aaa aaaaaaaaaaaaaaaaa           \\
        aaaaaaaaaaaaaaaaaaaaaaaa    \\
                aaaaaaaaaaaaaaaaa  
\end{multlined}
\end{equation}
\lipsum
\end{document}

which produce:

enter image description here

3
  • Perfect !! Thank you sooo much!! The latex template I use produces extra space before each equation. So I think is acceptable to shift the formula 1 or 2pt to the left so that the formula won't overflow. adjustwidth solve my problem !
    – Kimbing Ng
    Oct 17 at 4:22
  • 1
    @KimbingNg, it is not perfect, this is example of bad typography and pure guessing, what is your actually your problem. See addendum to my answer which contain one more possible solution.
    – Zarko
    Oct 17 at 4:35
  • 1
    I'm really grateful for your help ! I will break my equation. btw, Although shifting is not a perfect solution, ajustwidth is indeed a useful tool ! : )
    – Kimbing Ng
    Oct 17 at 4:51

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.