Hot answers tagged

8

Something like this? \documentclass[10pt]{article} \usepackage{amsmath, amsthm, amssymb} \usepackage{array} \usepackage{booktabs} \usepackage[makeroom]{cancel} \begin{document} \noindent \begin{minipage}{0.45\textwidth} Solve the following system: \begin{align*} 6x-5y &= 11 \\ 7x+5y &= 2 \end{align*} \end{minipage} \bigskip\...


6

Here's a solution that uses side-by-side minipage environments but no multicols environment. Since the minipages are quite narrow, I suggest you use raggedright rather than full justification; this may be achieved by loading the ragged2e package with the option document. To align the variables within an equation, use \phantom statements along the lines used ...


6

Consider using a dcases environment (provided by the mathtools package) instead of an array environment for the second equation. Incidentally, since no vertical aligning seems to be performed, consider using basic equation environments instead of alignat environments. In addition, you may want to use \widetilde instead of \tilde for the capital X letters. ...


5

\dfrac from amsmath and some vertical correction should be enough: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat}{2} u = \frac{\partial\tilde{X}}{\partial x},v = \frac{\partial \tilde{X}}{\partial y} \end{alignat} \begin{alignat}{2} \left\{ \begin{array}{l} u = \dfrac{\partial\tilde{X}}{\partial x}\\[9pt] ...


5

You check for math mode and then use \mathpalette: \documentclass{article} \usepackage{amsmath} \makeatletter \newlength{\negph@wd} \DeclareRobustCommand{\negphantom}[1]{% \ifmmode \mathpalette\negph@math{#1}% \else \negph@do{#1}% \fi } \newcommand{\negph@math}[2]{\negph@do{$\m@th#1#2$}} \newcommand{\negph@do}[1]{% \settowidth{\negph@wd}{#1}...


5

You can define a simple macro, in which you can make a comparison of lengths, here is an attempt using the calc package and \resizebox command from the graphicx package. \documentclass{article} \usepackage{graphicx} \usepackage{calc} \newlength{\eqhsize} \newcommand{\myinlineeq}[1]{% \setlength{\eqhsize}{\minof{\widthof{\mbox{\ensuremath{#1}}}}{\...


4

one possibilities is use multlined environment from package mathtools: \documentclass[10pt]{amsart} \usepackage{mathtools} \begin{document} \begin{gather} 8 \pi G a \bar{\rho}+\bar{p} \partial \delta u = - \dot{a} \partial E + a \partial\dot{A} \\ 4 \pi K ( \delta\rho + 3 \delta p + \nabla \phi^S ) = \begin{multlined}[t][.5\...


4

This may not be ideal visually, but addresses your concern: \documentclass{article} \usepackage{amsmath,eqparbox} \usepackage{xcolor,booktabs,tabularx} \usepackage[makeroom]{cancel} \usepackage[margin=1cm]{geometry} \begin{document} \begin{enumerate} \item[34.] Solve the system using elimination by addition. \begin{alignat*}{3} x + y + z &...


4

How about this: two aligned environments and an \eqparbox in between, nested in flalign. Eqparbox allows to have a \parbox of width the longest line width of the paragraph: \documentclass[10pt]{article} \usepackage{amsmath, amsthm, amssymb} \usepackage{array, eqparbox} \usepackage{booktabs} \usepackage[makeroom]{cancel} \begin{document} Solve the system. \...


3

Same idea, only for displayed math. The environments eqnsize and eqnsize* are similar to equation and equation*. Note that \tag and \notag were implemented. I originally tried to incorporate as much of amsmath as possible, but eventually got hopelessly lost. Comparing eqnsize and eqnsize* one finds a lot of common code that could be moved to a separate ...


3

Insert the instruction \allowdisplaybreaks in the preamble, after loading the amsmath package. And, instead of using the \title and \maketitle machinery, just type \begin{center} \Huge <Title String> \end{center}.


3

here's one possibility: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{gather} 8 \pi G a \bar{\rho}+\bar{p} \partial \delta u = - \dot{a} \partial E + a \partial\dot{A} \\[\jot] \begin{multlined} 4 \pi K ( \delta\rho + 3 \delta p + \nabla \phi^S )\\ = -\frac{1}{2 a^2} \nabla T - \frac{3 \dot{a}}{2 a} \dot{E} - \frac{1}{a} \nabla \...


3

This is simply to show how to reformat the equation with as little effort as possible. Copy the line to be broken. Use \right. or \left. to balance an otherwise unmatched \left or \right. Use \hphantom to preserve spacing, and \vphantom to preserve the \left ... \right size. Note, the additional \qquad is to compensate for the missing = and \{. \...


2

Use the below: \documentclass{article} \makeatletter \newcommand{\beq}[1]{\begin{equation}\label{eq:#1}} \newcommand{\eeq}{\end{equation}} \makeatother \begin{document} \beq{1} x + y = z \eeq \beq{2} x + y = z \eeq \end{document} Output:


2

Set the items as inline math prepended with \qquad (a 2em space). You can switch to \displaystyle if needed: \documentclass{article} \begin{document} \begin{itemize} \item {\itshape Partition of unity.} \qquad $\displaystyle \sum_{i=1}^{p+1} B^p_i (\xi) \quad \forall \xi \in [-1,1]$ \item {\itshape Pointwise nonnegativity.} \qquad $B_i^p(\xi) ...


2

There are many ways to do this, including the enum-package, which could be great for consistency, or a simple newcommand. Output Code \documentclass[11pt]{article} \usepackage{mathtools} \makeatletter \newcommand{\alignleft}{% \@fleqntrue\@mathmargin3em% \setlength{\abovedisplayskip}{4pt} % \setlength{\belowdisplayskip}{4pt} % } \...


2

From the TeXbook, second doubly dangerous paragraph on page 150: Question: What happens if a subscript or superscript follows a large delimiter? Answer: That's a good question. After a \left delimiter, it is the first subscript or superscript of the enclosed subformula, so it is effectively preceded by {}. After a \right delimiter, it is a subscript or ...


1

not finding an earlier question addressing this situation, here is my suggestion: add a \vphantom to the numerator of the fraction on the left to make it appear to be the same size as the fraction on the right: N = \left( \frac{s\vphantom{d}}{2} \right)^2 - \left( \frac{d}{2} \right)^2


1

You could use the \substack macro of the amsmath package. Compared with the array method used in your example, the material in the argument of \substack is automatically set in \scriptstyle. Also, do abbreviate "such that" to "s.t.". \documentclass{article} \usepackage{amsmath} % for \text and \substack macros \begin{document} \[ D_{k+1}(x_{k+1}) = \...


1

You can do it (but only for equations in any of the amsmath environments). But it is wrong, very wrong: you should think ahead before tweaking this way the cross reference mechanism. When you search for labels, you'll have no clue what each one refers to without first knowing what section the reference/label appears in. \documentclass{article} \usepackage{...


1

Here is another way to do it, which is probably better than my other answer. You get the correct spacing, and you can align the equations better to each other, if desir​eble, as the equations are kept in just one environment. Also, less code. Output Code \documentclass[11pt]{article} \usepackage{mathtools} \makeatletter \newcommand{\alignleft}{% \@...



Only top voted, non community-wiki answers of a minimum length are eligible