Tag Info

New answers tagged

2

The empheq package provides clever means to create nice equations. Using wrappers for some other setup requires some work to do (see section 6 Creating something new for examples and descriptions) I've decided to use a special reactempheq environment which uses the common equation counter but applies the (R1) format. The usual empheq environment is not ...


2

Use package amsmath (mathtools), \dfrac and \text: \documentclass[12pt]{article} \usepackage{mathtools} \begin{document} \begin{equation} \Delta L = 0.412 \cdot h \dfrac{(\epsilon_\text{ref} + 0.3) \left( \dfrac{W}{h} + 0.264 \right)} {(\epsilon_\text{ref} - 0.258) \left( \dfrac{W}{h} + 0.8 \right)}\label{for:fringes} ...


1

Use the following command, \begin{equation} \dfrac{\Delta L}{h} = 0.412 \dfrac{(\epsilon_{ref} + 0.3)\left( \dfrac{W}{h} + 0.264 \right)} {(\epsilon_{ref} - 0.258)\left( \dfrac{W}{h} + 0.8 \right)} \label{for:fringes} \end{equation}


1

I am writing this answer based on another answer on this site and upon Christian Hupfer's answer here. There are many other useful points on that question too. %pdfLaTeX \documentclass{book} \usepackage{amsmath} \renewcommand\theequation{\arabic{equation}} \begin{document} \chapter{First} \section{First section} \subsection{First subsection} ...


5

The report class uses chapter.equation numbering, enclosed by parentheses. If the equation number should be used alone without referring to the chapter number, then \counterwithout{equation}{chapter} can be used. It requires chngcntr package, however. \documentclass{report} \usepackage{amsmath} \usepackage{chngcntr} \begin{document} \chapter{First} ...


1

