# Tag Info

## New answers tagged amsmath

5

The warning indeed comes from the amsmath package. The \over syntax causes technical difficulties for writers of math packages, so the amsmath folks are venting their frustration by redefining \over to print a message, and then act normal. The simplest way to stop this warning from appearing in the output is restore the original definition of \over. ...

3

For adding Eq. use cleveref. For the equation numbers in the margin: \documentclass[leqno]{article} \usepackage{amsmath} \usepackage{etoolbox} \usepackage{lipsum} \makeatletter % detach \eqref processing from \tag processing \let\tagform@ref\tagform@ \let\maketag@@@ref\maketag@@@ \patchcmd{\eqref}{\tagform@}{\tagform@ref}{}{} ...

1

Try this: \documentclass{article} \usepackage{empheq} \newcommand\exactfbox[1]{\fbox{\hskip1em#1\hskip1em}} \begin{document} \begin{empheq}[box=\exactfbox]{align*} x &= 1 \\ y &= 1 \end{empheq} \end{document}

2

Use the sledge hammer trio : amsmath, empheq and tcolorbox: \documentclass[14pt,a4paper,headlines=6,headinclude=true]{scrartcl} \usepackage{empheq} \usepackage[theorems,skins]{tcolorbox} \newtcbox{\mybox}[1][]{nobeforeafter,math upper,tcbox raise base, enhanced ...

3

As long as you are always grouping things on the right, you can make this work by making the right-hand side right-aligned (using an alignat environment), and then adding an appropriate amount of space on the right to get the alignment under the brace. This technique also works equally well for grouping on the left. \documentclass[a4paper]{article} ...

3

Here is an alternative view on the grouping, which might be of interest: \documentclass{article} \usepackage{mathtools,calc} \begin{document} %\setlength{\jot}{.5\jot} Adjust to bring the equations closer vertically \begin{aligned} 1 + 1 + 1 &= 1 + \underbrace{1 + 1} \\ &= ... 2 As long as we add not too many one-cipher numbers, we can use the effect, that all ciphers have the same width. It gives a little bit more general solution, then the one of the predecessor. \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \[ \begin{array}{r@{{}={}}c} 1 + 1 + 1 +1& 1 + 1+ \underbrace{1 + 1} \\ ... 2 You can use array instead of aligned if this this what you require: \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{array}{rcc} 1 + 1 + 1 &= &1 + 1 + 1 \\ &= &\underbrace{1 + 2}\\ &=&3 \end{array} \end{document} 3 Use the proper family number for j: \documentclass{article} \usepackage{amsmath} \usepackage{fontspec} \usepackage{unicode-math} \setmainfont{Minion Pro} \setmathfont{MnSymbol} \setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Minion Pro} % this is number 4 \setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]{MinionPro-Bold} ... 5 \documentclass{article} \usepackage{amsmath} \usepackage{fontspec} \usepackage{unicode-math} \AtBeginDocument{\Umathcode`j="0"0"6A } \begin{document} $$j ~~\text{is}~~ \mathrm{j}$$ \end{document} I don't have MinionPro. but here is your extended version using Arial (you want 6) \documentclass{article} ... 4 Yet another method is to use the array construct from amsmath package. \documentclass{article} \usepackage{amsmath} \begin{document} $$\left[ \begin{array}{@{}*{11}{c}@{}} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11\\ \end{array} \right]$$ \end{document} 1 Yet another method is to use the array construct from amsmath package. \documentclass{article} \usepackage{amsmath} \begin{document} \left| \begin{array}{@{}*{19}{c}@{}} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 ... 5 Here are some things I'd do: Equation 1: Replace \max_&Z ~ with \max_Z & (the ~ isn't needed) Equations 2 and 4: replace \mbox{s.t.~} with \text{s.t. } Equation 3: Supply a _ in front of j\in N, to make sure that this string is placed below the summation sign (3 instances) Omit \limits after \sum, since you're already in display math mode ... 4 None of the align, gather and equation environments must be typeset within of a ... pair, since those environments start the math mode for themselves. This is true for the starred variants of the mentioned environments as well. Some side remarks: Use \sin instead of sin -- it's a math operator which should not be typeset in italics. \dfrac{}{} is ... 5 A quicker workaround, regardless which package is loaded first, is to use \numexpr from e-tex extensions (which should be available for basically any TeX distribution nowadays). It expands the values of the calculation before it's advance by \addtocounter In the following MWE the result is, as expected, 100 \documentclass{article} \newcounter{test} ... 5 Since calc redefines \setcounter, \stepcounter and \addtocounter, the only way you have if you want to keep your settings is to redeclare these definitions after loading amsmath. That is, add the following lines in your preamble after \usepackage{amsmath} \makeatletter \def\setcounter#1#2{\@ifundefined{c@#1}{\@nocounterr{#1}}% ... 2 The \mathpunct{} (without : inside {}) is the definition of \colon. Link1 Both : and \colon typeset a colon, but \colon is a punctuation symbol, while : is considered as a relation symbol as regards to spacing. Link2 4 Use \DeclareMathOperator{operatorcommandname}{operator name} in the preamble for function or operator names that should be printed upright. \documentclass{article} \usepackage{amsmath} \DeclareMathOperator{\sinc}{sinc} \DeclareMathOperator{\si}{si} \begin{document} \begin{align} \si(x) &= \dfrac{\sin(x)}{x} \\ \sinc(x) &= \si(\pi x) ... 1 Another way to present the desired effect: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} f(x) = e^{alpha x} P(x) + \begin{cases} \cos(\beta x) \\ \sin(\beta x) \end{cases} \end{align} \end{document} which yields 2 Just combine them. Also use \cos and \sin to set the trig functions as functions, not variables. \documentclass{article} \newenvironment{sistema}% {\left\lbrace\begin{array}{@{}l@{}}}% {\end{array}\right.} \begin{document} \[ f(x)=e^{\alpha x}P(x) + \begin{sistema} \cos(\beta x) \\ \sin(\beta x) \end{sistema} \end{document}

4

Don't use \epsilon for "element of"; instead, use the \in macro. You need to place curly braces around the material that's to be placed in the exponent positions. Don't switch in and out of math mode in one and the same equation. \documentclass{article} \begin{document} $A(n) \in \Theta(n^{\log_b a}) = \Theta(n^{\log_2 2} ) = \Theta(n)$ \end{document}

1

The autonum package seems not to suffer from the problem: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} % UFT8 - danske bogstaver og andet godt fra havet \usepackage[T1]{fontenc} \usepackage{siunitx} \usepackage{amsmath} \usepackage[version=3]{mhchem} \usepackage{autonum} \begin{document} % Seems fine \begin{align} \Delta S &= ...

0

Put following two lines just before \usepackage{amsmath} \expandafter\let\csname equation*\endcsname\relax \expandafter\let\csname endequation*\endcsname\relax Now even though you have iopart.cls as class file chosen, you would still be able to use amsmath package without any error. It will go like.. \documentclass[12pt]{iopart} \usepackage{iopams} ...

4

With only a partial alignment, due to the long last line: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{fourier} \usepackage{mathtools} %loads amsmath as well \DeclarePairedDelimiter\Floor⎣⎦ \DeclarePairedDelimiter\Ceil⎣⎦ \begin{document} \[ T(n) = \begin{cases*} 0 \quad& if $n = 1$ \\ 1 & if $n = 2$ \\ ...

16

\documentclass{article} \usepackage{mathtools} %loads amsmath as well \DeclarePairedDelimiter\Floor\lfloor\rfloor \DeclarePairedDelimiter\Ceil\lceil\rceil \begin{document} \[ T(n) = \begin{cases} 0 & \text{if $n=1$} \\ 1 & \text{if $n=2$} \\ T(\Floor{n/2}) + ...

2

This is one way to obtain the desired result in LaTeX \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} T(n) = \left\{ \begin{array}{cc} 0 & \hspace{5mm} n=1 \\ 1 & \hspace{5mm} n=2 \\ T( \lfloor \frac{n}{2} \rfloor) + T(\lceil \frac{n}{2} \rceil )+ 2 ...

1

Use \overleftrightarrow and \underleftrightarrow. \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{align} &\hphantom{(2\times 3)( }% \overleftrightarrow{\hphantom{1 \times 3) = (2 \times 1} } \nonumber \\[-07pt]% &( \underleftrightarrow{ 2\times \underleftrightarrow{ 3) ( 1 \times ...

3

With tcolorbox help it's possible to include equation numbers in framed environments. It provides options ams equation, ams gather, ams align and corresponding starred versions. It's also possible to combine tcolorbox with empheq package. \documentclass{report} \usepackage{amsmath} \usepackage[most]{tcolorbox} \tcbset{colback=yellow!10!white, ...

1

\overbar is wrong initially (I did not found fldauth.cls) This shows the (incomplete) possibilities to use a \overline - like typesetting of a mathematical symbol \documentclass{article} %[times]{fldauth} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{mathabx} \begin{document} % ...

3

It's necessary to use \protect or to robustify the command. However, other problems might appear, if hyperref is used, since pdftex will complete about invalid strings in bookmarks then. In this case, use \texorpdfstring as shown in the second version. \documentclass{article} \usepackage{amsmath} \usepackage[english]{babel} \usepackage{hyperref} % Not ...

4

You can use a box with width of the widest entry. \documentclass{article} \usepackage{amsmath} % \text nas equacoes \usepackage{mathrsfs} \usepackage{calc} \newlength{\mylen} \settowidth{\mylen}{$(dv_0+(1-dv_0))\text{cd4Hill}(i)$} \newcommand{\mb}[1]{\makebox[\mylen]{$#1$}} \begin{document} Network reaction model: \def\Ph{\text{P}_\text{h}} ...

1

Easiest here is just to scale the entire construction to suit your needs using graphicx's \resizebox or \scalebox functionality: \documentclass[12pt,border=5pt]{standalone} \usepackage{amsmath, graphicx} \begin{document} \resizebox{!}{1000pt}{$\displaystyle \binom{a}{b}$} \end{document}

5

You can use the Latin Modern fonts, provided you fix the largesymbols font: \documentclass[border=10]{standalone} \usepackage{lmodern} \usepackage{amsmath} \DeclareFontFamily{OMX}{lmex}{} \DeclareFontShape{OMX}{lmex}{m}{n}{ <-> lmex10 }{} \SetSymbolFont{largesymbols}{normal}{OMX}{lmex}{m}{n} \begin{document} \fontsize{1000}{1000}\selectfont ...

3

A bit of a hack, but for a one off table it can work; the width of 1.5cm for each of the two columns has been found by trial and error. The trick is to define two commands: a filling stem and a filling arrow with a given width; between these a zero width box containing the raised label. I removed the \frac{1}{l^4}, preferring the slashed form (the ...

8

By default cm fonts are only loaded in a restricted set of sizes. fix-cm allows them to be used as a scalable font. \RequirePackage{fix-cm} \documentclass[12pt,border=5pt]{standalone} \usepackage{amsmath, amssymb, amsthm} \usepackage{hyperref} \DeclareMathSizes{12}{1000}{1000}{1000} \begin{document} $\displaystyle \binom{a}{b}$ \end{document}

0

You can use multirowpackage. \documentclass[11p,twoside,a4paper,leqno]{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{amsfonts} \usepackage{xcolor} \usepackage{array} \usepackage{multirow} \begin{document} \begin{table}[h] \begin{tabular}{|l|c|} \hline text & text \\ \hline ...

2

The makecell package is done for that. It also allows for a common formatting of cells, and it also has a multirowcell command: \documentclass[11p,twoside,a4paper,leqno]{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{amsfonts} \usepackage{xcolor} \usepackage{array, makecell} \begin{document} \begin{tabular}{|l|c|} text & ...

2

Use a nested tabular \documentclass{article} \usepackage{mathtools} \usepackage{array} \newcommand{\mycell}[2][c]{% \begin{tabular}[#1]{@{}c@{}} #2 \end{tabular} } \begin{document} \begin{tabular}{|l|c|} text & text \\ text & \mycell{$a_1 x + b_1 y = c_1$ \\ $a_2 x = c_2$}\\ \end{tabular} \bigskip \begin{tabular}{|l|c|} text ...

3

The stackengine package can help. If you would prefer constant inter-baseline skip, rather than fixed inter-item gap, you can add these lines to the preamble: \def\stacktype{L} \setstackgap{L}{12pt} If you would like the math itself left or right aligned (while still retaining the center alignment of the column), add \def\stackalignment{l} or ...

2

A simple solution with pict2e. The bullet size can be adjusted, via an optional argument (default: 2.1\unitlength): \documentclass[12pt]{article} \usepackage[paperwidth=10cm,paperheight=7cm,margin=1em]{geometry} \usepackage{amsmath} \usepackage{amssymb} \usepackage{ebgaramond-maths} \usepackage{graphicx, pict2e} ...

4

\DeclareMathOperator is only for \log-like functions. Here you want this symbol to be a binary operator, so you need \mathbin \newcommand*\conjunction{\mathbin{\raisebox{-0.25ex}{\textbullet}}}

7

edit adds a patch to another, pure amsmath, problem; see bottom of answer Not an easy one. First of all indeed hyperref should always be loaded after amsmath because it does things depending on whether amsmath is loaded, but does not delay this to At Begin Document. The problem of a unary minus is already taken care of by hyperref's redefinition of ...

6

Force the unary minus to be of type \mathord either via \mathord{-}, or {-}: \documentclass{article} \usepackage{amsmath,hyperref} \begin{document} $${-}1 = -1 % output: -1 = -1$$ \end{document} Most likely this stems from hyperref's insertion of content at the start of the horizontal list for (hyper-) referencing. As such ...

0

Try to use eqnarray instead of equation! It solves your problem. :) \begin{eqnarray} -1 = -1 % output: -1 = -1 \end{eqnarray}

Top 50 recent answers are included