# Tag Info

## New answers tagged equations

-1

You can also use inline equations: $\cos\alpha=\frac{u\times v}{|u| \times |v|}$

3

It's easy with alignat, using \tag for suppressing the advancement of the numbering and setting the referenced equation number instead. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{subequations}\label{eq:foo} \begin{alignat}{2} \max &\quad& z &= a + b \tag{\ref{eq:foo}} \\ \text{s.t.} & & a &> ...

2

First off: Don't use eqnarray. It's badly deprecated. Use one of the multi-line equation environments of the amsmath package instead. If your formatting need is one-off, it's probably not worth the overhead to set up a separate environment. Instead, simply use \tag and \ref directives. \documentclass{article} \usepackage{amsmath} \begin{document} ...

1

Use the gather environment and the \intertext command. Btw, you don't have to put the equation numbers by yourself. Also, I propose to load the cleveref package: in cross references, you won't even have to type ‘equ.’, since cleveref knows (most) counters, and adds the counter name before its value. \documentclass{report} \usepackage{mathtools} ...

1

Especially since you're already loading the amsmath package, you should look into using that package's gather environment to typeset a collection of displayed, numbered equations. Use \intertext{...} to intersperse text between some of the equations. Some side remarks: For the sake of good (math) typography, consider getting rid of all \cdot directives and ...

2

I've redefined the \theequation with some query about the value of the counters: \renewcommand{\theequation}{% \ifnum\value{subsection} > 0 \ifnum\value{subsubsection} > 0 \thesubsubsection-\arabic{equation} \else \thesubsection-\arabic{equation} \fi \else \thesection-\arabic{equation} \fi } ...

0

the sloved in example insert > math > arry environment.

0

In lyx: 1- insert > math > arry environment. 2- in first row: add ( W ... = ) in the first square, then add ( min ) in the 2nd square. 3- in 2nd row: let first square empty. in the 2nd square add ( R ... ). Without any tex code. Regards

4

If you just wish to use this for one counter, here equation, then you can add the following code to the appropriate sectioning commands \usepackage{etoolbox} \cspreto{section}{\setcounter{equation}{-1}\stepcounter{equation}} \cspreto{subsection}{\setcounter{equation}{-1}\stepcounter{equation}} where \cspreto is defined in the etoolbox package. This is ...

0

Just do: % arara: pdflatex \documentclass{article} \usepackage{etoolbox} \pretocmd{\section}{\setcounter{equation}{0}}{}{} \pretocmd{\subsection}{\setcounter{equation}{0}}{}{} \begin{document} \section{One} $$2+2=3.99$$ $$\pi^2=9.86$$ \section*{Two} ...

4

The behaviour in your example is correct. Using \counterwithin*{equation}{section} makes the equation counter into a subcounter of the section counter. However \section* doesn't change the section counter, so the equation counter is not reset. It's not too difficult to hack our way around this. The \stepcounter command increases the value of a counter by ...

1

Copy everything between $$and$$, that is W(\mathbf{F},\lambda_{\chi})=\min_{\mathbf{R}\epsilon S^{2}} (I changed the \textbf to \mathbf)$$and$$paste it into a math-environment in LyX, just using Ctrl + V, not Paste Special. With a normal displayed equation, added with Ctrl + Shift + M, you will get Pasting everything ...

3

As @vonbrand said, you can easily write systems of equations using systeme package, sadly for me the documentation is in french. Code: \documentclass{article} \usepackage{systeme} \begin{document} \systeme{3x+2y-5z=4,2x+4y-z=12,-4x-8y+9z=-6}%Default settings \medskip \sysdelim{.}{.}\systeme{3x+2y-5z=4,2x+4y-z=12,-4x-8y+9z=-6}%Without the left brace ...

0

The systeme package (in TeXlive and MikTeX) is geared towards this. Haven't used it, though.

4

Variant with \hphantom \documentclass{article} \usepackage{amsmath} \begin{document} \begin{flalign} & \mathbin{\hphantom{+}}3x+2y-5z=\hphantom{+0}4 \\ & \mathbin{\hphantom{+}}2x+4y-\hphantom{1}z=\hphantom{+}12 \\ & -4x-8y+9z=\hphantom{0}{-}6 & \end{flalign} \end{document} The space after the = is a little too large, because the ...

2

If it is just breaking, you can use multlined from mathtools (which is an extended form of amsmath) \documentclass[a4paper]{article} \usepackage{mathtools} \begin{document} \begin{aligned} & \text{minimise} && COST = A + B \\ & \text{subject to} && A = A_1 + A_2 \\ & ...

1


2

Here's a quick suggestion (also using the align environment): \documentclass[]{article} \usepackage{amsmath} \begin{document} \section*{Original (\texttt{aligned})} \begin{aligned} & \text{minimise} && \text{COST} = A + B \\ & \text{subject to} && A = A_1 + A_2 \\ & ...

1

\documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{aligned} & \text{minimise} & COST &= A + B \\ & \text{subject to} & A &= A_1 + A_2 \\ & & B &= \! % feature \begin{aligned}[t] &B_1 + B_2 + B_3 + B_4 + ...

4

As mentioned by egreg, it's easy using cleveref (which must be loaded after hyperref). Simply define \crefformat{equation}{#2equation~#1#3} \Crefformat{equation}{#2Equation~#1#3} The arguments #2 and #3 are used to mark the beginning and end of the part of the cross-reference that forms the hyperlink when the hyperref package is used. Then simply use ...

4

As Egreg mentions, you can use cleverref, if you do not want to you can use something similar to this.We use the fact that \ref* (aka non-link ref) in hyperref is the macro \@refstar. Thus inside the new \eqref we make the link via \hyperref[target]{text} and make sure that text itself, does not contain any hyperrefs (as nested hyperlinks does not really ...

4

I propose one of these variants.I replaced := with \coloneqq form mathtools to have a vertically centred colon w.r.t. the axis of the = sign: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{alignat}{2} &\mathrlap{\lvert\Theta_P\rvert = \binom{\lvert P\rvert}{2} \land P \not= \emptyset}\$1.5ex] & \forall D_n \in ... 3 You can try this way: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \Phi_{11} & \Phi_{12}\\ \Phi_{21} & \Phi_{22} \end{bmatrix} =\frac{1}{\det (X)} \begin{bmatrix} X_{22} Y_{11} - X_{12} Y_{21} & X_{22} Y_{12} - X_{12} Y_{22}\\ X_{11} Y_{21} - X_{21} Y_{11} & X_{11} Y_{22} - X_{21} Y_{12} \end{bmatrix}$ ...

3

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{gather} \begin{bmatrix} \Phi_{11} & \Phi_{12} \\ \Phi_{21} & \Phi_{22} \end{bmatrix} = \frac{1}{\det(X)} \begin{bmatrix} X_{22} Y_{11} - X_{12} Y_{21} & X_{22} Y_{12} - X_{12} Y_{22} \\ X_{11} Y_{21} - X_{21} Y_{11} & X_{11} Y_{22} - X_{21} Y_{12} ...

6

The equation environment is for single line (or single split) equations; in this case you do need align. The first split is redundant and \\ before \end{split} should be omitted. Also \choose should not be used with amsmath and \binom{|P|}{2} is the correct syntax. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} ...

4

Here's another option using the tikzmark library; the basic idea is to place some marks that will be later used to draw the braces with the arrows and place the explanatory texts: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{tikzmark,decorations.pathreplacing} \begin{document} \begin{equation*} \implies \frac{d}{dt} ...

4

Adapting my answer at LaTeX package to help diagram translation of one language to another, I provide a first cut. The syntax is \notate[B<race>]{<referenced math>}{<dropline length in \baselineskips>}{<math notation>} The <math notation> can be given as a \parbox, if longer text is needed (shown in first example below). ...

1

You can have more alignment points in the same align or you use an alignat environment. But here is what you have asked for (in case I got you right): % arara: latex \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align} \begin{array}{p{0.8 cm} p{6.2 cm} p{3.2 cm}} % reduced the width in order to fit on the line s.t. ...

3

You either want fourier (in order to get the document in Utopia) or mathptmx (so the font will be Times Roman). Not both: see Incompatibilities between fourier and other mathfont for another similar situation. Loading both packages will result in a disaster, because fourier uses non standard math font encodings, which are set at \begin{document}, so many ...

3

I'm not really sure your readers will be happy: \documentclass{article} \usepackage{amsmath} \usepackage{environ} \usepackage{lipsum} \makeatletter \NewEnviron{shortequation}{% \sbox\z@{\let\label\@gobble$\displaystyle\BODY$}% \parbox{\dimexpr\wd\z@+4em}{ \vspace{-\baselineskip} \begin{gather} \BODY \end{gather} ...

2

You have to introduce a line break in the fourth equation. However, that's not the only adjustment you should perform. I suggest you do the following: use enumerate environments; this will give you typographically sound amounts of indentation of the various items. Also, get rid of the manual line breaks. remove the instances of =$>$, as they are ...

1

You can use \hat in a math environment: \documentclass[]{article} \begin{document} $$\vec{r}_1=r_1\hat{r}_1=-r_1\hat{e}_r$$ \end{document}

1

1

You could use side-by-side minipage environments, each 0.5\textwidth wide. Use an equation* environment in the first, and an equation environment in the second. \documentclass{article} \usepackage{amsmath} \usepackage[margin=1in]{geometry} \begin{document} \setcounter{equation}{7} % just for this example \noindent Therefore, the consumption-based price ...

0

There's no need for using a "two-column layout" here. Instead, use a single equation with either a fixed space between (something like \qquad) or one of amsmath's align-like environments to spread out the equations evenly: \documentclass{article} \usepackage[margin=1in,showframe]{geometry}% Just for this example \usepackage{amsmath,mleftright} ...

