1
vote
1answer
37 views

How can I align horizontally matrices of different dimensions?

I'm wondering how can I align two different matrices horizontally. They are: [-1 0 +1] And: [-1 0 +1].T This is my code: \begin{equation} \begin{bmatrix} -1 & 0 & -1 \end{bmatrix} ...
2
votes
4answers
111 views

Alignment in a piecewise function

I would like to have the following two equalities displayed with the = aligned. I use the following code. The = are not aligned, and 2.5pt is typeset before the = in each line! Also, there is an ...
5
votes
2answers
97 views

How can I DeclareMathOperator* with spacing after it, preserving the alignment?

In the context of optimization problems, I'm using \usepackage{amsmath} \DeclareMathOperator*{\minimize}{\text{minimize}} \DeclareMathOperator*{\subjto}{\text{subject to}} to declare some operators ...
2
votes
1answer
71 views

How to properly format a proof/explanation with multiple points of alignment?

This answered question addresses how to properly align/format a proof, allowing one to add text commentary alongside equations without ruining the alignment of the equations; however, it only seems ...
4
votes
1answer
36 views

Is it possible to make odd-numbered columns have implicitly a prefix {}?

Prefix {} is implicitly inserted for even-numbered columns of alignedat (and alignat). As a result, + (or -, etc) becomes a binary operator. The section "Left aligned" below \begin{alignedat}[t]{3} ...
5
votes
1answer
122 views

Is there a better and compact way to represent the expansion of products of polynomials?

Objective: to show the expansion process as readable as possible so we don't run the risk of misreading the coefficients of the corresponding terms of the expanded, long expressions. ...
1
vote
1answer
55 views

What is the correct way to properly align a split equation with continued parts prefixed with a binary operator?

Consider the following result with 2 methods. Don't hesitate to propose better ones if any. The question is: What is the correct way to properly align a split equation in which binary operator ...
1
vote
2answers
82 views

Paragraph mode inside a math equation or reuse array-columns

My problem is that I want to reuse the spacing in a certain math equation like: \begin{equation} \begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l} ... & := & ... \\[4mm] & =: & ...
4
votes
3answers
143 views

Large equation goes out of margin, want to centre it? [duplicate]

