# Tag Info

## New answers tagged equations

4

Just replace \frac{b*a^x_2}{b*a^x_1} with \frac{b*a^{x_2}}{b*a^{x_1}}.

1

I use the pdfocr program with tesseract when I want to ocr my pdf's on linux I use the ppa:gezakovacs/pdfocr repository for pdfocr and sudo apt-get update sudo apt-get install pdfocr sudo apt-get install tesseract-ocr sudo apt-get install tesseract-ocr-eng The command to convert is pdfocr -i input.pdf -o output.pdf In addition, prior to ...

1

For the utmost in flexibility and programmability, you may want to set up an array environment to display the two rows. The following code right-aligns the material in the first group, centers the material in the middle group, and left-aligns the material in the final group; the \rightarrow and \mapsto symbols are center-set in columns of type C. ...

1

I'd use a different construction, and I'd not even align them because of the vast size difference. \documentclass{amsart} \begin{document} \begin{alignat*}{2} \mathbb{R}^n\times\cdots\times\mathbb{R}^n & \rightarrow \mathbb{R}^m\times\cdots\times\mathbb{R}^m && \to \mathbb{R} \\ (v_1,\dots,v_k)&\mapsto (f_*(v_1),\dots,f_*(v_k)) ...

2


1

This is expected, because it's not \label that generates the equation number. If you really want two numbered equations on the same line, which I'd like to discourage, you can resort to minipages: \documentclass{article} \usepackage{amsmath} \begin{document} We have \begin{center} \begin{minipage}[b]{.3\textwidth} \vspace{-\baselineskip} a ...

2

Amsmath may specifically forbid more than one \label in an equation, but that doesn't mean one can't create another macro to perform the same task. Note: this version is not compatible with hyperref. \documentclass{report} \usepackage{amsmath} \makeatletter \newcommand{\steplabel}[1]% #1 = label name {\refstepcounter{equation}% ...

2

If the label will always be (1) and (2) and if you will refer always both then you can make it a single label. \documentclass{report} \usepackage{amsmath} \begin{document} We have $$a=b \quad \text{and} \quad c=d \tag*{(1) and (2)}\label{1and2}$$ and equations \ref{1and2} are nice. \end{document}

9

Maybe you looking for something like this: \documentclass{article} \usepackage{amsmath} \usepackage[a4paper,showframe]{geometry} \begin{document} We have: \noindent\begin{minipage}{0.4\textwidth} $$a = b \label{eqab}$$ \end{minipage}% \begin{minipage}{0.2\textwidth}\centering and \end{minipage}% ...

1

