New answers tagged

0

This worked great for me: \begin{align} V_{t}(K_{t},EF_{t}^{(s)})=&\max\limits_{\left\{ I_{\tau }\right\} _{\tau =0}^{\infty }}E\left\{ \sum_{\tau =0}^{\infty }\beta ^{\tau }\left[ \pi (K_{t+\tau },EF_{t+\tau }^{(r)})\right.\right.\nonumber\\ &\left.\left.-I_{t+\tau }-C(I_{t+\tau },EF_{t+\tau }^{(s)})\right] ...


3

Following solution uses your TikZ code but with some minor corrections. Now both matrices are inside the same figure and also the lower braces. To correctly align them inside the equation, (m1.west) is the baseline point. \documentclass{scrreprt} \usepackage{amsmath,bm} \usepackage{tikz} \usetikzlibrary{arrows,matrix,positioning,decorations.pathreplacing} ...


3

I removed your tikz constructs and replaced them with something I found in another answer and everything worked fine by using the normal \underbrace \documentclass{scrreprt} \usepackage{amsmath,bm} \def\mykern{\kern-\fboxsep\kern-\fboxrule} \def\cfbox#1{\mykern\smash{\protect\fbox{#1}\mykern}} \fboxrule=1pt \begin{document} \begin{equation} \bm{Bu}= ...


2

Instead of juggling with \addtocounter{enumi} etc it's better to use enumitem and it's start=... option. The \getrefnumber{...} macro from refcount provides an aid to get the real 'number' of an reference -- \ref isn't expandable and will fail here. Please note: \getrefnumber{...} will yield anything as equation number here, i.e. something 1.A.5 would be ...


1

Here's a solution that uses a gather* environment instead of an align* environment. Just as @Werner does in his answer, I would recommend that you write variable names in an upright-text font face instead of a math-italic font face. I will admit to not being certain how the string "A-taskarea" should be typeset. In the code above, I've chosen to typeset ...


2

Perhaps the following is a starting point: \documentclass{article} \usepackage{amsmath} \newcommand{\HS}{\text{HS}} \begin{document} From~(1) and~(2) we obtain \begin{align*} \HS_{\text{opt}} &\leq (\HS_1 + \HS_2 + \dots + \HS_i) + \HS_i \times \bigl( (A\text{-taskarea}) \div \HS_i \bigr) \\ \Longrightarrow \HS_{\text{opt}} &\leq ...


4

You can use aligned or alignedat: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} \begin{split}\label{mylabel} y &= a + b + c\\ &\quad \!\begin{alignedat}[t]{2} &+ (5 - 3) &&\times (10 - 5) \\ &+ (10 - 30) &&\times (10 - 1) \\ ...


3

