Tag Info

Hot answers tagged

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

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 ...


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

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

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 ...


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 ...


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 ...


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 ...


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} ...


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

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

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{equation} \begin{aligned} & \text{minimise} && COST = A + B \\ & \text{subject to} && A = A_1 + A_2 \\ & ...


2

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


2

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} ...


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} ...


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 } ...


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 ...


1

Copy everything between \begin{equation} and \end{equation}, 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 ...


1

I propose this, built with alignedat, and a smaller vertical spacing between the two parts of the broken line: \documentclass[a4paper, 11pt]{book} \usepackage[utf8]{inputenc} \usepackage{fourier, heuristica} \usepackage{mathtools} \newcommand{\AMod}[1]{\prescript{#1}{}{\text{Mod}}} \newcommand{\BMod}[1]{{}^{#1}\text{Mod}} \usepackage{mathtools, nccmath} ...


1

\documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{equation} \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 + ...



Only top voted, non community-wiki answers of a minimum length are eligible