Here's a solution that employs a single aligned environment. Note that I've also removed the unnecessary {...} groupings and replaced all instances of \left( and \right) with ( and ) from the code you provided. \documentclass{article} \usepackage{amsmath} % for "aligned" environment \begin{document} \left\{ \begin{aligned} W_1 ...

0

Similar approach as suggested egreg: but rather withdcases and multlined from package mathtools: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{dcases} W_1 = N_c^ * w_1^c + N_s^ * \left( {w_1^s + 2w_2^s + w_3^s} \right) \\ W_2 = \!\begin{multlined}[t] N_s^* \big(w_2^s + w_3^s + w_{11}^s + ...

6

You should load amsmath and use the cases environment; for splitting the second case, use aligned: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{cases} W_1 = N_c^* w_1^c + N_s^* ( w_1^s + 2w_2^s + w_3^s ) \\ W_2 = \!\begin{aligned}[t] &N_s^* ( w_2^s + w_3^s + w_{11}^s + 4w_{22}^s + w_{33}^s + 4w_{12}^s + ...

2

I used \hspace to align the equations. I hope this is what you were looking for. \left\{\begin{array}{l} W_1=N_c^ * w_1^c + N_s^ * \left( {w_1^s + 2w_2^s + w_3^s} \right) \\ W_2=N_s^ * \left( {w_2^s + w_3^s + w_{11}^s + 4w_{22}^s + w_{33}^s + 4w_{12}^s + 4w_{23}^s + 2w_{13}^s} \right) \\ \hspace{1cm}+N_c^ * w_{11}^c \\ W_3=\left( {N_c^ * ...

2

Do you mean this? The sum in the exponent looks a little bit too much, but perphaps this is necessary this way. \limits is meant for providing the limits for a \sum, \int or \prod operator, having the syntax \sum\limits_{lower}^{upper} \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align*} e^{ - \sum\limits_{x_n \leq t}g(x_n)} ...

0

I would use: \documentclass{amsart} \begin{document} $\max\{\, x e^{-x^2}\mid 0\le x\le 1\, \}$ \end{document} giving

3

I vaguely remember reading that Donald E. Knuth has frozen the codebase except for actual errors in function that cannot be worked around reliably. His versioning system is a key to what his thoughts on this matter were, his popular projects have version numbers that approach (but can never reach) various trancendental numbers. Then as mentioned there is ...

0

I am afraid that I was being a bit of a simpleton. The following does the job. \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage[retainorgcmds]{IEEEtrantools} \begin{document} \begin{IEEEeqnarray*}{rCl} \IEEEeqnarraymulticol{3}{l} { fffffffffffffffffffff = ggggggggggggggggggg } \\ \quad ...

2

Use the amsmath package and then \begin{multline}\label{eq:master} f(x) =\\ E \end{multline}

32

Fixing it would have mostly disadvantages. Firstly for any serious math use you probably want amsmath anyway, that adds far more than a better eqnarray and if you are loading amsmath and not using eqnarray then fixing it has no benefit. eqnarray has been the way it is for 30 years and the main thing wrong with it is over-wide spacing around the = in that ...

1

It seems that you just want equations numbered per section rather than per chapter \numberwithin{equation}{section} \documentclass{report} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{longtable} \usepackage{graphicx} \numberwithin{equation}{section} \title{Equations in chapters} \author{Student NL} ...

0

Note: The O.P. changed the question to another direction, but this was answered before those changes. As far as I understand the O.P. the trouble is that \chapter* does not reset the equation counter (as no other counter is reset as well). This can be cured by using \xpretocmd. The counter output format should be changed as a patch too, since ...

1

For future reference, I found this presentation with a few options. I settled on bclogo package. Its documentation is written in French, but it looks like the more versatile option, having icons, framing, background color, title, among others.

2

I will not stick with (exotic) IEEEtrantools. Simpler is to use amsmath (or it improved version mathtools): \documentclass[12pt]{article} \usepackage{mathtools,amssymb} \usepackage[showframe]{geometry}% to determine and show page layout \begin{document} \begin{align} \begin{split} & fffffffffffffffffffff = ggggggggggggggggggg\\ & ...

2

I haven't used IEEEeqnarray but I've used align and I am able to reproduce what you want. Its really simple and hassle-free to use align*. All that one needs to remember is the insertion of ampersand for proper alignment of the lines in the equation. The output I've got is as below: I also assume that you intend to display the ampersands rather than using ...

2

You can make temporary redefitions at the beginning and end of environment with the help of hooks provided by the etoolbox package. So a first attempt is: \documentclass{article} \usepackage{mathtools,amsthm,etoolbox,cleveref} \newtheorem{theorem}{Theorem} \newcounter{equationstore} ...

3

You can specify the distance between the rows by adding the optional argument to the newline command as in: \\[2.5ex] \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{array} \pagestyle{empty} \begin{document} \label{test} \newcolumntype{Y}{>\displaystyle c} \left|\frac{D(u,v)}{D(x,y)}\right|= \left| ...

3

I don't see why you'd like to go via new theorem definitions. You can just define a new counter and alias LaTeX's equation counter to it. Here's my version of a macro \makeeqcontext (adapted from some earlier code I had written for myself at some point): \makeatletter \def\makeeqcontext#1#2{% \edef\tmp@eqcontextcountername{eqcounter#1}% ...

4

Define new environments: \documentclass{article} \usepackage{amsmath} \newtheorem{typea*}{Type A} \newtheorem{typeb*}{Type B} \newenvironment{typea} {\setcounter{equation}{\value{typea*}}\begin{subequations}\begin{typea*}} {\end{typea*}\end{subequations}} \newenvironment{typeb} {\setcounter{equation}{\value{typeb*}}\begin{subequations}\begin{typeb*}} ...

6

You should use an equation: \documentclass{article} \usepackage{amsmath} \begin{document} See~\eqref{eq:myeqn} below. A= \begin{pmatrix} 0.3 & 0.4 & 0.3 & 0.0 \\ 0.4 & 0.3 & 0.0 & 0.3 \\ 0.3 & 0.0 & 0.4 & 0.3 \\ 0.0 & 0.3 & 0.3 & 0.4 \end{pmatrix} \label{eq:myeqn} ...

5

You get the right spacing if you observe some rules: never have a blank line before a display; never have two consecutive distinct displays. Observing the first rule is easy; for the second, use amsmath environments such as gather and align. I put some comments on your preamble. \documentclass[a4paper,openright,10pt]{book} \usepackage[T1]{fontenc} ...

1


0

My solution is a new environment named numbenv for numbered environment. Please see the enclosed image file to get a quick look. For following code is placed in the LaTeX preamble. \usepackage{verbatim} \newenvironment{numbenv}{\refstepcounter{equation}\medskip\par\noindent\begin{ minipage}{0.9\textwidth}} ...

1

If \underline is really needed this is a matter of taste (I just kept it) But the centering can be achieved by using \underset. \max is declared as an operator, as far as I know. \documentclass{article} \usepackage{mathtools} \begin{document} $\underset{\underline{x_{a}}}{\max}^k$ \end{document}

4

It sounds like this might be a problem in the pdf encoding. Often, compiling the document using pdflatex instead of latex fixes this kind of problem. (Or if you are invoking LaTeX from your editor instead of the commandline, set up your editor to call pdflatex instead of latex.) There are various other advantages to pdflatex as well, as discussed in e.g. ...

3

You can go a simple way with \renewcommand{\theequation}{eqn \arabic{equation}} or with a fancier approach (see How to move amsmath equation label into LHS margin? for motivation) \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \makeatletter % detach \eqref processing from \tag processing \let\tagform@ref\tagform@ ...

2

Use the \tag command from the amsmath package. In its ordinary form it puts brackets around your label, with the star form it does not. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} x + y &= 2 \tag{eqn 1} \\ y &= 5 + 4 \tag*{(eqn 2)} \end{align} \end{document} Alternatively, if you want to put 'eqn' before all ...

1

Another option is to use the align-environment. That is really practical and allows formatting/aligning with the &-Sign \documentclass[11pt]{article} \usepackage{amsmath} \begin{document} \begin{align*} \max \biggl\{\frac{1}{2}2x^{2}(2A+6Bx^{-4})+x(2Ax-2Bx^{-3}\frac{1]{3}-\\ 4(Ax^{2}+Bx^{-2}+\frac{1} {3}x+1)+x+4,Ax^{2}+ \\ ...

1

Your problem likely comes from the fact that \left .. \right cannot be used across line breaks. Use \biggl\{ and \biggr\} instead. Also, instead of \text{max} you can use \max. By the way, looks like there's a parenthesis missing on the first line, and there's a comma in the second line that looks like it doesn't belong there. ...

1

I do not use R markdown, however check of it documentation show, that in its use is not difference to between standard equation. So you can use align \begin{tcolorbox} \vspace{-\baselineskip}% <-- to remove extra vertical space \begin{align} \sigma & = \beta_{0} \label{eq:Model0} \\ \sigma & = \beta_{0} + \beta_{1}K + \beta_{2}K^2 ...

3

Something like this? first is an arbitrary identifier e.g. emc2 or a2o2h2 or whatever will have meaning for you. first is a bad example because the equation might not always be first. While this won't bother LaTeX, it will confuse me! \documentclass{article} \begin{document} $$abc\label{first}$$ \ref{first} \end{document} ...

2

tcolorbox also offers several options for boxed math expressions. tcbhighmath is an special box which can be used with empheq package, but it's also easy to declare new boxes to use with empheq. Some examples with the code: \documentclass{article} \usepackage{amsmath} \usepackage{empheq} \usepackage[most]{tcolorbox} \newtcbox{\mymath}[1][]{% ...

2

First, without proper UTF support, the compiler is going to choke on the suggested input (or at least omit some symbols). Assuming that you want pdfLaTeX to do the job, you rewrite those symbols using LaTeX conventions. Here is an MWE: \documentclass{article} \usepackage{mathtools} \begin{document} You have $\forall i,j\quad 1\le i, j\le n$ and $c_{ij} = ... 0 If you want to write the equation in a inline-mode, then: \documentclass{article} \usepackage{mathtools}$ \forall i,j \text{ } 1\leq i,j\leq n \text{ and } c_{ij} = \sum{a_{ik} b_{kj}} \$ \end{document}

3

Even ordinary equation enable to write two equation in the same row (transcribed in classic math notation): $$\forall i,j:\ 1\leq i,j\leq n \quad\mathrm{and}\quad c_{ij} = \sum a_{ik} b_{kj}$$ where with \mathrm is mimic surrounding text font. In this case, both equation will have common number. Without equation numbering ...

9

Sorry, eqnarray has so many limitations that even being forced to do some tricks has its advantages. For instance, eqnarray can never be broken across pages, whereas your proof steps might be so long that a page break could become necessary. \documentclass{article} \usepackage{mathtools} \newcommand{\alignedrel}[2]{% \Cen{2}{\overset{#1}{#2}{}}% } ...

3

some possibilities \documentclass{article} \usepackage{array} \usepackage{mathtools} \newlength\mylength \begin{document} eqnarray \begin{eqnarray*} f(x,y,z) & = & \frac{g(x,y,z)}{h(x,y,z)}\\ & = & \left\lfloor\frac{\frac{\frac{x}{z}}{y}+\frac{y}{z}}{\frac{z}{y} ...

0

To my best effort I don't understand your intention. To invent new form how to write solution depend on some condition? For selection one of solution regarding to some conditionamsmath and mathtools provide environments cases and dcases respectively: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align*} f(x,y,z) & = ...

Top 50 recent answers are included