Tag Info

New answers tagged

0

One option is to use split \documentclass{report} \usepackage{mathtools} \begin{document} \begin{enumerate} \item here some text \begin{equation} \begin{split} a+b+c+v & = d+g+t+h+y+u+j+i+k+l+o+f\\ &\phantom{{}= d}+r+t+g+b+h+y+n+d+e+r+f \\ &\phantom{{}= d}+w+e+r+t+yh+y+n+d+e+r+f \end{split} \end{equation} text\\ \item and so ...


1

I suggest reducing the font size to \small (locally) and replacing the brace with bullets, using the \mathllap command from mathtools to have right-alignment of the conditions: \documentclass[3p,times,12pt,draft,twocolumn]{elsarticle} \usepackage{mathtools} \begin{document} {\small% \begin{align}\label{eqA} \mathrlap{ E_{ ⊥ ,\,\mathrm{diff}}=} \\ \notag ...


2

I think that inserting a line break at a multiplicative location is inferior to breaking the line at an additive (or subtractive) location. Moreover, I think that a cases environment is not particularly well suited for the formula at hand. I'd use a basic \left\{ ... \right. construct and provide an additional line break in each of the two subformulas in ...


5

You don't need flalign (I see it too often abused) nor cases, but aligned: \documentclass[3p,times,12pt,draft,twocolumn]{elsarticle} \usepackage{mathtools} \begin{document} \begin{equation} E_{\perp,\mathrm{diff}}= \left\{ \begin{aligned} E_{g,\mathrm{meas}} &\cdot(1.020-0.254\cdot k+0.0123\\ &\cdot\sin\gamma_S) \quad \text{for ...


1

Redefine/modify the cases environment \makeatletter \def\env@cases{% \let\@ifnextchar\new@ifnextchar \left\lbrace \def\arraystretch{1.2}% \array{@{}l@{\hspace{2pt}}l@{}} % adjust 2pt to suit your need } \makeatother Code \documentclass[3p,times,12pt,draft,twocolumn]{elsarticle} %\usepackage[english]{babel} \usepackage{mathtools} \makeatletter ...


3

Here is how I would do it: \documentclass{article} \usepackage{amsmath} \begin{document} \noindent Let \begin{align*} A &= \frac{P(y \mid \Theta_{t + 1})}{P(y \mid \Theta_{t})},\\ B &= \sum_{s \in S} P(s \mid y; \Theta_{t + 1}),\\ C &= \sum_{k = 1}^{T} (y_{k} - \phi_{1 \mid t + 1}(s_{k}))y_{k - 1},\\ D &= \sum_{k = 1}^{T} (\phi_{0 ...


4

If you really want to inflict such a monster formula to your readers, I see nothing else than splitting numerator and denominator: \documentclass{article} \usepackage{mathtools} \begin{document} \[ \theta_{0|t+1}\approx \frac{ \begin{multlined} (\beta+1)\frac{P(y|\Theta_{t+1})}{P(y|\Theta_{t})} \sum_{s \in ...


2

I don't know what exactly rtf2latex2e does, but ideally it wouldn't be using \textsuperscript to typeset the superscript items of a mathematical expression. It should be using ^ (the "caret" symbol) for this job. There should also be just a single pair of $ symbols to mark the start and stop of the expression, and no \ensuremath directives. ...


2

Here is a solution using aligned inside of align environments. The split is only needed in order to get one vertically centred label on the right. If you want to have it on the first line, you will have to get rid of this and \notag all lines but the first (or last). % arara: pdflatex \documentclass[a4paper,oneside]{scrbook} \usepackage{amsmath} ...


1

Here's a way to do it with tabular stacks \documentclass[a4paper,oneside]{scrbook} \usepackage{amsmath,tabstackengine} \begin{document} \begin{equation*} \stackMath \TABbinary\setstackgap{L}{1.3\baselineskip} \savestack{\Aterm}{\Longunderstack[l]{% {}+ AA * AA\\ {}+ AA * AA \\ {}+ AA * AA \Big)% }} \savestack{\Bterm}{\Longunderstack[l]{% {}+ ...


5

A too long formula with several terms in it is difficult to read, particularly when it must be split across lines and there are no “good” break points like in this case. So I believe the better strategy is to remove the most complicated term and set it apart: \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} \begin{equation} ...


2

An example of a solution (some text probably omitted): \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{align} &\mathbb{T}(\sinh^2(\theta))(t)\nonumber \\ &\qquad = \frac{2}{3} \sum_{n = 0}^{\infty} \Biggl( +\frac{|b_n|^2}{4} + \sum_{m=|n|}^{n+3} \Biggl( \operatorname{Re} \Biggl(a_n^* a_m ...


1

÷ is U+00c3 LATIN CAPITAL LETTER A WITH TILDE U+00b7 MIDDLE DOT the two bytes C3 B7 if viewed as latin 1 are A-tilde and middle dot, but if they are read as UTF-8 they are the single character ÷ so it looks like your file has been "double encoded" to UTF-8 twice.


3

You have to decide first, if you want to have one equation and hence only one number or multiple equations with multiple numbers (for this choice see the remark at the end of the post). For the first use \begin{equation} and \end{equation} with an ed environment (like aligned, gathered). Since you have multiple alignment points, you should use the alignedat ...


1

A classic TeX method -- "classic" in the sense that it's mentioned explicitly in Knuth's TeXbook -- for achieving your objective is to repeat the material from the second line that's causing the closing curly brace to be so large inside a \vphantom macro on the first line. A \vphantom ("vertical phantom") is an invisible object that's as tall as its ...


0

You don't really need two lines for this formula, and the mathtools package allows to define a \diag command that includes the variable sized braces. You then have a \diag* that adds an implicit \left …\right pair on either side of the braces. The non-star version admits as optional argument \big, \Big, &c. for fine tuning the size of the braces. ...


1

Here, I \smashed the outer \underbrace of the 2nd line and added \vphantom of the same size as the inner \underbrace. That way, the \right\} picks up on the \vphantom height. Note that because the outer \underbrace was \smashed, you will likely have to add a small \vspace after the equation to make up for the space taken up by the outer \underbrace, as ...


2

It is enough to have amperands at the beginning of each line. Demo (with only a Latin alphabet, hence no \text{$…$}: \documentclass[10pt]{article} \usepackage[showframe, nomarginpar]{geometry} \usepackage{amsmath} \begin{document} \begin{flalign*} & \textbf{‎for‎}‎\quad‎ ‎k=1:n-1 ‎\quad‎ \textbf{do‎}& ‎‎\\ ‎ & \beta ...


3

You seem to want that \belowdisplayshortskip is set equal to \belowdisplayskip; the former is used if the line above the display is “short”. The parameters are set in \normalsize (and also in \small and \footnotesize). Just append the appropriate declaration. \documentclass{article} \usepackage{etoolbox} ...


2

The simplest solution is to redefine \spread@equation so that it calls \linespread{1}\selectfont, which is only done in multiline displays. \documentclass{article} \usepackage{amsmath} \usepackage{setspace} \usepackage{etoolbox} \usepackage{lipsum}% just to generate text for the example \doublespacing \makeatletter ...


0

\documentclass[final,5p,times,twocolumn]{elsarticle} This is sufficient. However one column can contain only 29 lines and not more than that. In the first column you must have some text and it can follow required equations. Otherwise the equation moves to second column of the first page.The option 5p is used for having twocolumns in a page. It is called ...


1

Let me detail my comment: the mathtools package defines \(re)newtagform commands that help define tag ‘styles’. Then \usetagform{name} is a switch to be used outside a math environment. You may go back to the usual style with \usetagform{default}. In addition, I define a command that allows to change the tag style for one equation of a multiline group of ...


3

An answer based on Joseph's advice: \documentclass{article} \usepackage{mathtools} \DeclarePairedDelimiter{\ket}{\lvert}{\rangle} \begin{document} \begin{align*} (A + B)\ket{\psi} &= A\ket{\psi} + B\ket{\psi}\\ AB\ket{\psi} &= A(B\ket{\psi})\\ \exp A &= \sum_{n = 0}^{\infty} \frac{A^{n}}{n!} \end{align*} \end{document} In ...


6

\documentclass{article} \usepackage{setspace} \usepackage{amsmath} \usepackage{etoolbox} \usepackage{lipsum} % just for the example \usepackage[vmargin=2cm]{geometry} % just for the example \doublespacing \BeforeBeginEnvironment{split}{\linespread{1}\selectfont}{}{} \begin{document} \lipsum*[2] \begin{equation} \begin{split} y&=x+x\\ &=2x ...


6

You can modify the \gather@split macro, calling \linespread{1}\selectfont before \spread@equation. This won't affect other alignment environments. \documentclass{article} \usepackage{setspace} \usepackage{amsmath} \usepackage{etoolbox} \usepackage{lipsum} % just for the example \usepackage[vmargin=2cm]{geometry} % just for the example \doublespacing ...


4

As far as I am aware, the only way to do this is to keep on turning bold off and on every time that you want to do this. The cleanest solution would be to define a new version of equation that automatically makes the equation number bold: \documentclass{article} \begin{document} \renewcommand\theequation{\thesection.\arabic{equation}} ...


1

There you go again: \documentclass{book} \usepackage{mathtools,amssymb,ifoddpage,showframe} %% remove showframe. \usepackage{xcolor} \definecolor{background}{RGB}{255,255,170} \usepackage{empheq} \newcommand*\mybox[1]{% \colorbox{background}{\hspace{1em}#1\hspace{1em}}} \usepackage{kantlipsum} \usepackage[fulladjust]{marginnote} ...


2

Your idea with array is good, but needs some refinement. However, I wouldn't set the equation number above the equals sign, but on the side. I'll show both ways. \documentclass{book} \usepackage{amsmath,array} \newcolumntype{R}{>{\displaystyle}r} \newcolumntype{C}{>{\displaystyle{}}c<{{}}} \newcolumntype{L}{>{\displaystyle}l} ...


3

My answer http://tex.stackexchange.com/a/136374/15925 may be adapted to introduce a command \cmdcol for material to be centered in a column in display math in alignat and related environments: \documentclass{book} \usepackage{mathtools} \numberwithin{equation}{section} \makeatletter \newcommand{\cmdcol}[1]{\omit\hfil\strut@ \( \m@th\displaystyle #1 ...


3

You have better ways of colouring an equation. See for example: this question and its answers. I have used empheq in my example. With tcolorbox, you can be more fancier. Now the real problem. The following code works with the help of marginnote package. \documentclass{book} \usepackage{mathtools} \usepackage{xcolor} ...


3

The first thing to try is, of course, reducing the arrow lengths. If all else fails, use \mathclap that, however, requires ampersand replacement; or enclose the diagram in an lrbox. I'll show all three possibilities. \documentclass[12pt,a4paper]{article} \usepackage{mathtools} \usepackage{tikz-cd} \newsavebox{\wideeqbox} \newcommand{\sample}{Lorem ipsum ...


13

Use eqnarray* instead of eqnarray to get an unnumbered multiline equation structure. However, you really shouldn't be using either eqnarray or eqnarray* -- both environments have been seriously deprecated for many years. Instead, use align and align*, respectively. For more in-depth references on this subject, see the posting eqnarray vs align. One of the ...


1

The scalerel package allows you to scale one object to the same vertical extent as another. Furthermore, it obeys changing math sizes. So here, I define \onearrow as an arrow scaled to the local height of a "1". It works automatically in all math sizes. \documentclass{minimal} \usepackage{scalerel} \def\onearrow{{\scalerel*{\uparrow}{1}}} ...


2

You can try writing the arrow in a resize box $x_{\uparrow}$ $x_{\resizebox{0.1cm}{0.1cm}{{$\uparrow$}}}$


1

You can get a smaller size uparrow using \scriptscriptstyle $x_{1} 1 \uparrow x_{\scriptscriptstyle\uparrow}$ I can't judge if this is a more aesthetically pleasing result, though.


0

You can use flalign* environment for getting the desired result Code: \documentclass[11pt,a4paper,oneside]{report} \usepackage[T1]{fontenc} \usepackage{fouriernc} \usepackage{mathtools} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} \begin{flalign*} N &=\frac{\theta _{1}-\theta _{2}}{f}\left( \left( \theta ...


1

You probably just need to load amsmath, as in the second line below: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation}\label{eq:sinuramp} I(x)= \begin{cases} s(x) & \text{if $x \le L/n$,} \\ s'(L/n)*x - s'(L/n)*L/n+s(L/n) &\text{if $x>L/2$.} \end{cases} \end{equation} \end{document}


0

For anyone in future who comes looking, and as this didn't quite fit in a comment, the spacing between the paragraph and the align can be reduced by using a \vspace with negative spacing after the \singlespacing. Note that there must be a blank line between the preceding paragraph and the \singlespacing otherwise it will make that paragraph single spaced. ...


4

You better use pmatrix: \documentclass[11pt,a4paper]{article} \usepackage{blindtext} \usepackage{amsmath} \begin{document} Preliminary Theorem 1.1.2. If $(\lambda_1,\dots,\lambda_n)$, $(\mu_1,\dots,\mu_n)$, and $(k_1,\dots,k_n)$ are arrangements of $(1,\dots,n),$ then \begin{align*} &ϵ\begin{pmatrix} \lambda_1,\dots,\lambda_n \\ ...


5

The Answer of Mico will definitly work, but will be very costly if you'll write a much longer piece of text (e.g. Master Thesis). Using a koma-script class with the option fleqn (flush left equation) will "align" all equations on the left side: \documentclass[fleqn]{scrartcl} \usepackage{amsmath} \begin{document} \section*{Polynomials} Do the following ...


5

Your objective may be achieved easily by placing the sectioning instructions and short paragraphs inside an \intertext wrapper. In the example below, there is now only one align environment that spans a \section* directive. Do note that some material can not be placed inside \intertext. To play it safe, one should probably provide the instruction ...


2

As the manual for IEEEtran explains, just add the label after \IEEEyesnumber: \documentclass{article} \usepackage{amsmath,IEEEtrantools} \begin{document} \begin{IEEEeqnarray}{CC} \IEEEyesnumber\label{eq:both} \IEEEyessubnumber* bla bla & blub blub \label{eq:sub1}\\ bla bla & bla bla \label{eq:sub2} \end{IEEEeqnarray} where the set of equations ...


4

The cuted package (from the sttools bundle) can temporarily leave two columns mode with its strip environment. An example with the equation entered in the second column: \documentclass[twocolumn]{ltxdoc} \usepackage{mathtools, cuted} \usepackage{lipsum, color} \begin{document} \lipsum[1-2] \lipsum[1] \textsf{\color{red}Equation entered here: } ...


6

I don't think you have a much better option than this. Btw, you seem to use q_A for two different things. \documentclass[twocolumn]{ltxdoc} \usepackage{amsmath} \begin{document} \begin{equation} \sum_{q_\mathrm{tot}=0}^{Q_A+Q_B-2}\sum_{q_A=0}^{q_\mathrm{tot}}{\textstyle\binom{Q_A-1}{q_A}\binom{Q_B-1}{q_B}}x^{q_\mathrm{tot}}, \end{equation} where ...


4

Resizebox should work. \documentclass[twocolumn]{ltxdoc} \usepackage{amsmath} \usepackage{lipsum} \usepackage{graphics} \begin{document} \lipsum[1] \begin{equation} ...


11

You are already using amssymb I hope. Why not look in to the amsmath manual (texdoc amsldoc from command prompt/line). It provides many environments for typing mathematics. For these two equations, you can use gather* (no number). \documentclass[11pt,openany]{book} \usepackage{amsmath,amssymb,showframe} %% showframe for demo only \begin{document} ...



Top 50 recent answers are included