2

Given the desired output, I think that using multicols and two equation environments is not the right tool for the job at hand. You can either use just one equation adding some horizontal spacing or some other of the amsmath's environments if multi-row alignment is desired: \documentclass{article} \usepackage{amsmath} \begin{document} $P_{O,t}$ are the ...

3

Some thing like this? \documentclass[11pt,a4paper]{article} \usepackage{mathtools} \newlength{\mylen} \settowidth{\mylen}{$(a^3+2a^2b+ab^2) + (a^2b+2ab^2+b^3)$} \begin{document} aaa \vspace{17cm} \begin{align*} \mathmakebox[\mylen][r]{(a+b)^3} &= (a+b)^2(a+b) \\ &=(a^2+2ab+b^2)(a+b) ...

2

amsmath provides the flalign environment. It is designed for placing two sets of aligned equations, the first block flush on the left margin, the second flush on the right, e.g. \begin{flalign*} x & = A & y &= B \end{flalign*} produces |x = A y = B| The first and third & here provide aligment ...

2

I would just use minipages. For example: \documentclass{article} \begin{document} by the following CES aggregators: \noindent \begin{minipage}{.5\textwidth} $$C_{O,t}$$ \end{minipage}% \begin{minipage}{.5\textwidth} $$C_{Z,t}$$ \end{minipage} \end{document}

0

You could use \overbrace and \underbrace: \documentclass{article} \usepackage{amsmath} \begin{document} $$\overbrace{a}^{\text{output}} = \underbrace{b}_{\text{significant}} + \underbrace{c + d}_{\text{non significant}}$$ \end{document}

1

Environment multline could be misused to place the split to the left, because the first line of multline is left aligned with indent \multlinegap, which can be set to zero. Then split needs to be changed to aligned, because multline prefers the latter. Example with a horizontal rule to show the text width: \documentclass{article} \usepackage{amsmath} ...

3

You also can have several alignment points per line. For one number for each group, use the nested environments: gathered, aligned, multlined (the latter if you load mathtools instead of amsmath). You also can have subnumbering (1a, 1b, &c.) with the subequations environment: \documentclass{article} \usepackage{mathtools} \usepackage{showframe} ...

2

Or \documentclass{amsart} \begin{document} \begin{gather} \left\{ \begin{aligned} S &=\sum\limits_{i=1}^{8}A_i,\\ S&=\sum\limits_{i=1}^{8}B_i,\\ S&=\sum\limits_{i=1}^{8}C_i,\\ S&=\sum\limits_{i=1}^{8}D_i. \end{aligned} \right. \end{gather} \end{document}

4

Package amsmath provides many environments for equations, e.g.: gather for centering equations by default align, which allows vertical alignments Example: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{gather} S=\sum_{i=1}^{8}A_i\\ S=\sum_{i=1}^{8}B_i\\ S=\sum_{i=1}^{8}C_i\\ S=\sum_{i=1}^{8}D_i \end{gather} ...

3

I assume you don't want the display in the list of figures, so I add an empty short caption and also singlelinecheck=false from the caption package. \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \usepackage{caption} \usepackage{hyperref} \begin{document} \begin{figure}[htp] \captionsetup{singlelinecheck=false} \centering ...

3

You need to either \protect the minipage and the align or to use the optional argument for caption (which is a good idea if you are going to generate a list of figures to give an entry for the LoF without the equation); loading the caption package also gives you line breaks: \documentclass{article} \usepackage{amsmath} \usepackage{caption} ...

2

You can use the align environment like follows. The & character places an alignment vertical anchor for the align environment. \documentclass{report} \usepackage{amsmath} \begin{document} Each step of the expression can be referenced easily~\eqref{Equ.3.3},~\eqref{Equ.3.4} and~\eqref{Equ.3.5}. \begin{align} V' &=e^{(ja)}\times V \label{Equ.3.3}\\ ...

4

Not sure what this is for. The trick is to add \setcounter{equation}{0} to all the relevant structures. \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \preto\equation{\setcounter{equation}{0}} \makeatletter \pretocmd\start@gather{\setcounter{equation}{0}}{}{} \pretocmd\start@align{\setcounter{equation}{0}}{}{} ...

3

You first of all need to detach \eqref and the equation number making macros. Then you can redefine \tagform@ to add a space as wide as a digit in case the equation number is less than 10. \documentclass{article} \usepackage[leqno]{amsmath} \usepackage[shortlabels]{enumitem} \makeatletter % detach \eqref and \tag making ...

3

Maybe you find the following approach useful: \documentclass[11pt,leqno]{article} \usepackage{amsmath,amssymb,enumerate} \usepackage{calc,changepage} \usepackage{lipsum} \newenvironment{textwide}% environment for display math in lists {\begin{adjustwidth}{-\leftmargin-\labelwidth+\labelsep+\itemindent}{}% \vspace{-1em} }{\end{adjustwidth}} ...

Top 50 recent answers are included