3

So, I'm new to use LaTeX and still haven't figured out how to use some functions. The thing is, I can't understand how can I replace the equation system on the left edge instead of center? I've seen some similar question here and tips given but still haven't undestood how can I do I do this in my text.

So here's my code:

\documentclass[14pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}
\textbf{№1}
\begin{equation*}
    \begin{cases}
    x \equiv 48 (mod 86) \\
    x \equiv 11 (mod 19) \\ 
    x \equiv 15 (mod 39) \\
    \end{cases}\
\end{equation*}
\end{document}

And this is how it looks like after recompile: And this is how it looks like after recompile:

But I want to place equations on the left. Could anyone explain me how do I do this?

5
  • Placing things centered is very standard and as a new user you really should be change that. Why exactly do you want it on the left?
    – daleif
    Apr 18 at 15:14
  • 1
    BTW your handling of mod here is wrong, se the amsmath manual it has 4 ways to write mod. Here I'd use \pmod{86} etc.
    – daleif
    Apr 18 at 15:15
  • BTW2: There is no 14pt option for article
    – daleif
    Apr 18 at 15:16
  • ok, I'll fix mistakes wit 14pt and using mod I want to place it all on left just because it's more usual for me, that's all
    – stephan
    Apr 18 at 15:25
  • 1
    Welcome to TeX.SE! Great that you gave a complete example!
    – mickep
    Apr 18 at 18:27

2 Answers 2

3

The idea is to use fleqn.

You can set \mathindent to your liking. In the following example it's set mid-document, but you should set it in the preamble, so the value is used throughout the document.

Note that cases is not really the right tool. And definitely (mod86) is wrong. See the usage of \pmod.

\documentclass[12pt]{article}
\usepackage[fleqn]{amsmath}

\newenvironment{system}{%
  \!\left\lbrace
  \renewcommand{\arraystretch}{1.2}% like cases does
  \begin{array}{@{}l@{}}%
}{\end{array}\right.\kern-\nulldelimiterspace}

\begin{document}

This part has a left aligned equation, but slightly indented,
which is more common:
\begin{equation*}
\begin{system}
  x \equiv 48 \pmod{86} \\
  x \equiv 11 \pmod{19} \\ 
  x \equiv 15 \pmod{39}
\end{system}
\end{equation*}

\bigskip

\setlength{\mathindent}{0pt}

This part has a left aligned equation, set at the left edge,
which is less common:
\begin{equation*}
\begin{system}
  x \equiv 48 \pmod{86} \\
  x \equiv 11 \pmod{19} \\ 
  x \equiv 15 \pmod{39}
\end{system}
\end{equation*}

\end{document}

enter image description here

What value of \mathindent to use? I wouldn't set it to zero. If you use fleqn, you should also add leqno for equation numbers to the left and a zero \mathindent wouldn't work. Why leqno? Because with equation set at the left, the number at the right margin would be too far away.

Look at the following output and judge for yourself.

\documentclass[12pt]{article}
\usepackage[fleqn,leqno]{amsmath}

\newenvironment{system}{%
  \!\left\lbrace
  \renewcommand{\arraystretch}{1.2}% like cases does
  \begin{array}{@{}l@{}}%
}{\end{array}\right.\kern-\nulldelimiterspace}

\begin{document}

This part has a left aligned equation, but slightly indented,
which is more common:
\begin{equation*}
\begin{system}
  x \equiv 48 \pmod{86} \\
  x \equiv 11 \pmod{19} \\ 
  x \equiv 15 \pmod{39}
\end{system}
\end{equation*}
This part has a left aligned equation, but slightly indented,
which is more common:
\begin{equation}
\begin{system}
  x \equiv 48 \pmod{86} \\
  x \equiv 11 \pmod{19} \\ 
  x \equiv 15 \pmod{39}
\end{system}
\end{equation}

\bigskip

\setlength{\mathindent}{0pt}

This part has a left aligned equation, set at the left edge,
which is less common:
\begin{equation*}
\begin{system}
  x \equiv 48 \pmod{86} \\
  x \equiv 11 \pmod{19} \\ 
  x \equiv 15 \pmod{39}
\end{system}
\end{equation*}
This part has a left aligned equation, set at the left edge,
which is less common:
\begin{equation}
\begin{system}
  x \equiv 48 \pmod{86} \\
  x \equiv 11 \pmod{19} \\ 
  x \equiv 15 \pmod{39}
\end{system}
\end{equation}

\end{document}

enter image description here

3

See https://tex.stackexchange.com/a/304347/246082

Basically,

\usepackage[fleqn]{amsmath}

will get the job done.

enter image description here

For Plain TeX, this is commonly done via

\everydisplay{\leftdisp}
\def\leftdisp#1$${%
    \hbox to \displaywidth{\kern\parindent$\displaystyle{#1}$}$$}

(The TeXbook answer that uses \leftline would give a box overfull warning.) Also changing \everydisplay this way would conflict with LaTeX, particularly the amsmath package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .