The following code:              \begin{align*}                 2(3-x) \leq 2 &amp;\Leftrightarrow 6-2x &amp;\leq 2 \\                                &amp; \Leftrightarrow -2x &amp;\leq 2-6               \end{align*}   looks like this    does not align \leq, how one can align in this example the \leq signs?  Thnak you!
118598
What is the difference between align and alignat environments?
45363
I once learnt, that it is uncool to use $$, but why is that? Why does \[ not act as a abbreviation to \begin{align}? I noticed, that there is a difference, since one cannot use &amp; and \\ inside a block started with \[.
96333
I'm using aligned inside align as follows   \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} x =&22+2 \nonumber\\   =& \begin{aligned}[t]     &5+3\\     &-3+4\\     &+15-0   \end{aligned} \end{align} \end{document}   I want to have just one equation number after the very last line.  However, I'm getting the number at the beginning of the first split line (after the second = ),    and I cannot figure out how to move this equation number to the bottom. Any help will be appreciated.
100578
I have a problem writing an equation in eqnarray environment, where I split a single line into two lines. The first line starting with \left[ and the second line ending with \right], but I could not compile it using latex.
88581
So as I have learned from a previous post that the  \begin{aligned}... \end{aligned} with the usage of "&amp;" before "=" will help arrange neatly the equations where the equal sign of each equation will be just below the equal sign of the following equation and so on.  My question is if I have a total of 8 equations, how to number each equation and at the same time preserve the alignment of the equal signs.  Note if I use \begin{equation}... \end{equation}, I get only one number for the collection of 8 equations at the very end which is not what I want.
29033
The following code does not compile:  \documentclass{article} \usepackage{amsmath} \begin{document}  \begin{align}      \eta_{m} = &amp; \omega_{m1}D_{1} + \omega_{m2}D_{2} + \dots + \omega_{mT}D_{T} \\     \eta_{a} = &amp; \omega_{a1}D_{1} + \omega_{a2}D_{2} + \dots + \omega_{aT}D_{T}  \end{align}  \end{document}   However, if I remove empty lines, it does. (Same with equation environment). Why? Why would it be problematic for a code to allow spaces? Convention?   For reference, the error in TexStudio is quite dramatic, for an apparent trivial issue:  line 7: Paragraph ended before \align was complete. line 7: Missing $ inserted. line 7: Missing \endgroup inserted. line 7: Display math should end with $$. line 8: Misplaced alignment tab character &amp;. &amp; line 8: Missing $ inserted. &amp; \omega line 9: Misplaced alignment tab character &amp;. &amp; line 10: Missing $ inserted. line 11: Misplaced \cr. \end{align} line 11: Misplaced \noalign. \end{align} line 11: Misplaced \noalign. \end{align} line 11: Extra }, or forgotten \endgroup. \end{align} line 11: Missing $ inserted. \end{align} line 11: Display math should end with $$. \end{align}   NOTE: I am aware of , , and  question. But none of them explains why empty lines are problematic (besides a trivial and rather tautological answer like "the code does not allow it").
54132
I'm trying to add sample code to my document. It seems that the listing is left aligned with the margin, and the numbers go outside it. How should I align the number, instead of the code? Here is my latex code:  \documentclass[a4paper,10pt]{article} \usepackage[utf8x]{inputenc} \usepackage{listings}  %opening \title{} \author{}  \begin{document} Some dummy text. Some dummy text. Some dummy text. Some dummy text. \begin{figure} \begin{minipage}[b]{0.4\linewidth} \begin{lstlisting}[language=C, %frame=single, basicstyle=\footnotesize\ttfamily, numbers=left,stepnumber=1, morekeywords={assert} ] void test(int x, int y){   if(x &gt; 5){     x++;     if (x &lt; 3)        x--;     else        y = x;   }   assert (x &lt; 10 ); } \end{lstlisting} \caption{A simple example} \end{minipage}  %another minipage goes here  \end{figure}  \end{document}   Thank you.
114970
Why do I get a "ERROR: Extra }, or forgotten \right." in the following align* environment?  \begin{align*}     \int\left[\left(\der{E_z}{y}-\der{E_y}{z}-\mu\der{\alpha}{t}\right)\alpha&amp;+\left(\der{E_x}{z}-\der{E_x}{x}-\mu\der{\beta}{t}\right)\beta\\     &amp;+\left(\der{E_y}{x}-\der{E_x}{y}-\mu\der{\gamma}{t}\right)\gamma\left.\vphantom{\left(\der{E_y}{x}}\right]d\omega=0.     \end{align*}   thanks
95936
I'm using the multlined environment inside an align environment and want have the = aligned at the top and the equation numbering at the bottom. Is this possible?  Here my MWE:  \documentclass{article} \usepackage{mathtools,amsmath} \begin{document} \begin{align} y &amp;= a+b+c \\ &amp;= \begin{multlined}[t] a+b+ \\ c \end{multlined} \end{align} \begin{align} y &amp;= a+b+c \\ &amp;= \begin{multlined}[b] a+b+ \\ c \end{multlined} \end{align} \end{document}
67778
I'm using the following code. What should I do if I don't want the fixed indent from the left margin of my page? ‎  \documentclass[‎fleqn,oneside‎]{article}‎ ‎\usepackage{amsmath}‎ .... \begin{align} a_1&amp; =b_1+c_1\\ a_2&amp; =b_2+c_2-d_2+e_2 \end{align}
25136
I am new to Latex ;) I split my equation like this:  \begin{equation} \begin{split}     \tilde{m}=P\tilde{M} \\     \quad = K(R^1R^2R^3t) \begin{pmatrix} X \\ Y \\ 0 \\ 1 \end{pmatrix} \\     \quad= K(R^1R^2t)\begin{pmatrix} X \\ Y \\ 1 \end{pmatrix} \\     \quad= H \begin{pmatrix} X \\ Y \\ 1 \end{pmatrix}  \end{split} \end{equation}   which gives me this:   but, actually, I want it to be aligned like this:   How do I align them so it looks like the right side is always aligned?  Thanks
85403
I am trying to have a multiline equation without any numbering, even not in the last one.  \begin{align} a = x \nonumber \\ b = y \end{align}   However, this is producing a line number in the last line, which would like not to happen.  I have also tried the equation and equation* environments with no luck.  Thanks.  P.S. What' the markup for rendering LaTeX code. Can't seem to be able to find it in the help page?
109738
In this code as :     \begin{enumerate}[label=\bfseries Exercise \arabic*:]    \item 5 + 7 = 12    \item 9 + 1 = 10    \item 2 * 2 = 4 \end{enumerate}   I want the text Exercise (with its number) to be center-align and the content after that to be below and left-align. Anybody can help. Thanks.
63277
I have the following diagram:    However, this looks a bit ugly, I would like a version that looks a little bit better. For example, size the last arrow such that the T_\phi is moved to the right.  This is the code which I am using to do this:  \begin{align*}   \xi \colon &amp;\lb \to \mathcal{L}(\hh)\\   &amp;\phi \mapsto T_\phi. \end{align*}   Where \lb and \hh just give the names for those spaces. Does anybody have a suggestion how I would improve the look of this function definition?
111714
I am so bad aligning... Anyone see why there is a big space in the function?  Thanks for your help!    begin{alignat*}{2}  \tau\colon G\times k[V]&amp;\longrightarrow&amp;k[V] \\  (x,f)&amp;\longmapsto&amp;\tau_{x}(f)=x\cdot f:V&amp;\longrightarrow k \\  &amp;&amp;v&amp;\longmapsto\tau_{x}(f)(v):=f(x^{-1}\cdot v)  \end{alignat*}
8929
Having different horizontally  distributed equations inside an align environment, only lines are numbered, but not individual equations.    How can the left equations be numbered using subequations? See also the question   \documentclass{article} \usepackage{amsmath} \begin{document}   \begin{subequations}     \begin{align}        %\label{a}         a &amp;= a ,&amp;       \label{b}         b &amp;= b ,\\       %\label{c}         c &amp;= c ,&amp;       \label{d}       d &amp;= d .     \end{align}   \end{subequations} \end{document}     The solution should be able to either:    attach a label to the left equations, or modify the labels on the right to read (1a,b) and (1c,d)    I couldn't find anything in the documentation of amsmath or other packages.
70163
I have an align environment with 5 equations. I want 3 of them numbered, and the other 2 not numbered. I understand that there's other posts on the issue of selective numbering of those equations that are referred to in the body of the text, but that's different to what I'm trying to achieve.  I want the first three lines (equations) of the following to be numbered and the last two to be without numbering. Thanks.  \documentclass[a4paper,11pt]{article} \usepackage[fleqn]{amsmath} \begin{document}  \begin{align} &amp;R_{i,t} = \alpha_i  \\ &amp;R_{i,t} = \beta_i  \\ &amp;R_{i,t} = \gamma_i  \\ &amp;\mathbb{E}[\epsilon_{it}]=0;\textrm{   } \textrm{Var}[\epsilon_{it}]=\sigma^2_{\epsilon_{i}}\\ &amp;i \in \{1,2,...,N\};\textrm{   } t \in \{1,2,...,T\} \end{align}  \end{document}