You can obtained the same result with the empheq package (needless to load amsmath in that case): \documentclass[12pt]{article} \usepackage{empheq} \usepackage{xcolor} % Colors \usepackage{soul} % Highlighting and strikeout \newcommand{\MA}[1]{{\sethlcolor{cyan}\hl{#1}}} %highlighting \newcommand*\hlbox[1]{% \colorbox{cyan!30!}{\quad#1\quad}} ...


0

Adding \usepackage{amsmath} to the preamble solved the problem.


2

The answer by Adobe does solve the problem to some extent but is not quite effective. Especially when one sub numbering follows another, only the equation counter is incremented but the internal sub-counter is not incremented. \documentclass{IEEEtran} \begin{document} Numbered equation: \begin{IEEEeqnarray}{rCl} a & = & b \;. \label{eq:tTy} ...


0

After posting, I discovered the MathJAX JavaScript library for (among other things) rendering TeX equations in MathML. I haven't yet had a chance to investigate in detail, but it handled with aplomb some aligns I had lying around. The code to parse TeX equations is as close to a grammar as anything I've seen. If you install a local copy, ...


3

You can nest matrices, just use a matrix environment for the first column of N: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation} \begin{pmatrix} v_a\\ v_y \end{pmatrix} \sim \mathcal{N} \begin{pmatrix} \begin{matrix} \bar{v}_a\\ \bar{v}_y \end{matrix}, & \begin{bmatrix} ...


4

You can simply use \left(...\right) and nest two matrices inside it: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{pmatrix} v_a \\ v_y \end{pmatrix} \sim \mathcal{N} \left( \begin{matrix} \bar{v}_a \\ \bar{v}_y \end{matrix} \mathrel{,} \begin{bmatrix} \sigma_a^2 & \sigma_{ay} \\ ...


6

Just use amsmath as package as one possibility or \binom{n}{k} as the quick alternative (requires amsmath or mathtools however too) matrix is defined by amsmath, so this environment needs the amsmath package. \documentclass{article} \usepackage{amsmath} \begin{document} \texttt{Bad example -- do not use this} \begin{equation} \left( \begin{matrix} n \\ ...


2

\documentclass{article} \usepackage{amsmath} \DeclareMathOperator*\limind{lim\, ind} \begin{document} $\limind_{n\to\infty} a_n$ \end{document}


2

The following solution only works for the standard environment equation without package amsmath. It stores the cite command in macro \@eqcite, which is then set left to the equation number: \documentclass{article} \usepackage{filecontents} \usepackage[backend=biber]{biblatex} \addbibresource{biblatex-examples.bib} \makeatletter \newcommand*{\eqcite}[1]{% ...


2

Nested arrays: \documentclass{article} \usepackage{amsmath} \usepackage{mleftright} \usepackage{relsize} \newcommand{\bigF}{\mathlarger{\mathlarger{F}}} \begin{document} \[ 2\sqrt{y}\,\bigF \mleft( \begin{array}{@{}c|c@{}} \begin{matrix} \dfrac{1}{2} + \dfrac{1}{2(\beta-1)} \\[2ex] 1 + \dfrac{1}{2(\beta-1)} \end{matrix} & y^{\beta-1} ...


3

One option: \documentclass{article} \usepackage{amsmath} \begin{document} \[ 2\sqrt{y}\text{\LARGE $F$} \left( \begin{array}{c|c} \dfrac{1}{2} + \dfrac{1}{2(\beta-1)} & \raisebox{-1.3\normalbaselineskip}[0pt][0pt]{$y^{\beta-1}$}\\[0.75\normalbaselineskip] 1 + \dfrac{1}{2(\beta-1)} & \\ \end{array} \right) \] \end{document}


5

I've searched for five minutes ... Where, may I ask? In a book or user guide on how to write math material using LaTeX, by any chance? Anyway, I suggest you familiarize yourself with the amsmath package and its many environments dedicated to typesetting math material. The align* environment may be what you need. \documentclass{article} ...


2

I strongly support Mico's advice in his answer about switching to one of the environments provided by amsmath. However, if you decide to keep the use of subeqnarray, you need to use \slabel instead of the standard \label command to get the proper string in the cross-references: \documentclass{article} \usepackage{subeqnarray} \begin{document} Some ...


3

I would not use a subeqnarray environment. Instead, I would (a) load the amsmath package and (b) nest an align environment inside a subequations environment. \documentclass{article} \usepackage{amsmath} % for "align" and "subequations" environments and "\eqref" macro \setlength\textwidth{3in} % just for this example \begin{document} \begin{subequations} ...


3

A possible solution. I've modified arraystrech slightly to provide more space around the differentials, they kinda box into each other. I also made two small macro's for the greeks, they felt kinda repetative. \documentclass{article} \usepackage{amsmath} \newcommand\myeps[2]{\varepsilon^{#1}_{#2}} \newcommand\mygam[2]{\gamma^{#1}_{#2}} ...


3

This should get you started : \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{equation} \begin{Bmatrix} \varepsilon^{m}_{xx} \\ \varepsilon^{m}_{yy} \\ \gamma^{m}_{xy} \end{Bmatrix} = \begin{Bmatrix} \frac{\partial u}{\partial x} \\ \frac{\partial v}{\partial y} \\ \frac{\partial u}{\partial y} + \frac{\partial ...


4

Don't abuse \tag; there's no need for the explanation to be flush with the right margin; also, the explanations should be left aligned with each other. Since it's impossible to accommodate those explanations in one line, I use a tabular for splitting them across two lines. Don't forget loading fontenc with the T1 option. ...


2

You could use tabular environments in the argument of \tag* to split the explanations into two parts. \documentclass[11pt,a4paper]{report} \usepackage[utf8]{inputenc} \usepackage[dutch]{babel} \usepackage{mathtools} \begin{document} \begin{align*} \det \begin{pmatrix} 4 & 3 & 2 \\ 3 & -2 & 5 \\ 2 & 4 & 6 \end{pmatrix} &= ...


2

Something like this: Code: \documentclass[11pt,a4paper,openany]{report} \usepackage[utf8]{inputenc} \usepackage{amssymb, mathrsfs} %\usepackage[dutch]{babel} \usepackage{mathtools}%systeme, %\usepackage[amsmath, thref, hyperref, thmmarks]{ntheorem} \begin{document} \begin{align*} \det\begin{pmatrix} 4 & 3 & 2 \\ 3 & -2 & 5 \\ 2 ...


2

Here's a solution that uses "just" an array environment surrounded by \left[ and \right]. (The idea for the extra spacing before the superscript T's comes from egreg's solution.) \documentclass{article} \usepackage{amsmath} \begin{document} \[ \left[ \begin{array}{r} \vec{p}^{\,T}_1+\vec{p}^{\,T}_2=\vec{E}^{\,\textup{miss}}_T,\ p^2_1=0,\ ...


3

If you use the amsmath package then you can use an aligned environment for the inner material. You need to mark some alignment point on each line with &, from your example I have put that at the right-hand end. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \Bigg[\ \begin{aligned} \vec{p}^T_1 + \vec{p}^T_2 ...


4

I'd use (or perhaps, abuse) bmatrix: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \, \vec{p}^{\,T}_1+\vec{p}^{\,T}_2=\vec{E}^{\,\textnormal{miss}}_T,\; p^2_1=0,\; (p_1+p_l)^2=p^2_2=M^2_W, \\[2\jot] \hfill (p_1+p_l+p_{b_1})^2=(p_2+p{b_2})^2=m^2_y \, \end{bmatrix} \] \end{document} Note \, in the exponent of ...


0

Here are two solutions. I used the geometry package, to have more sensible margins, and a split environment. In the second suggestion, I grouped terms in the l.h.s.In both I removed the useless dots, and all \left … \right pairs, replacing only the middle one with a pait \biggl … \biggr (the smaller size \Bigl … \Bigr might be OK too): ...


0

If an equation is too long to fit on a single line, you need to employ an alternative environment that allows for line breaks. The multline environment (provided by the amsmath package) would seem to be well suited for your equation. I would also replace all instances of . and * (dots and stars) with simple thinspaces. \documentclass{article} ...


1

Your equation is too long to fit in one line. You could use the split environment, with the amsmath package, to break it in two or more lines: \documentclass[10pt]{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} ...


2

Here is a solution, based on align*, alignat* and flalign*. I grouped some equations in the same environment, which may be debatable, and decided to put the second part of split equations at end of line. I also systematically used the bmatrix environment, setting a proper value of arraycolsep, rather than repetitively inserting the same length manually: ...


2

I need quit a lot a time to rearrange your MWE ... I strongly suggest you that even in editor you wrote equation on the way, that it is easy find 0 and end of lines (\\) i.e. begining of new line of equation. Beside this for trigonometric function I suggest to use \sin or \cos instead of sin and cos. For aligning equation at some point, for example at equal ...


2

I usually use the align environment. It works pretty much the same way as tables, for example \begin{align} f(x) &= |x|^2\\ &= x\bar x \end{align} All n-th & signs of each line will be placed below each other, and \\ is the line break. If you don't want numbering, you can usealign*


1

You shouldn't manually indent equation with \quad\quad; use the fleqn option to amsmath instead. \documentclass{article} \usepackage[fleqn]{amsmath} \setlength{\mathindent}{2em} % two quads \begin{document} Here is an normal equation with some text above it that should wrap over a couple of lines \begin{equation*} ...


1

I would use flalign and the \mathrlap/\mathclap commands from mathtools (which loads amsmath), which allows to group lines 3 and 4 of the conditions together: \documentclass{article} \usepackage{mathtools} \usepackage{showframe} \begin{document} \begin{flalign} & & \min_{\mathclap{\boldsymbol{\Delta(P,Q),u}}}\quad\sum_i u_i, & & & ...


2

You can use align environment from amsmath package: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} \min\limits_{\boldsymbol{\Delta(P,Q),u}} & \sum\limits_i u_i, \\ \text{s.t.}\phantom{s.t.} & (P_{\min_k},Q_{\min_k}) \leq (P_k,Q_k) \leq (P_{\max_k},Q_{\max_k})\nonumber \\ & -P_k\,C_k \leq Q_k \leq P_k\,C_k, ...


2

write-math.com Direct link to the online service This service allows classification by drawing (even works on mobile devices!) and by text search: Disclaimer: I am the author of the service. Some information The handwriting recognition toolkit (hwrt) is one possibility to classify you recordings. There are still many rough edges and the software gets ...


1

Actually, I found the second answer in my third reference to do the job. \noindent \begin{subequations} \begin{tabularx}{\hsize}{@{}XXX@{}} \begin{equation} \pmb{u} = \pmb{u}_{b} \label{eq:UBCs_D100} \end{equation} & \begin{equation} \pmb{u} = \pmb{0} \label{eq:UBCs_D200} \end{equation} \begin{equation} ...


3

Here's a solution that uses the \everymath and \everydisplay primitives to switch between two pre-defined math versions -- "Asana Math" for inline math and "XITS Math" for displayed equations. The code needs to be run under LuaLaTeX; for some reason, I get a "TeX capacity exceeded, sorry" error message if I try to compile it under XeLaTeX. Caveat: The ...


5

As we are fans of good typography, the discussion about best practises is always mandatory and important. I want to second what Chris says above: Please do not try that at home! % arara: lualatex \documentclass{article} \usepackage{unicode-math} \setmathfont[version=lm]{Latin Modern Math} \setmathfont[version=asana]{Asana Math} \begingroup ...


3

You could use the aligned environment: \documentclass[10pt]{article} \usepackage{amsmath} \usepackage{hyperref} \begin{document} \begin{equation} \begin{aligned} a &= b\\ &= c\\ &= d\\ &= e\\ &= f \label{eq:EqAligned} \end{aligned} \end{equation} Equation \ref{eq:EqAligned}... \end{document} It ...


13

A solution that uses calc to determine the position of the double arrow: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[execute at begin node = $\displaystyle, execute at end node = $] \node (eq) {\sqrt{\frac{N}{p(1-p)}}}; \draw[<->] ($(eq.north east)!.3!(eq.south east)$) ...


15

Here is something that should get you started on using tikzmark: Notes: This does require two runs. First one to determine the locations, and the second to do the drawing. There probably are easier ways to determine the locations. Code: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{calc} ...


3

You should used the mhchem package, which eases typsetting chemical reactions/compounds. If the chemgreek package is installed, mhchem will load it so as to have upright greek letters: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[TS1,T1]{fontenc} \usepackage{amsmath} \usepackage{newtxtext,newtxmath,amsmath} \usepackage{mhchem, textcomp} ...


7

For example, package mhchem can be used to typeset the chemical formulas. The letters of a chemical symbol are usually put upright. The permille sign can be set as \textperthousand in text mode (\text with package amsmath or amstext or \mbox). The example goes a step further and uses package siunitx for setting the number with "unit" permille. ...


4

How about this? I've used the mhchem package for the Zn. I highely recommend it to simplify any chemical typesetting needs. \documentclass{article} \usepackage[T1]{fontenc} \usepackage[version=3]{mhchem} \begin{document} \begin{equation*} \delta\thinspace\ce{^{66}Zn} = ...


0

Slitly simplified and less fancy as proposed in @Peter Grill answer: \documentclass{article} \usepackage{empheq} \begin{document} I want this to be left-aligned in the same position as the following equations, with no indentation from the left margin \begin{empheq}[box=\fbox]{flalign*} F & = ma && \text{Newtons famous equation.} & ...


1

Here is an example of using falling and tikzmark to place a box around he entire set of equations: Notes: This does require two runs. First one to determine the locations, and the second to do the drawing. Also note the trailing & on the F = ma. This is required to get the equations al the way to the left. Code: \documentclass{article} ...


7

You did not give many hints but you have defined \rp by \newcommand\rp{$r_{p}$} which is incorrect, such a command can never be used in math mode. You need \newcommand\rp{r_{p}} or simply use r_p without defining a command at all.


2

Another solution that uses the \newtagform and \usetagform, from mathtools, and the apptools package to automate thu use of these commands. Additionally, I changed you partial derivatives to fractions, with the easy syntax of the esdiff package. I also loaded the geometry package to keep equations on one line, and grouped the two align environment in a ...



Top 50 recent answers are included