Sometimes I am writing an aligned list of equations, but I need to break them in the middle to add a comment, like:    Code:  \documentclass{article} \usepackage[utf8]{inputenc}  \usepackage{amsthm} \usepackage{amsmath} \usepackage{thmtools}         \setlength\parindent{0pt} \usepackage[linesnumbered,ruled]{algorithm2e} \usepackage{hyperref} \usepackage{caption}  \usepackage{cleveref}  \begin{document} \section{Introduction}  \begin{align*}     W(z) = A^TAB + \sum\limits_{\omega \in \sigma} a^2 V(z)\int_0^T rm(\theta)d\theta \end{align*} Obviously $A^TAB \leq 0$, therefore \begin{align*}     W(z) \leq \sum\limits_{\omega \in \sigma} a^2 V(z)\int_0^T rm(\theta)d\theta \end{align*}  \end{document}   But it would be better for the equations to remain aligned    What is the best way to accomplish this?
120614
How can I make comments inside an long equation, something like:  \begin{equation} G(r)  % comment here = \frac{A}{B}  = \frac{\frac{t_c}{3}}{2 \cdot \frac{2t_b + t_v + t_c}{r}}  = \frac{t_c}{6 \cdot (2t_b + t_v + t_c)} \cdot r \end{equation}
106641
How do I format a list of questions like this?     I'm getting the equation on a new line below the i) when using enumerate and \list.  I don't want to get rid of \[ and \] either as I like the long integral sign  I get this instead:
78209
I have a table of formulas, some have a description next to them, I want the equations to appear left flush and the text between parentheses right flush. I was writing it in the following way.  \documentclass[letterpaper,10 pt,twocolumn,fleqn]{article} \setlength{\columnsep}{2.5cm} \usepackage[inner=2.5cm,outer=2.5cm,bottom=2.5cm,top=2.5cm,landscape]{geometry} \usepackage{nopageno,array,graphicx,amsbsy,amsfonts}  \usepackage{amsmath}  \begin{document}        \[{\bf P} = \int_{t_i}^{t_f}{\bf F}\,dt = \Delta{\bf p}\mbox{\hspace{7mm} (Impulse) }\] \[\frac{dA}{dt} = \frac{l}{2\mu}=cte \mbox{\hspace{7mm} (Kepler's Second Law) }\] \end{document}   but the alignment is different for each equation.
91211
I am currently writing my thesis and need to include a bunch of email conversions. I am using classicthesis. I wonder, how you would format stacked conversions. Moreover, how would you deal with the email header, signatures and line breaks: why do I need to add \\ all the time? This is the configuration I am currently experimenting with:  \documentclass[ oneside, openright, titlepage, dottedtoc, numbers=noenddot, headinclude, footinclude=true, cleardoublepage=empty, abstractoff, BCOR=5mm, paper=a4, fontsize=11pt, ngerman, american ] {scrreprt}  \PassOptionsToPackage{utf8}{inputenc} \usepackage{inputenc} \usepackage{blindtext}  \usepackage{framed}  % Vertical line that highlights quotations in an email. % Use \begin{leftbar} and \end{leftbar} environment. % Width of the line = 0.4pt % Space between the line and the text = 10pt % Requires \usepackage{framed} \renewenvironment{leftbar}{%   \def\FrameCommand{\vrule width 0.4pt \hspace{10pt}}%   \MakeFramed {\advance\hsize-\width \FrameRestore}}% {\endMakeFramed}  \usepackage{nicefrac} \usepackage[english]{babel} \usepackage[pdfspacing]{classicthesis}  \begin{document} \selectlanguage{ngerman} % american ngerman % Disable paragraph indentation. \setlength{\parindent}{0pt}     \begin{verbatim} From: john.doe@yahoo.com Subject: Your inquiry from 20042012 Date: Thu, 3 May 2012 11:34:54 +0200 To: Jane Doe &lt;jane.doe@hotmail.com&gt; \end{verbatim}  Jane Doe wrote: \begin{leftbar} \begin{leftbar} \begin{leftbar} \begin{leftbar} There are a couple of questions I like to ask. Please forward them if you cannot do so. \end{leftbar} I hope I can answer them after holidays. \end{leftbar} I am back from holidays now and will look through your questionaire the next days. \end{leftbar} Thank you, Mr. Doe - I am awaiting your answers. \end{leftbar}  Dear Mrs. Doe,\\ \ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut molestie placerat pharetra. In quam leo, tincidunt ut consequat eget, malesuada sit amet urna. Morbi et interdum arcu. Nullam nisi nunc, ullamcorper vitae pulvinar eu, suscipit ut augue.\\ \ Donec risus mi, accumsan ac interdum id, molestie sed mauris. Suspendisse porttitor luctus justo in ullamcorper. Proin in neque magna. Mauris quis arcu eget enim mattis pharetra vitae a dolor. Nam aliquam consectetur mollis. Ut at sem quis dolor faucibus fringilla. Quisque cursus vehicula odio, vitae placerat ipsum dapibus id.\\ \ Best regards\\ John Doe\\ \ (See attached file: Questions\_Doe.doc)  \begin{verbatim} _______________________________________________________ Administration New York John Doe Mainstr. 3 11111 New York  T:        (011) 212-4301 F:            (011) 212-954301 M:         john.doe@yahoo.com \end{verbatim}  \begin{leftbar} My question I looking forward to reading the answers to my questions:\\ \ 1. Is the world analog or digital? \end{leftbar} digital  \begin{leftbar} 2. How long does the world exist?  \end{leftbar} analog since 1984, digital since 1999  \end{document}     This is what the above latex example looks like.    I also saw  but I do not want to use &gt; or colors. My settings are inspired by this  and this .
62576
I'm starting my experiment with LaTeX, i'm writing an article and all that I want is to embed an algorithm inside normal text, this is my code:  \documentclass{article} \usepackage{algorithmic} \begin{document} \section{Lettura file .gpx}  Lorem ipsum ...  \algsetup{indent=1.7em} \begin{algorithm} \caption{Alg capt} \label{alg1}  \begin{algorithmic}[1] ... algorithm here... \end{algorithmic} \end{algorithm} \end{document}   This is fully working but algorithmic uses a pagebreak automatically, how can I avoid this break and show the algorithm immediately after "lorem ipsum" part?
33114
--Revised-- I am looking at a math workbook for teenagers. This one has the following structure:  1.Main Chapter 1.1 Subchapter 1.11 Task 1 a) problem 1   b) problem 2   c) problem 3 d) problem 4   e) problem 5 1.12 Task 2 etc. ...  Many of the math problems are very small and the natural thing would be to have them on line, horizontally. However an expression is often broken and aligned at the equal sign. Not unlike an equation (but not). Secondly, when the line that contain the structure breaks, the item indicators also align, presuming the use of an enumerated list. How can I reasonably assume this is done? Does it have to be a forced method, as a table, or can it be a flexible one, like inline?
19807
Is there a way possible to imitate the align environment for math mode commands, without having all writing being placed toward the center on the output page?  MWE:  \documentclass{article} \usepackage{mathtools}  \begin{document} \begin{align*} \cos\theta_1 \cos\theta_2-\sin\theta_1\sin\theta_2 &amp;= \cos(\theta_1 +\theta_2) \\ \sin\theta_1 \cos\theta_2 + \cos\theta_1 \sin\theta_2 &amp;= \sin(\theta_1+\theta_2) \end{align*}  \end{document}
74222
Let us consider the following code and the algorithm corresponding to it    \documentclass{article}   \usepackage[utf8]{inputenc}    \usepackage[]{algorithm2e}     \begin{document}     \begin{center}    \begin{algorithm}[H]     \KwData{this text}     \KwResult{how to write algorithm with \LaTeX2e }     initialization\;     \While{not at end of this document}{      read current\;      \eIf{understand}{              go to next section\;       current section becomes this one\;       }{       go back to the beginning of current section\;      }     }     \caption{How to write algorithms}    \end{algorithm}    \end{center}    \end{document}   Which gives the following     I want to add running times for each step to my algorithm as shown below (for example)    So, I need to make my algorithm as a column in the table and one more column for running times of each step, how can I make my algorithm as a column inside a table?
25494
I always use align in my documents, and avoid equation. Is there anything wrong with that? My reasoning behind this: align > equation, so why not use it?
45740
I need every amsmath equation to place at the top of the page. So I use \noindent to do that. Everything is fine except equation+split environment. Than formula is placed a bit higher (by \vskip-\lineskiplimit (it's -3pt) from asmmath.sty \@display@init macro). align+split is ok. The glue is discardable item but it's in a box so it's not discarded.  ....\glue(\topskip) 0.0 ....\hbox(21.00012+16.0001)x430.00462, direction TLT .....\vbox(21.00012+16.0001)x430.00462, direction TLT ......\glue -3.0 ......\glue 0.0   MWE:  \documentclass{article} \usepackage[showframe,paperwidth=10cm,paperheight=5cm]{geometry} \usepackage{amsmath}  \begin{document}  \noindent \[ \begin{split} \left(a^{B^{B^{B}}}\right) \\ bb \end{split} \]  \clearpage \noindent \begin{align} \begin{split} \left(a^{B^{B^{B}}}\right) \\ bb \end{split} \end{align}  \end{document}   Result:   Questions:   Is there a way to test am I on the top of page? Then I could fix that \vskip. I tried leaders but its very tricky.  Is there an other way to place formulas forcing \topskip?
51138
The report I'm writting features a lot of long, multiple lines equations. To reduce visual polution I've been using an aligned environment nested inside equation. This way (unlike just using an align environment) I get only a single label for all the lines.  The problem is that so many long equations often need to be broken into two pages, otherwise I get lots of blank vertical space in the document. However the aligned environment does not allow the \displaybreak command.  Is there an alternative way to achieve a pagebreak inside an aligned equation?  Here's a sample ofthe equations I'm using  \begin{equation}     \begin{aligned}     ...\\     ...\\  %I need to pagebreak here     ...\\ \end{aligned}\end{equation}
75261
I'm trying to put equation numbers next to text as if said text was an equation. If I use \text{} in an align* environment, it typesets the text right-aligned and the whole environment centered, but that's not what I want. I would like the text to look like in an itemize or enumerate environment (for example, indented), but still with an equation number behind it. And that equation number should come from the regular equation number "pool".  Ideally, it would look like this:  We have to make sure that:   A is very b,             (1)   A is not c.              (2)   How can I write this in LaTeX?
122336
I have nested gather and align according to  \begin{gather}        \sum\limits_{i=1}^n i + \text{expression} = \dfrac{n(n-1)}{2} \label{l1}\\        \begin{align}             a+\text{expression}&amp;=b \\ %\label{l2} doesnt work             c&amp;=d+\text{expression} \\             e+\text{long expression}&amp;=f-\text{expression}        \end{align}  \end{gather}   to get an output looking like this:   The problem is that it is not possible to label all equations separately. The problem is identical to that discussed in , except  that in my problem the first line needs to be centered.  Thanks for any help.
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}
85339
I want to write a three line equation with left curly brace for all three, right curly brace for bottom two ones and some text at right bottom of right curly brace. All with proper alignment. I wrote following code.  \documentclass{article} \usepackage{amsmath,amssymb,amsfonts} \usepackage{flexisym}  \begin{document}  \begin{equation*}     \begin{aligned}         K_{\mathbb{A}_{Ui}} =\begin{cases}             D                =\ g^{ \frac{ (\alpha + r) }{\beta} }\\             \left.\begin {aligned}                 &amp;D_j           &amp;=\ &amp;g^r . H(j)^{r_j} \\                 &amp;D_j\textprime &amp;=\ &amp;g^{r_j}             \end{aligned}\right\} \forall j \in   \mathbb{A}_{Ui}         \end{cases}         \end{aligned}     \end{equation*}  \end{document}   It is giving some problems.   Second and Third lines are aligned but they are not aligned with the first one. I want alignment to occur at start of "D", "=" and "g" for all three. Right now, the text at right of right curly brace is coming at center. I want it to shift down and come at bottom.   Please help. Thanks in advance.
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.
10375
I have a very long equation that must be separated into two lines, and it has several pairs of nesting \left \right delimiters. Unfortunately, it seems that they need to be on the same line in order for them to work.  Also I'm using the align environment because I need the aligning functionality. Is there a way to have the size of delimiters automatically adjusted over multiple lines?