I'm looking for a way to align on the left side my math formula and on the right side the \textrm part. \begin{equation} w_{t} = \Bigg\{ \begin{aligned} \log(y_{t}) \textrm{ if } \lambda = 0; \\ (y_{t}^{\lambda} - 1)/ \lambda \textrm{ otherwise } \end{aligned} \end{equation}   Is there a simple solution to achieve that ?
897
I want to write a conditional expression such as the following.    What is the best way to express such conditional expressions in Latex?
81540
\begin{equation}     \begin{aligned}         [c\mathbf{v}+c'\mathbf{v}',\mathbf{w}]=&amp;c[\mathbf{v},\mathbf{w}]+c'[\mathbf{v}',\mathbf{w}],\\         [\mathbf{v},c\mathbf{w}+c'\mathbf{w}']=&amp;c[\mathbf{v},\mathbf{w}]+c'[\mathbf{v},\mathbf{w}'],     \end{aligned} \end{equation}   In this code, [c\mathbf{v}+c'\mathbf{v}',\mathbf{w}] is not shown in the equation. Is it because of the aligned environment? How to fix it?
98433
In the following minimal example, I have two equations inside an itemize environment, with an item per equations. Each equation is defined in its own equation environment.    \documentclass{article} \usepackage{amstext}  \begin{document}  \begin{itemize}  \item Lorem ipsum dolor sit amet, consectetur adipiscing elit:   \begin{equation}     f(x) = \left\{     \begin{array}{l l}       1 &amp; \text{ nisl justo, hendrerit} \\       0 &amp; \text{ sagittis condimentum}\\     \end{array} \right.  \end{equation}   \item Duis magna nunc, ultrices at fringilla non, feugiat sed massa:   \begin{equation}     g(x) = \left\{     \begin{array}{l l}       -1 &amp; \text{ fermentum fringilla mauris eget} \\       0 &amp; \text{ gravida ipsum vitae}\\     \end{array} \right.  \end{equation} \end{itemize}  \end{document}   However, each equation has its own alignment, giving the following result:    It would be nice (I think) if both equations could be aligned in the same way, something like this:    Is this possible?   Note: it would be nice if the solution could be also applied to equations in different paragraphs.    UPDATE:   presented a very nice solution, which is currently the most upvoted, but it does not work quite well:  \documentclass{article} \usepackage{amsmath} \begin{document}  This is a list.  \begin{itemize}    \item First item.   \begin{align*}   f(x) &amp;= \begin{cases} 0 &amp; \text{now} \\ 1 &amp; \text{then} \end{cases}   \intertext{\item Second item.}   g(x) &amp;= \begin{cases} 0 &amp; \text{here and there}  \\ -1 &amp; \text{to and fro} \end{cases}   \end{align*}  \end{itemize}  After the list. \end{document}     Can you see? "now" and "then" are not aligned to "here and there" and "to and fro". Can we solve this? :)
36757
I am writing two equations in an align environment:  \begin{align} x^2+y^2=z^2, \\ x^2=7, \end{align}   I would like the first equation to be labelled with e.g. (1.1) and the second equation to be labelled (1.1'), rather than (1.2).  Is this possible to automate? Do I need to use a hack to manually place the equation number after my second equation? e.g.  \newcommand{\hack}{\hfill({\eqnum}')} % Sketch - I don't know what command to use. \begin{align} x^2+y^2=z^2, \\\nonumber x^2=7,\hack \end{align}   If so, what command can I use to get the equation number? i.e. what should my command \hack be?
48287
I am trying to align some text to left/center/right in the same line. For example, I want to put my phone number on the left, my name in the center, and my email on the right, how do I do that?
64233
If I have a string of equations whose equal signs are aligned and one of the equations is too long and needs to span multiple lines, how do I create a second alignment. For instance, in the following example     \begin{align*}     f(x)&amp;=eqn1\\         &amp;=eqn2_part1+eqn2_part2\\          &amp;           +eqn2_part3\\         &amp;=eqn3\\          &amp;=eqn4\\   \end{align*}   How do I align the equals signs and the plus signs.
61397
I have a equation that needs to be left aligned within the cases environment. Here's my code so far, which does not work:  \documentclass{article}  \usepackage{amsmath}  \newcommand{\diff}{\mathop{}\!d} \begin{document}  \begin{equation}\label{eq:algin}  \begin{aligned} \begin{cases} u_i^{k+1}(x)=\arg \min_{u} \Bigg\{ {}&amp; \lambda\sum_{i=1}^{N}\int_{\Omega} r_i(x)u_i(x)\diff x  + \frac{\gamma}{2} \sum_{i=1}^{N}\int_{\Omega} \left( u_i(x)-m(x) \right)^2\diff x  + \frac{\mu}{2}\int_{\Omega} \left( u_i(x)-m(x) \right)^2\diff x \Bigg\}, \\ f'(x_{0})=0 \text{ : } z=f(x_{0}) \text{ is de horizontale raaklijn.} \\ \lim_{x\to x_{0}} f'(x)=\pm\infty \text{ : } x=x_{0} \text{ is de verticale raaklijn.} \\ g(x_{0}){R}_{0} \text{ : } z-f(x_{0})=f'(x_{0})\cdot(x-x_{0})   \text{ is de raaklijn.} \end{cases} \end{aligned} \end{equation}  \end{document}    My wrong output is:   I'm trying to get output like this:    This is my expected result    Thanks egreg. I found that when equation is so long (we cut it before), the equation number will automatically locate in bottom. Could we can relocate it in middle?  Code  \documentclass{article}  \usepackage{amsmath,mathtools}  \newcommand{\diff}{\mathop{}\!d} \DeclareMathOperator*{\argmin}{arg\,min}  \begin{document}  \begin{equation} \begin{dcases} u_i^{k+1}(x) \!\begin{multlined}[t] =\frac{-\lambda r_i(x)+\gamma \bigl( r_i(x)+b_i(x)\bigr)+\gamma \bigl( \alpha-\beta\bigr)}{\theta}\\  -\frac{\sigma \bigl( -\lambda\int_{i=1}^N r_i(x) \diff x + \sigma\sum_{i=1}^N \bigl( r_i(x)-b_i(x)\bigr) +\gamma N \bigl( 1-r_i(x)\bigr)\bigr)}{\gamma\bigl( \sigma N -1\bigr)}, \end{multlined} \\[1ex] f'(x_{0})=0 : z=f(x_{0}) \text{ is de horizontale raaklijn.} \\[1ex] \lim_{x\to x_{0}} f'(x)=\pm\infty : x=x_{0} \text{ is de verticale raaklijn.} \\[1ex] g(x_{0}){R}_{0} : z-f(x_{0})=f'(x_{0})\cdot(x-x_{0})   \text{ is de raaklijn.} \end{dcases} \end{equation} This is text \end{document}
10768
I am having the following equation:  \begin{equation}   Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left( \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t - \hat{\mu}_m^{(s)}\right) \right) \end{equation}   which does not very well fit on one line. How can I split this over two lines? What I have in mind is that I specify the splitting place, and that the first line is left aligned and the second line right aligned to make clear that it is still the same equation.  The linebreak \\ does not work.
26672
I found this program and I was wondering how can I add on a left brace as in the systeme package or in the cases environment? Also is it possible to left align the right-hand side of the equal sign ?  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{4}    2x &amp; {}+{} &amp;  y &amp; {}+{} &amp; 3z &amp; {}={} &amp; 10 \\     x &amp; {}+{} &amp;  y &amp; {}+{} &amp;  z &amp; {}={} &amp;  6 \\     x &amp; {}+{} &amp; 3y &amp; {}+{} &amp; 2z &amp; {}={} &amp; 13 \end{alignat*} \end{document}
102441
The following outputs two equations side-by-side, with the equation number after each equation:  \begin{minipage}{.5\linewidth} \begin{equation}  x = y \end{equation} \end{minipage}% \begin{minipage}{.5\linewidth} \begin{equation}   y = z \end{equation} \end{minipage}     I would like to see if it looks better if the two equations stay in the same position, but with the (1) removed and the (2) becoming (1, 2) to reflect the numbers of both equations (in an assumed respective order). Is this possible?  I have searched but have only found questions asking if it is possible to only have one equation number for two equations. I want something similar to this, but displaying both equation numbers and only one set of brackets.
69286
I am trying to find a way to make the equations that appear in this text a bit better looking... here is my suggestions:     \documentclass{article}     \usepackage{amsmath}      \begin{document}     \begin{equation}         Risk_{i,t}=c+\alpha Risk_{i,t-1}+\beta_{1}         CEO_\text{PC}_{i,t}+\beta_{2} BR\_ind_{i,t}+\beta_{k}         Z_{i,t}+\epsilon_{i,t}     \end{equation}     \end{document}  Here a caption of the equation that I'm looking for :
72885
In LaTeX align, I'm struggling to align polynomial terms and assume there's an easy way to do it. But I cannot find the simple/elegant solution. What I would like is something like this:  x1 + x2 ______________ = 3  x1_______________+ x3  = 4  etc with more lines and variables (the underlines are just for space/alignment). Any help appreciated.  UPDATE Here is the solution I found:  \begin{alignat*}{7} 8x_1 &amp;{}+ 4x_2 &amp;{}+ y_1   &amp;        &amp;        &amp;        &amp;= 160     \\ 4x_1 &amp;{}+ 6x_2 &amp;          &amp;{}+ y_2 &amp;        &amp;        &amp;= 120     \\ x_1  &amp;         &amp;          &amp;        &amp;{}+ y_3 &amp;        &amp;= 34      \\ \phantom{{}+{}x_1}&amp;{}+x_2&amp;&amp;        &amp;        &amp;{}+ y_4 &amp;= 14      \\ x_1\geq0&amp;x_2\geq0&amp;y_1\geq0&amp;y_2\geq0&amp;y_3\geq0&amp; y_4\geq0 \end{alignat*}   with result:
104760
How can I align equations inside tabular? I want to place few lines of equation by side of the picture. But it turns out that I cannot use \&amp; in order to shift equals signs to be one under another.  \documentclass{article}      % Specifies the document class  \usepackage{amsmath, amsfonts, mathtools, xfrac, empheq} \usepackage{caption}   \begin{document}       % End of preamble and beginning of text. \begin{tabular}{l r} \begin{minipage}{0.6\textwidth} \begin{align}     V^\pi = E_\pi \{ R_t \mid s_t = s \} \\     = E_\pi \left \{ \sum\limits_{k=0}^\infty \gamma^k r_{t+k+1} \mid s_t = s \right \}  \notag \\     = E_\pi \left \{ r_{t+1} + \gamma \sum_{k=0}^\infty \gamma^k r_{t+k+2} \mid s_t =s \right\} \notag \end{align} \end{minipage} &amp; \begin{minipage}{0.4\textwidth} %\includegraphics[width=\textwidth]{olcar_L11-8} \captionof{figure}{Backup diagram} \end{minipage} \end{tabular}  \end{document}   I would like it to like this:
15699
The line numbers for the text of a paragraph with an equation defined by \begin{align} command do not show as expected. How to fix this?    The LaTeX codes are attached here.   \documentclass[a4paper, 12pt]{article} \usepackage[utf8]{inputenc}    % Use the UTF-8 encoding \usepackage{amsmath}           % For the use of math \usepackage{amsfonts} \usepackage{amssymb}           % For the use of AMS symbols \usepackage{indentfirst}       % For indentation \usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}  \usepackage{lineno} \linenumbers  \usepackage{titlesec} \titleformat*{\section}{\large\bfseries} \titleformat*{\subsection}{\normalsize\bfseries} \titleformat*{\subsubsection}{\normalsize}   \renewcommand{\baselinestretch}{1.5}    \usepackage{authblk}           % Use author package \renewcommand*{\Authfont}{\large} \renewcommand*{\Affilfont}{\normalsize\normalfont}  \makeatletter \g@addto@macro\normalsize{%   \setlength\abovedisplayskip{0pt}   \setlength\belowdisplayskip{0pt}   \setlength\abovedisplayshortskip{0pt}   \setlength\belowdisplayshortskip{0pt} } \makeatother  \title{\textbf{Globally cumstomize the spacing between the text and equation}}    \date{}  \begin{document}  \maketitle  \section{Air filter} The air filter is simulated by the Control Valve module (AFT in Fig. 2(a)). The pressure drop through the air filter ($ \Delta P_{af} $) is given by the following equation [11,16]. \begin{align} \Delta P = \Delta P_{d} \left( \frac{m}{m_{d}}\right)^{1.84}  \left( \frac{T}{T_{d}}\right)  \left( \frac{P}{P_{d}}\right)^{-1}  \end{align} where, $ \Delta P_{af} $ is the pressure drop, $ m $ is the mass flow rate, $ T $ is the temperature, and $ P $ is the pressure, and subscript $ d $ denotes the design condition.  \newpage \section{Air compressor (AC)} The AC operating characteristics can be described by its performance map, which relates the following dimensionless operational variables. The AC operating characteristics can be described by its performance map, which relates the following dimensionless operational variables. \begin{align} &amp; \text{Relative pressure ratio:} &amp;&amp; PR_{r} = \frac{PR-1}{PR_{d}-1}\\ &amp; \text{Relative isentropic efficiency:} &amp;&amp; \eta_{r} = \frac{\eta}{\eta_{d}} \\ &amp; \text{Relative corrected mass flow:} &amp;&amp; m_{cor,r} = \frac{\left(\frac{m_{in}}{P_{in}}\sqrt{T_{in}}\right)}{\left(\frac{m_{in,d}}{P_{in,d}}\sqrt{T_{in,d}}\right)} \\ &amp; \text{Relative corrected speed:} &amp;&amp; N_{cor,r} = \frac{\left(\frac{N}{\sqrt{T_{in}}}\right)}{\left(\frac{N_{d}}{\sqrt{T_{in,d}}}\right)} \end{align} where, $ \eta $ is the efficiency, $ N $ is the shaft speed, and $ PR = P_{in}/P_{out} $. Subscript $ cor $ denotes the corrected value, $ r $ denotes the relative value, $ in $ denotes the inlet, and $ out $ denotes the outlet.  \end{document}
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.
120540
I'm currently typing a mathematical document which counts many sum symbols. I frequently use the align environment to render equations, although the default behaviour of this environment is to render the equations in displaystyle, which in my opinion wastes vertical space. I therefore have added \textstyle at the beginning of each line of math in this environment, but I'm looking for a more convenient solution.   So is there an environment that is similar to align with the exception it displays textstyle math by default ? Thank you.
85096
Look at the following example  \begin{align}      &amp; x \\      \overset{\text{some long explanation}}= &amp; foo \\      &amp; = bar \end{align}   what is the best way to get the equal signs aligned? Now I have seen different solution such as adding \overset{\hphantom{\ţext{some long explanation}}}= to the beginning of every line, but I don't really think that is the best solution. Any better ideas?    UPDATE  I guess what i am actually after is   aligning the first column of the align environment right aligning the equal sign under the overset text right