5
votes
1answer
48 views

align* and wrapping command

For school we have to deliver all math with double lines under the result. I have made a command that makes this easy. It looks like this: \newcommand*{\uul}[1]{ \underline{\underline{#1}} } It ...
4
votes
4answers
249 views

Breaking and aligning equations

I have the following MWE \documentclass[10pt, a4paper]{article} \usepackage{amsfonts, amsmath, amssymb, amsfonts} \begin{document} \begin{align} \sum_i{ c_i} &= \cos \sin\cos \sin\cos ...
9
votes
5answers
263 views

Left align in math environment with every element over each other

I would like the elements in my math environment to be left aligned, so that each element stands over each other, like in the given example below. I have managed it using \hspace and \qquad, but ...
5
votes
2answers
61 views

replacing eqnarray when several alignment tabs are present

I have three mathematical equations which I would like to have typeset in one block such that they are aligned at the equality sign = and the following comment. Up until now, I've been using eqnarray ...
7
votes
2answers
79 views

Check if in an align* environment

I want to use different styles of matrices if TeX is in an align* environment or in a normal math environment. I already found a solution for checking if it is in math mode (\ifmmode) but not ...
5
votes
2answers
117 views

Can I tab inside of align environment?

I currently have this ugly equation: The green alignment is just like I want it. The Red one is what I would like to get, but I don't know how. Here is my MWE: \documentclass[a4paper]{scrartcl} ...
6
votes
4answers
309 views

How can I note transformation step?

I currently have this: with this code: \begin{align} 0 &\stackrel{!}{=} (d_{P,f}^2)'\\ &= -2 x_p + 2x -2y_p f'(x) + \left (f(x)^2 \right )'\\ ...
4
votes
3answers
145 views

How to replace \\ with \\& in math mode?

I am having the following isssue: I have to write a mathematical paper/book with many different optimization problems formulated. To be consistent all over I'd like to create an environment to ...
2
votes
0answers
111 views

How can I implement an '&' inside a \left( \right) environment? [duplicate]

I've been running into a strange issue. I'm doing some derivations in LaTeX document, and am using the align environment to do so. Some derivations require multi-line brackets, for which I try to use ...
8
votes
1answer
142 views

Measuring align

From what I read it seems that align environments are processed twice: the first time for measuring, the second time for actual typesetting. My question is whether one can get access to these ...
8
votes
3answers
134 views

Aligning elements in set

How can I create a set with aligned elements? Example: I tried using align but it does not align as nicely as in the example. \begin{align*} &P = \set{ &A &\rightarrow &a | ...
4
votes
2answers
129 views

How to make this equations aligned

I have an equation as below, I want text1 and text2, text3 are aligned as well. \begin{equation} \begin{aligned} A &= B \quad \text{text1}\\ C &= \begin{cases} 1 & ...
6
votes
1answer
186 views

How to center align part of an equation within alignat?

I'm using the environment alignat to align my set of of equations at two different points. Now, I dot not only want to align it these two points, but also want to have everything in between these ...
2
votes
2answers
1k views

How to put the QED symbol of a proof at the right place inside align?

When a proof ends with a formula in equation or equation* environment, putting \qedhere after the equation would cause the QED symbol to appear in the right place. I.e. at the end of the line in which ...
4
votes
2answers
201 views

How can I typeset determinants of Cramer's rule? [closed]

I want to typeset the determinants of the system $\begin{cases} a_1x+ b_1y = c_1,\\ a_2x+ b_2y = c_2. \end{cases}$ I tried $D=\left| \begin{matrix} {{a}_{1}} & {{b}_{1}} \\ {{a}_{2}} ...
2
votes
2answers
409 views

Break Large Equation Between Parenthesis Using Multline

I have a very large equation that I need to write in multiple lines, but multiline is not working between parenthesis. This is my LaTeX code: \begin{multline} e^{-y \lambda_n} \left( ...
9
votes
1answer
131 views

How can I align the terms of this equation nicely?

I have the following alignat segment: \begin{alignat*}{3} \text{max}_{\underline{\lambda}} \text{min}_{\underline{x}} \quad & \underline{c}^T \underline{x} + \underline{\lambda}^T(\underline{d} ...
1
vote
1answer
114 views

Only one equation number with math-vfill-tombstone symbol

Maybe what I want is sinful, but let me explain: I use aligned* environments, because I usually don't need equation numbers. When I need one, I use \addtocounter{equation}{1}\tag{\theequation} from ...
2
votes
3answers
119 views

How to align equations

I am trying to write a set of equations similar to some found in a book I am reading. Below is how the book has formatted the equations: and here is what I have so far: How can I align my ...
2
votes
1answer
143 views

Argument of \text@ has an extra } \end{align*}

Good day, I am using the following code: \documentclass[]{report} \usepackage{amsmath} \usepackage{graphicx} \usepackage{breqn} \usepackage{hyperref} \usepackage{amstext} \hypersetup{linktocpage} ...
4
votes
1answer
179 views

Align summation symbols inside an align environment

I have the following piece of code: \documentclass[]{article} \usepackage{amssymb} \usepackage{mathtools} \usepackage{amsfonts} \begin{document} \begin{align*} A &= ...
3
votes
2answers
125 views

Numbering of displayed math without using the equation environment

I know about align and equation environments, and tend to use them most of the time, but sometimes I like to have more flexibility within an array of equations, like better control on justification ...
7
votes
1answer
109 views

Ignoring specific ampersand formatting on a specific line of an align block

I want to typeset a number of equations with some alignment constraints, but I want to partially ignore them on certain lines. An example formatted text might look like the following when it's ...
4
votes
1answer
80 views

Setting a column of an align environment at a fixed distance from the margin

I'd like to set proofs in the style shown in this answer but with the right column at a constant distance from the left margin, so that the explanations show up consistently located in the many proofs ...
1
vote
1answer
155 views

Two columns of equations, aligned and just one number per column

I'm writing a two-column document, and I want to display two sets of large equations floating at the top. Each equation set should be aligned within the same column, and only the two top equations ...
6
votes
3answers
1k views

\underbrace and align environment

I want to typeset a proof and want to emphasize what I do in each step e.g. by underbracing an equal-sign when I substitute a variable. In addition I also want to align equal-signs in every line. ...
10
votes
1answer
134 views

Comment an equation without creating extra space

I try to make a comment on the right (or left) of one line of proof. But the align* environment automatically move the whole equations to the left to leave space for the comment. But I still want the ...
3
votes
1answer
149 views

Overset placement is uneven

I'm using this code to show that one element of the equation is greater than zero and the second element is less than zero. \begin{align} \overset{+}{\pi_{i}} + \overset{-}{w_{g}(S)} > 0 ...
3
votes
1answer
268 views

align environment has too much white space

How can I let the following code look good ? \begin{align*} &\text{Als} &&a,b \in H\\ &\Rightarrow &&a,b\in H_1 \land a,b \in H_2 &&\text{Definitie van doorsnede}\\ ...
0
votes
1answer
51 views

Centering a group of equations and text both which is used in \begin{align*}…\end{align*}

Say I am trying to center a group of equations, written in separate lines, with equality sign aligned one below another, which are defined by: $f(r)+1=g(r^2)+1=O(r)$ as $r\to 1$ by first using the ...
2
votes
2answers
147 views

Ignoring alignment for certain lines in an alignat environment

I am having trouble typesetting an optimization problem, and would like to know how to ignore the alignment for a certain line in an alignat environment. I've currently typeset the optimization ...
8
votes
1answer
108 views

Underbrace multiple math lines

I have to underbrace multiple lines in an align-environment with one brace. Meaning something like \begin{align*} A ={}& B + \underbracemultiline{C + D + E \\ & + F + G \\ & ...
6
votes
4answers
1k views

Centering equations within alignat command

I want to centre the formula inside the equals. So far I have \begin{alignat*}{2} v_2(16)&=\frac{2}{5}[v_3(32)+v_3(8)] &&= 0, \\ v_2(4)&=\frac{2}{5}[v_3(8)+v_3(2)] &&= ...
2
votes
2answers
391 views

Multicolumn proofs, align within tabular?

I want to condense my assignment by laying out each solution as a table with a picture on one side and the proof on the other. To make matters worse, I need to be able to include some equation ...
3
votes
1answer
115 views

how to use math mode inside align* [closed]

why does this give an error? \begin{align*} $\sum_{i=0}^K n_{\text{i}} * P * 1000$ \end{align*} why cant I use align* for my math formula which includes a summation?
4
votes
2answers
95 views

Spacing numbers in two equations equally

I have this weird requirement, to align two sets of numbers, one under another, in groups of three. Here is how it should look: I tried the following: \begin{align*} x_F &= 1.368 &808 ...
2
votes
1answer
555 views

amsmath split environment results in error “Missing } inserted.”

The following compiles fine, but outputs a pdf with a line too long. \documentclass{article} \usepackage{amsmath} \def\group#1{\left ( #1 \right )} \begin{document} $$ %\begin{split} \group{\neg ...
0
votes
1answer
119 views

Where is the error that i can not run? [closed]

\documentclass[12pt,a4paper]{article} \usepackage{amsmath}\usepackage{amssymb} \textwidth=16.5cm \oddsidemargin=-0.10cm \evensidemargin=-0.10cm \topmargin=-1.0cm \textheight=24.5cm ...
1
vote
1answer
118 views

Latex equation positioning problem

\documentclass[12pt,a4paper]{article} \usepackage{amsmath}\usepackage{amssymb} \textwidth=16.5cm \oddsidemargin=-0.10cm \evensidemargin=-0.10cm \topmargin=-1.0cm \textheight=24.5cm ...
9
votes
1answer
1k views

Split expressions with parentheses in align environment

I am writing down a rather long expression, which has to be splitted in a align environment. The thing is that this expression has parentheses which have to be splitted too. I don't want to use ...
7
votes
2answers
207 views

Passing an argument with the alignment operator (&) to a macro within another aligned environment

I am trying to write macros for quickly formatting matrices in math mode. Here is a simple, working example: \documentclass{article} \usepackage{amsmath} ...
16
votes
2answers
673 views

How to align nested cases?

Please consider the code bellow: \begin{align*} function = \begin{cases} case1 &\mbox{if } n = 0 \\ \begin{cases} case2 &\mbox{if } n = 1 \\ ...
1
vote
1answer
190 views

How do I typeset something like this (math - image below)?

I figured that that the exam class allows me to align the two parts of the lemma using the the \part command and also I could align the two lines of equation (3.11) using \begin{align*}, ...
1
vote
1answer
190 views

Latex matrix not displaying right numbers

I've just started writing in latex to expose math problems to a forum. I am trying to display a matrix: \[ \begin{align*} \begin{matrix} 1 & -9 & 3 \\ 1 & 2 & -2 \\ -2 & ...
12
votes
1answer
315 views

Correct usage of \ifmmode

Seems that there is some subtlety in using \ifmmode that I am not aware of. For some reason, using: \newcommand{\hlcodeA}[1]{\ifmmode\else\small\fi\texttt{\hilight{#1}}}% is not quite identical ...
5
votes
1answer
56 views

align environment according to *first* character, rather than last

\begin{align*} abcd &= abcd &(abcdefghijk)\\ &= ab &(ab) \end{align*} After the first ampersand the equal signs are aligned. However, after the second ampersand, the ...
7
votes
1answer
4k views

Tabbing for math mode?

I'm looking for something synonymous to tabbing, but for math mode. I read that alignat* should do the trick, but this behaves differently it seems. For example: \documentclass{article} ...
6
votes
2answers
2k views

Alignment across nested aligned environments

I have a list of equations with annotations like the one below: \documentclass{scrartcl} \usepackage{amsmath} \begin{document} \begin{align} aaaa &= 1 &&\text{for $X$} \\ bbbb &= ...
6
votes
3answers
280 views

How can I align two split environments at the equal signs?

\documentclass{scrartcl} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{amsmath, amsthm, amssymb} \usepackage{mathtools} \begin{document} ...
2
votes
3answers
248 views

Behaviour of the align environment

I'm writing a manuscript with long equations. In order to break the equations I prefer the align environment, provided by the amsmath package, over the eqnarray one. In the below example I show the ...