I have a large equation \begin{document} \begin{gather} W = \frac{1}{2\mu_0}(\frac{\Psi'^2 \pi^2}{b^2} \sum_{m,n} a_{mn}^2 n^2 (ab/4) + \frac{\Psi'^2 \pi^2}{a^2} \sum_{m,n} a_{mn}^2 m^2 (ab/4) + ...
1
vote
1answer
75 views

How can I center this formula?

Here is my code: \documentclass[12pt,a4paper]{book} \usepackage[T1]{fontenc} \usepackage[chapter]{algorithm} \renewcommand{\baselinestretch}{1.5} \begin{document} \begin{spacing}{1.2} ...
16
votes
2answers
427 views

Stacked symbol doesn't align properly. Why?

A modified equals sign used represent use of L'Hopital's Rule isn't aligning well with other equals signs. How would I fix that? I'd prefer to do so without manually fiddling with spaces, if possible. ...
1
vote
2answers
59 views

Getting a weird output using \alignat (picture and code included)

When I run the following code \begin{alignat}{2} \text{min} & \sum_{t\in T}\sum_{v\in V}\sum_{(i,j)\in W_{v}}(c_{ijv}-u_{i}- v{j})x_{ijvt}+\sum_{j\in J}\sum_{t\in T}M_{jt}s_{jt} \\ ...
6
votes
2answers
78 views

Tabbing/horizontal placement with labeled equations

I have a string of equations, each with a label that I would like to format nicely. I want the equation labels to be at the same horizontal position and the start of the equation to be at the same ...
12
votes
3answers
346 views

Displaymath environment that can align equations and squeezes math

I have a long equation to align. Without squeezing the math, it is just barely longer than \textwidth. However, the align environment doesn't squeeze the math at all, which results in a badbox. ...
3
votes
1answer
302 views

How to make the equations at the center

(I'm using LyX). When I'm writing multiline equations, with \aligned the align of the equations is right, how can I make it to be center? For example: Here how it looks when I writing at math ...
4
votes
2answers
120 views

Flushright square mark

I write the codes below to get a square as if to say q.e.d. $$equation$$\textbox{\hfill\square} Text\textbox{\hfill\square} I want the square at the right extreme of the same line. I succeed only ...
8
votes
2answers
206 views

Multiple equations with a large “{” in front: alignment and labelling

I'm trying to get the equation shown in the picture. But i only manage to get the following coding. Can anyone help me to label it with numbering like the picture? I tried with \begin{eqnarray} or ...
24
votes
3answers
683 views

Strange default exponent positioning?

Why is this red exponent so far away from the right parenthesis? To my eye it is too far away. \documentclass{article} \usepackage{xcolor} \begin{document} ...
4
votes
2answers
150 views

Square roots not on same height

This part C\frac{1}{\sqrt{G}}\sqrt{\rho} doesn't seem to be on the same height as this part \sqrt{b}\sqrt{l} when compiled. What am I doing wrong? \begin{flalign*} ...
4
votes
2answers
92 views

Spacing and alignment in equations

I didn't find a solution about how to add units to equations. I have my code \begin{equation} \eta = \frac{\Phi}{P} [lm \cdot W^{-1}] \label{eq:mv} \end{equation} which is centered by ...
3
votes
1answer
104 views

Proof package: lines too short

The proof package's \infer command automatically sizes the lines it draws. However, it isn't always right (pdflatex output): The line is too short on the left. Is this a package ...
2
votes
0answers
113 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
3answers
136 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 | ...
6
votes
2answers
602 views

Left-aligned display math mode

How could one achieve, as primitively as possible, left-aligned display math so that \abovedisplayshortskip would still work as intended? It is my understanding that one can achieve left-alignment ...
5
votes
2answers
222 views

Horizontal alignment argument for 'subscript' of \underbrace

The picture below shows what I'm able to produce, but what I'd really like is to have the "coefficient" text aligned to the right (meaning that the tip of the \underbrace points to the 't') and the ...
10
votes
1answer
441 views

Correct alignment of multiple-line inequality

I want to display a set of inequalities to look like the code below this is the lower bound ≤ this is the thing to be bounded ≤ this is the upper bound My attempt to do this is the following: ...
4
votes
2answers
139 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
2answers
158 views

How to match left alignment of equations in math mode outside and inside an array?

My code is shown below, every equation is left aligned, my problem is that the equations inside the array enviroment seem to be indented. How can I align all the equations to the same vertical line? ...
2
votes
1answer
137 views

Align sequence with curly bracket and half row shift

Can anybody tell me how to rewrite these equations: There are curly brackets and half row shift and I don't know how to write it in align (eqnarray) environment.
3
votes
4answers
2k views

How to align text to the right in math mode?

I have a table of formulas, some have a description next to them, I want the equations to appear left flush and the text between parentheses right flush. I was writing it in the following way. ...
9
votes
1answer
138 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} ...
5
votes
3answers
121 views

Help with left align?

I was trying to left align this equation by using code $$\begin{equation} \begin{aligned} E_\theta(L(\delta_1(X)) &=& E_\theta[(1-\frac{b}{a+X^2}) X-\theta]^2\nonnumber\\ ...
1
vote
1answer
278 views

Making a text right-sided under an equation in LaTeX?

I'm trying to put a text on the right side under an equation in LaTeX. Here is my code: \begin{dmath} \mbox{log-likelihood ratio} = A \log{ \left( \frac{A/(A+B)}{(A+C)/N} \right) } + B \log{ \left( ...
2
votes
1answer
90 views

Left/right scripts with horizontal centering

I have been using \newcommand{\lrscript}[3]{\raisebox{.5ex}{\llap{\scriptsize$#2$}}#1\raisebox{.5ex}{\rlap{\scriptsize$#3$}}} to produce the middle segment of things like this: Produced with ...
6
votes
3answers
834 views

Multiline equation with specific indentation style

I have a multiline equation of the following type: \begin{equation} \begin{split} f(x,y) & =a\\ & =b\\ & +c\\ & +d. \end{split} \end{equation} But the output I would like to have is ...
4
votes
3answers
115 views

Alignment problem between multiple line “bmatrices”

I'm having problems trying to align single and multiple line bmatrices: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{align*} x = &\begin{bmatrix} ...
1
vote
1answer
127 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 ...
5
votes
1answer
1k views

`\hfill`-like spacing in math mode without using `align`

In question 83509, a way of getting \hfill-like behaviour in the align environment is described, but for my purposes, I need one that works in the equation environment. (I want to display some ...
0
votes
1answer
55 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
1answer
93 views

Centering case-defined functions in the middle of the page and centering a figure(diagram)

I have two questions regarding centering: I am trying to center a case-defined function, say defined as follows: $f_i(z)=$ \begin{cases}\frac{1}{t}dist (z,\gamma_i ) &\text {if} z\in A_i(t)\\ ...
1
vote
3answers
241 views

Questions on basic LaTeX typesetting in mathematics

I have one or two elementary questions on basic LaTeX typesetting: I know putting $$...$$ sign puts the mathematical expression in the middle (center), but what if I also want to center the ...
2
votes
2answers
971 views

Multiline formula with each column left-aligned

I am using LyX and I want a multiline and multicolumn display formula with each column aligned to the left. But when I add a formula and add columns, some are aligned to the right and some are ...
4
votes
1answer
722 views

Alignment in algorithmic environment

I don't like how there is often a slight misalignment between assignment statements in an algorithmic environment. For example, the first version of the algorithm given below looks strange to me. I ...
9
votes
1answer
854 views

One-line equation with two columns

I try to write an equation with two similar formulas, i.e. \begin{equation} \qquad A_1 = B + C \qquad A_2 = D + E \qquad \end{equation} Of course, instead of \qquads I want to use something like ...
5
votes
3answers
235 views

How can I do this without the cases?

How can I do this without the cases? $\begin{cases} \dfrac{\partial u(x,y)}{\partial x}=2x=\dfrac{\partial v(x,y)}{\partial y} \\ \dfrac{\partial u(x,y)}{\partial y}=-2y=- \dfrac{\partial ...
10
votes
2answers
214 views

Math Spacing in the presence of a trailing/non-trailing comma

I thought I knew how to use a \hphantom{} but don't know of an easy way to handle this case due to the comma. I want to get the text aligned for the X row. I added the appropriate \hphantom{{}+1} ...
7
votes
2answers
147 views

How to align terms in separate lines in this case?

I want to get another variant for the alignment points in my question answered by Hendrik Vogt, see How to construct a long equation that is split in LHS and RHS to occupy a narrow column?. ...
15
votes
1answer
665 views

How to fix the math-spacing when a lot of \phantom, \mathrlap, etc. are used?

This question led to a new package: underoverlap Introduction Based on this question and then this question, I'm trying to perfect the \overunderbrace macro. Right now, I'm trying to get the ...
4
votes
2answers
334 views

Need some help with perfecting the layout

\documentclass{article} \usepackage{amsmath} \setlength{\parindent}{0pt} \newcommand{\fac}{n!} \newcommand\test[3]{\left(\begin{array}{@{\,}c@{\,}} #1 \\ #2 \end{array}\middle|\ \ #3 ...
1
vote
1answer
283 views

How can I write a long equation in multi line scaled to text width?

I want to write a long equation over several lines, but result looks highly irregular. How can write this equation better, preferably with all equation occupying the same wide? ...