# Tag Info

0

\documentclass{article} \usepackage{amsmath} \begin{document} $\hat{y}_i= \begin{cases} y_i, & \text{if}\ i\notin I\\ (x\hat{\beta})_i, & \text{if}\ i \in I \end{cases}$ \end{document}

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

5

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 ...

3

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 &...

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 ...

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. \...

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\...

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}}}}{\...

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 \... 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\... 0 You can use \centerline in combination with the minipage environment for this purpose: \centerline{ \begin{minipage}{\linewidth} \begin{align*} \text{I am very looooooooooooooooooooooooooooooong} & \text{Me toooooooooooooooooooooooooooooooooooooooo!} \end{align*} \end{minipage} } The minipage environment embeds a virtual page, ... 0 \documentclass{article} \usepackage[active,tightpage]{preview} \usepackage{amsmath} \pagestyle{empty} \begin{document} $$1-\strut\displaystyle\frac{2\,M}{r}, \quad \text{for}\, r>R,$$ foo  xy=f(x)  bar foo \[ dy=g(x) bar \end{document} Latex to SVG cmd $latex test.tex$dvisvgm.exe ...

0

LaTeX to SVG latex test.tex dvisvgm.exe -n -p 1-5 -c 1.2,1.2 test.dvi

0

Or even shorter: \documentclass{article} \newcommand{\eq}[2]{$$\label{eq:#1} #2$$} \begin{document} \eq{1}{x + y = z} \eq{2}{a + b = c} \end{document} After you type in your doc, you can "translate" back your source tex file to regular environments with sed or alike. I do this very often despite what others have ...

2


2


4

This is a standard application of an equation with a \text addition (you could also use \mbox): \documentclass{article} \usepackage{amsmath} \begin{document} $$T_n = \frac{4L}{(2n+1)\sqrt{gH}}, \quad \text{for mode n = 0,1,2,3,\dots}$$ \end{document}

2

You can use the multlined environment from mathtools. I took the liberty to replace the pairs of \big( … \big) and the like with \bigl( … \bigr). \documentclass{beamer} \usepackage{mathtools} \begin{document} \begin{frame} \frametitle{MWE:Split one equation in align environment} \begin{align} L_e(c_k^{(i)}) &=\log\frac{f_n(\tilde{c}_k|c_k^{(i)}=p)}{...

1

Here is one of the typical ways to achieve this alignment with respect to the = sign: \documentclass{beamer} \begin{document} \begin{frame} \frametitle{MWE:Split one equation in align environment} \begin{align} L_e(c_k^{(i)}) ={}& \log\frac{f_n(\tilde{c}_k|c_k^{(i)}=p)}{f_n(\tilde{c}_k|c_k^{(m)}=q)} \\ ={}& \log\frac{...

3

You can used the \Aboxed command, from empheq, which can bow a single equation. I adapted the code to define a \Ashaded and a Acolorboxed command, which use shadecolour, bgcolour and rulecolour parameters, to be defined with \colorlet. \documentclass[x11names]{beamer} \usepackage{empheq} \makeatletter \colorlet{shadecolour}{Thistle3!50} \newcommand\...

1


Top 50 recent answers are included