A Tikz version. Output Code \documentclass{article} \usepackage{tikz} \newcommand\arrd[1]{ \tikz[baseline, inner xsep=-1cm]{ \draw[->] (0,.4) -- (0,-.2) -- (-.1,-.3) node[below, font=\tiny] {#1}; }\ % for spacing } \begin{document} $V_u = V_i \frac{g_m}{1+g_mR_s} \arrd{$id$} R_d \arrd{$V_{R_d}$} (-1) \arrd{$V_u$}$ \end{document} ...


3

A nested stack. I introduce \dnAr[<size>]{<label>} to do so, where <size> is stuff like \bigg (the default). In the 2nd example, I exercise the optional argument to \dnAr. \documentclass{report} \usepackage{stackengine,graphicx} \newcommand\dnAr[2][\bigg]{\ensurestackMath{% \stackengine{-0.3pt}{#1\vert}{% ...


2

I think you could show fewer equations if you used words to explain the necessary steps. The steps as far as the first integration could be presented as follows. \documentclass[12pt,twoside]{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} We start from the fact that \begin{equation*} \frac{ \displaystyle g(v)}{\displaystyle ...


0

I propose to use array for the first series, and align* for the second. I change the size of the delimiters: most of them were too large, at least for my taste: \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[showframe]{geometry} \usepackage{mathtools, cancel, array, amssymb} \begin{document} \[\renewcommand\arraystretch{1.5} ...


0

Here is a slight variation on John Kormylo's solution using the AMS align* environment. The align* environment organises alignment in "pairs" so I have separated the \Longrightarrow from the equations with a && and then there is a second alignment around the equals signs. For the first set of equations this produces (the second set I imagine is much ...


0

I'm not sure if this looks any better, but here is a version using align*. \documentclass[12pt,twoside]{article} \usepackage{amsmath} \usepackage[makeroom]{cancel} \usepackage{amssymb} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{graphicx} \usepackage{soul} \usepackage{calc} \usepackage{showframe} ...


1

In relation to the last two examples, the units should be shown in square brackets, not parenthesis. This is part of the conventions used in the SI and it was discussed in other articles like Unit column in table with square brackets and siunitx.


2

A bit tricky, but resorting to inline math seems worth the pain. \documentclass{article} \usepackage{amsmath} \usepackage{lipsum} % just for the example \begin{document} \lipsum*[2] \begin{equation*} \mathrm{Vect} = \biggl( \begin{minipage}[t]{.85\displaywidth} % make locally the comma to allow line breaks \mathchardef\comma=\mathcode`, ...


0

Also you can use this option Indented for this the option fleqn must be inserted in the menu Document ▷ Settings under Document Class


1

The problem partly comes from your box wider than \linewidth – and a possible bug. I propose, in the spirit of @Barbara Beeton's comment, to mimic your \widefbox with a simple \boxed command and an alignedat environment: \documentclass[11pt]{article} \usepackage{showframe} \usepackage{empheq} \newcommand*\widefbox[1]{\fbox{\hspace{1em}#1\hspace{1em}}} ...


2

You're missing an \end{split} statement before \intertext. \documentclass{article} \usepackage{amsmath} % for "align" and "split" environments and "\intertext" macro \begin{document} \begin{align} \begin{split} a&=xxxxxxxxxxxxx\\ &=xxxxxxxxxxxxxxx\label{1} \end{split} % <--- new \intertext{and} \begin{split} b&=yyyyyyyyyyyyy\\ ...


6

You don't have to write the equation twice: you have to write the relation symbol w.r.t. which the dots will be centred. Illustration with \vdotswithin and \shortvdotswithin: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align} x_{0} & = y + m_{0} \\ x_{1} & = y + m_{1} \\ & \vdotswithin{ = }\notag \\ ...


6

I think you can simplify a bit and use something like this (from the amsmath package): \begin{align} x_{0} &= y + m_{0} \\ x_{1} &= y + m_{1} \\ &\;\;\vdots \notag \\ x_{n} &= y + m_{n} \end{align} The notag command removes the equation numbering from the line with the vertical dots. I am sure there is a way of adding the exact ...


3

The simplest is probably to load the empheq package, which defines the eponymous environment, and use the left = key. Note you don't have to load amsmath in this case, since it loads mathtools, which itself loads the former. I added a second solution, if you want to put $\Omega:$ in front of only the first two equations, based on blkarray. ...


3

You need align instead of equation and than repeat aligned ... \documentclass{article} \usepackage{mathtools} \usepackage[active,displaymath,tightpage]{preview}% <-- for showing only equations \setlength\PreviewBorder{1em} \begin{document} \begin{align*} \Omega :&\ \begin{aligned} \dot x & = ...


2

use \left. \begin{aligned}.....\end{aligned}\right. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \Omega : \left. \begin{aligned} \dot x &= \omega(b) \\ p &= \sigma(z)\\ m &= \xi(k)\\ q &= \dot {\partial L}{\partial q} \end{aligned} \right. \end{equation*} \end{document}


3

Its a simple by aligned environment: \documentclass{article} \usepackage{mathtools} \usepackage[active,displaymath,tightpage]{preview} \setlength\PreviewBorder{1em} \begin{document} \begin{equation*} \Omega : \begin{aligned} \dot x & = \omega(b) \\ p & = \sigma(z) \end{aligned} \end{equation*} ...


1

See, it this MWE gives what you like to achieve: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align*} u_i(a_1,x_2,x_3) - u_i(-a_1,x_2,x_3) = 2a_1\varepsilon_{i1}^0 &\quad \begin{aligned} -a_2\leq x_2 & \leq a_2\\ -a_2\leq x_2 & \leq a_2 \end{aligned} \\ ...


1

You can use an array environment: \[ u_i(a_1, x_2, x_3) - u_i(-a_1, x_2, x_3) = 2a_1\varepsilon_{i1}^0 \qquad \begin{array}{c} -a_2 \leq x_2 \leq a_2 \\ -a_3 \leq x_3 \leq a_3 \end{array} \]


1

You could insert \nobreak instructions after \tilde{a}_{2} and \tilde{a_{3}}, respectively. (The latter expression should probably be \tilde{a}_{3}, right?)


5

What you are looking for is dgroup. If you want to align several equations, you put each of them in a dmath environment and all the dmath environments are put inside a dgroup environment. Nobody will have understood this last sentence, but the following example will make it clear. \documentclass{article} \usepackage{breqn} % Macro for Euler's number ...


4

LaTeX answer Never ever use $$ in LaTeX; see Why is \[ ... \] preferable to $$ ... $$? Of course, loading amsmath is recommended, so the equation can be typed in as \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} E=mc^2+\dots+\frac{GmM}{r^2}+\dotsb. \end{equation*} \end{document} Note that you have to help LaTeX and ...


2

What are all those zeros good for, why not just write that this is a diagonal matrix with these entries: \documentclass[12pt,a4paper]{report} \usepackage{amsmath,mathtools} \DeclareMathOperator\diag{diag} \begin{document} \begin{equation} \begin{split} Y_{12} = -\diag\Bigl( & \frac{1}{x'_{d1}}, \frac{1}{x'_{d2}}, \frac{1}{x'_{d3}}, ...


1

Change the value of \arraycolsep or reduce the size of the font with the \medmath command from nccmath(about 80 % of displaystyle). You also can load geometry to have more sensible margins, if you don't use margin notes. \documentclass[12pt,a4paper]{report} \usepackage{mathtools, nccmath} \usepackage{showframe} ...


0

If the equations in the left- and right-hand columns have (roughly) equal heights, it suffices to insert the instruction \noindent after begin{multicols}{2}.


1

For such a cases package amsmath or mathtools, which enhance amsmath provide environments multline and multlined. With latter one you can obtain: with following code: \documentclass[twocolumn]{article} \usepackage{mathtools} % only for show equation alone \usepackage[active,displaymath,tightpage]{preview} \setlength\PreviewBorder{1em} ...


1

Prоbably like this? \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} P_{n_i}(e,(t+1)) = p_{n_i}(e,t)+\eta_{n_i}[\bar{U}_{n_i}(e)\\ & -\bar{U}_{n_i}]p_{n_i}(e,t) \end{split} \end{equation} \end{document}


1

I'm not sure what \tiny~ is supposed to do, except for issuing several warnings. You want to use the [t] option to minipage, but correct the inserted vertical spaces \documentclass[11pt, a4paper, twoside, openright, titlepage]{book} \usepackage[english]{babel} \usepackage{amsmath,amssymb} \usepackage{calc} \usepackage{ltxtable} \newsavebox{\try} ...


0

Since the OP indicated my comment solved the problem, I repost it as an answer. Here, I manually apply a \raisebox to the \usebox{try}, in order to align baselines with the top row. \documentclass[11pt, a4paper, twoside, openright, titlepage]{book} \usepackage[english]{babel} \usepackage{amsmath,amssymb} \usepackage{ltxtable} \begin{document} ...


3

It does not work because you use \AtBeginEnvironment to set the label, while the equation counter has not yet been stepped, meaning that the label 1 is not defined when you try to use it, only the label 0 is. From the documentation: \AtBeginEnvironment{<environment>}{<code<}: Appends arbitrary <code> to a hook executed by the \begin ...


2

It is not really clear, what you want to do as you have not given us an MWE. But here is how I would typeset this: % arara: pdflatex \documentclass{IEEEtran} \usepackage{blindtext} \usepackage{microtype} \begin{document} \blindtext \begin{equation}\label{eq:overall_pd} P_{n_i}\bigl(e,(t+1)\bigr) = p_{n_i}(e,t) +\eta_{n_i}\bigl[\bar{U}_{n_i}(e) ...


0

On a Mac, you can change the mode of LaTeXiT by clicking on one of the buttons above the main window. It should avoid problems with the preamble and postamble.


3

Actually, I think that the problem is that you are "misusing" \tfrac because it is meant to fractions in in-line text. If instead you use \frac then the latex markup is simpler your problem goes away: The code: \documentclass{amsart} \begin{document} \textbf{With tfrac} \begin{equation} ...


6

Why not : \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{equation} X=\tfrac{2J^2}{4J^2+U^2\!/4} \sin^2\bigl({\scriptstyle t\,\sqrt{4J^2+U^2\!/4}}\bigr) \end{equation} \end{document}


2

I define a new environment, inlineEq, which puts the equation on the same line as the current text, centred w.r.t. remaining white space on the line. It can be referenced. \documentclass{report} \usepackage{mathtools, amsfonts} \usepackage{lipsum} \newenvironment{inlineEq}[1]{% #1\vspace*{-1\baselineskip}\equation\phantom{\mbox{#1}}}% {\endequation} ...


2

Here is a quick hack for moving the equation "up" so that it is on the same line as the "some text". This is done with a new environment itemequation that adjusts for the newline. If the text is too long, however, the equation will write over the top of the text. On the other hand, it not clear from the question what should happen in such cases. Here is ...


5

I think maybe you'll have too great a contrast betwwen different parts of your formula. I suggest using the\medmath command, from nccmath, which reduces displaymath by about 80 %. Compare: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{mathtools, nccmath} \begin{document} \begin{align*} X & ...


5

Do you mean like this? \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage[ascii]{inputenc} \usepackage{amsmath} \begin{document} \begin{equation} X=\tfrac{2J^2}{4J^2+U^2/4} \scriptstyle \sin^2\bigl(({\sqrt{4J^2+U^2/4}})t\bigr) \end{equation} \end{document} Or maybe you prefer this (bigger “sin”, amended spacing, resized ...


2

refcheck needs to hook into \ref and other, related commands, which isn't possible anymore, if those commands are changed later on (and again) by hyperref and bookmarks: Solution: Load refcheck after bookmarks refcheck is one of the rare packages that must be loaded after hyperref etc. \documentclass[preprint,12pt, sort&compress]{elsarticle} ...


5

One approach is to right-align both matrices, using \begin{bmatrix*}[r]…\end{bmatrix*} (from the mathtools package) instead of bmatrix. Then, adding \phantom{-}0 to entries in the second and third columns of the first matrix will add the correct amount of space. \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align} % ...


2

I will update with the vertical version Use \text{..} for normal (explanatory) text in equations. It's better to use \ce{...} from mhchem to display the isotopes and the arrow, however, in my point of view. I've given some variants: \documentclass{article} \usepackage[version=4]{mhchem} \usepackage{mathtools} \begin{document} Original version ...


2

You can use \substack from the mathtools package, as that command is designed exactly to stack multiple subscripts. If you want more spacing between the two lines, you can add e.g. \\[0.3ex] (or any other amount) instead of \\ in the argument to the \substack command. \documentclass[preview,border=2mm]{standalone} % Only to get minimal output ...


5

The fouridx package gives slightly better spacing for the right exponent: \documentclass{article} \usepackage{amsmath} \usepackage{fouridx} \begin{document} \begin{gather*}% {}_{k₀\!}^{\strut}\Delta_k^{(n)} \\% \fourIdx{}{k₀}{(n)}{k}{\!Δ} \end{gather*}% \end{document}



Top 50 recent answers are included