New answers tagged

0

Following egreg's lead at how to raise superscript inside overline? \documentclass{article} \begin{document} but this is ugly: $\sqrt{E'^2}$ versus $\sqrt{\mathpalette E'^2}$, \end{document}


1

This is the so called cramped style, in luatex you can escape it but in classic tex you need to re-start a nested math list to avoid it. \documentclass{article} \begin{document} This looks nice: $E'$, and while this is okay: $E'^2$, this is probably better: ${E'}^2$, but this is ugly: $\sqrt{E'^2}$, and this as well: $\sqrt{{E'}^2}$. But $\sqrt{\hbox{$E'...


1

(This solves 1 of the 2 issues) Since parcolumns seems not to likedisplay math, here I just isolate the display math inside a temporary \vbox and output the box instead. (Of course, this will lose the ability of a short math expression to get tucked in nicely following a short line. It may also change the vertical skip to the equation in other ways) \...


1

You could try paracol.sty, the documentation does not mention any limitations with math, example: \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{paracol,xcolor,geometry} \usepackage{microtype} \setlength{\columnseprule}{0.4pt} \colseprulecolor{blue} \begin{document} \begin{paracol}{2} Lorem ipsum dolor sit amet, ...


0

A short code with a single blockarrayenvironment: \documentclass{article} \usepackage{blkarray} \usepackage{amsmath} \begin{document} \[ \begin{blockarray}{\{\BAmultirow{2.2cm}c@{\enspace}c\}\BAmultirow{1cm}\{\BAmultirow{2.2cm}c@{\enspace}c\}} \parbox{1in}{\centering subfields $E$ \\ of $K$ \\ containing $F$} & K & &\centerline{$ \...


2

To scale your picture you can just use key scale for tikzpicture environment. To draw half unite circle rather then \draw [shift={(0.,0.)}] plot[domain=-1.5707963267948966:1.5707963267948966,variable=\t]({1.*1.*cos(\t r)+0.*1.*sin(\t r)},{0.*1.*cos(\t r)+1.*1.*sin(\t r)}); You can simply add \draw (0,-1) arc [start angle=-90, end angle=90, radius=...


2

For larger-than-normal delimiters, you can use \left...\right: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \left\{ \begin{tabular}{c} subfields $E$ \\ of $K$ \\ containing $F$ \end{tabular} \begin{array}{c} K \\ \vert \\ E \\ \vert \\ F \end{array} \right\} \quad \longleftrightarrow \quad \...


1

Still simpler with mathtools. I added a command for old style derivatives: \documentclass{article} \usepackage{fourier, erewhon} \usepackage{textcomp} \usepackage{geometry}% \usepackage{mathtools} \newcommand\osder[2]{#2^{\textsc{\scriptsize(\romannumeral #1)}}} \begin{document} \[ \begin{matrix*}[l] x^2 & x^3 & x^4 & x^5 & x^6 & x^...


1

In the 2nd invocation, I use roman numerals to denote higher-order derivatives, which is a common style I have seen. \documentclass{article} \usepackage{stackengine} \renewcommand\stackalignment{l} \renewcommand\stacktype{L} \setstackgap{L}{1.2\baselineskip} \stackMath \begin{document} \[ \stackunder{x^2}{f''(x)=2}\quad \stackunder{x^3}{f'''(x)=6}\quad \...


2

\documentclass{article} \usepackage{amsmath} \usepackage{array} \begin{document} \[ \begin{array}{llllll} x^2 & x^3 & x^4 & x^5 & x^6 & x^7 \\ f''(x)=2 & f'''(x)=6 & f''''(x)=24 & f'''''(x)=120 & f''''''(x)=720 & f'''''''(x)=5040 \end{array} \] \end{document}


2

Some suggestions: Use \mid to denote the conditioning operation Suppress the intercolumn whitespace between the two columns of the array environment Load the amsmath package and use \text instead of \mbox Consider using slightly-enlarged curly braces and outer round parentheses, using \bigl and \bigr. If you choose to do so, you should also use \bigm| ...


2

You can use aligned or alignedat{2}, and take into account or not the widths of the comments: \documentclass{article} \usepackage[showframe]{geometry} \usepackage{amsmath} \begin{document} \begin{equation} \begin{aligned} α& = \alpha₀ & & \text{\footnotesize(a first comment)} \\ & + \beta² (H-√{f/g}) & & \text{\...


2

amsmath's alignat can also do this: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat}{7} e & ={} & x^5 & & & & & & & & & {}+{} & 1 \\ f & ={} & x^5 & {}+{} & x^4 & {}+{} & x^3 & {}+{} & x^2 & {}+{} &...


3

If you are going to use this for other things, may be the best would be to make a macro \newcommand*\type[1]{#1\mathord{:}\textnormal{type}} $\type{s}$


7

The colon : is declared by LaTeX as a binary relation, which means it is separated from ordinary symbols by a thick mathematical space. The \colon command makes a punctuation symbol, so no space before it and a medium math space after it. However amsmath slightly changes colon to have some space before it and some more than a punctuation symbol after it. ...


8

Add a pair of brackets around the colon, and put type inside a \text command. Alternatively, you can use \colon which looks better, in my opinion: $ \begin{array}{l} s: \text{type}\\ s{:}\text{type} \\ s\colon \text{type} \end{array} $


0

Hint: This solution works with texstudio and maybe texmaker. For others there maybe alternative solution. You can copy and paste and then remove $ $ using an script. The following script does that %SCRIPT var txt = cursor.selectedText() var str = txt.replace(/[$]/g,"") editor.replaceSelectedText(str) cursor.clearSelection() Also, it may be helpful to ...


3

This is one of the reasons why I use mathenv rather than amsmath: More flexible equation arrays. This example is very much like egreg's, but shorter, and with the option that omitting the * gives you numbered equations: \documentclass{article} \usepackage{mathenv} \begin{document} \begin{eqnarray*}[r*{6}{>{{}}l<{{}}r}] e & = & x^5 & &...


3

Boring to type, but effective \documentclass{article} \usepackage{amsmath,array} \begin{document} \begin{equation*} \setlength{\arraycolsep}{0pt} \renewcommand{\arraystretch}{1.2} % like cases \begin{array}{ r >{{}}c<{{}} % equals r % degree 5 >{{}}c<{{}} % plus r % degree 4 >{{}}c<{{}} % plus r % degree 3 >{{}}c<{{}...


1

For multi-rows, you can try this \documentclass{article} \usepackage{array}% \begin{document} \begin{tabular}{c c} $f^{(n)}(x)$ & $f^{(n)}(0)$ \\[1cm] $-2e^{-x^{x^{x}}}$ & 0\\[1cm] $2x&\frac{x}{2}\\[1cm] . . . \end{tabular} \end{document}


3

The physics LaTeX package also implements abs and norm: \documentclass{article} \usepackage{physics} \begin{document} \[ c = \abs{-c} \] \[ \vu{a} = \frac{\vb{a}}{\norm{\vb{a}}} \] \end{document}


0

You should think at least twenty times before scaling such a big object, with the risk it becomes unreadable. The dimension to be used is \linewidth, because you're in a list \big( and \big) should be \bigl( and \bigr) to ensure proper spacing \Big is too big; I changed them into \bigl and \bigr. The best tool for this is aligned (the inline version of ...


1

One can make a stack. \documentclass{article} \usepackage{stackengine} \begin{document} \[ \setstackgap{L}{1.2\baselineskip} y = \bracketVectorstack{x_1 x_2 \abovebaseline[-3pt]{\vdots} x_m} \] \end{document}


3

No amsmath needed, using \left[...\right] and an array environment in between, just 'ordinary' math - content from LaTeX: \documentclass{article} \begin{document} $y = \left[\begin{array}{@{}c@{}} x_{1} \\ x_{2} \\ \vdots \\ x_{m} \end{array} \right]$ \end{document}


0

Several issues: Don't use \[...\] inside an argument. Use $...$. Passed [t] to array to make it top aligned. Did not fix the fact that the box is a full \textwidth, despite it already being indented. You will need to reexamine that. Here is the MWE. p.s. In the future, post a full working example, so we don't have to guess the meaning of things like \...


0

A solution with blkarray and eqparbox: \documentclass{article} \usepackage{mathtools, blkarray} \usepackage{eqparbox} \begin{document} \begin{equation} \begin{blockarray}{lc@{{}={}}c} \begin{block}{\BAmultirow{\eqboxwidth{T}}\{c@{{}={}}c} \eqparbox{T}{Text text 1:} & a &b+c\\ & d &e+f \\ \end{block} \...


1

Here I use a tabstackengine approach, on the theory that it allows me to control vertical distances between items precisely. However, the 1.53 in the stackgap setting should, in theory, have been 1.5 exactly. I think the issue is related to how big the \left\{ is made, which in the default LaTeX font, is not purely scalable (see ADDENDUM). The \stackskip ...


2

Related to something I wrote recently, I would use ,\  in math mode, and just “text mode” when text is involved. I put “” because by text mode I don't mean \text. \newcommand*\mathwords{\textnormal} $\{ x \in A : \mathwords{first condition, second condition, third condition} \}$ $\{ x \in A : x > 0 ,\ x^2 \in B ,\ x^3 \notin C \}$ Something should be ...


4

The last is wrong, the middle one ${i_0}^p$ has some appeal as being logically closer to the mathematical meaning, however TeX is fundamentally a typesetting system not a semantic math markup, and the conventional setting would be to put the sub and superscript on the same base, to give a tighter horizontal spacing so $i_0^p (or in strictly correct latex ...


1

If you want non-math symbols inside a math environment, commands \mathrm or \text can be used. Which one to use?: Is there a preference of when to use \text and \mathrm? \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning} \usepackage{amsmath} \begin{document} \begin{tikzpicture} \node[draw] {$\overline{A}$}; \node[draw] at (1,0) {$...


1

By chance, I found the answer in a comment to an unrelated question. There is a mathastext package that uses a text font (usu­ally the doc­u­ment’s text font) for the let­ters of the Latin al­pha­bet needed when type­set­ting math­e­mat­ics. (Op­tion­ally, other char­ac­ters in the font may also be used). There are a number of examples available in ...


0

In fact, there's a slight difference when you have two superscripts. For instance: {\bar{e}_k}^{\prime\dag} {\bar{e}_k}^{'\dag} The first one fits better.


6

I suggest you use \[ \] instead $$ $$ for display math formulas. Like @WillieWong say, with amsmath package You can get a result, perhaps, more appropriate: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \binom{m+n}{m} = \frac{(m+n)!}{m!\,n!} = \frac{\overbrace{(m+n)(m+n-1)\cdots(n+1)}^{m \text{ factors}}}{\underbrace{m(m-1)\...


2

This will do: \documentclass{article} \usepackage{amsmath} \begin{document} $$ \left( \begin{array}{c} m+n\\ m \end{array} \right) = \frac{(m+n)!}{m!n!} = \frac{\overbrace{(m+n)(m+n-1)\cdots(n+1)}^{\mbox{$m$ factors}}}{\underbrace{m(m-1)\cdots 1}_{\mbox{$m$ factors}}} $$ \end{document} The ^\mbox{$m$ factors} was changed to ^{\mbox{$m$ factors}} in two ...


5

Simpler and safer than @Manuel’s (very clever, anyway) solution: \documentclass{scrartcl} % \usepackage{etoolbox} isn't actually necessary \usepackage{mathtools} \usepackage{xparse} \usepackage{xcolor} \makeatletter \renewenvironment*{bmatrix}{% {\ifnum0=`}\fi \collect@body\processmatrix }{% \ifnum0=`{\fi}% } \NewDocumentCommand \...


0

I'm not sure what you mean by not leaving space between the equations, but flalign works fine; see below. Image at the top is flalign*, at the bottom it's align*. \documentclass[preview]{standalone} \usepackage{amsmath} \begin{document} \begin{flalign*} &\sum^\infty_{i=1} (3t_{2i-1}+t_{2i})9^{-i}&\\ &=\sum^\infty_{i=1} (3t_{2i-1}+t_{2i})3^{-2i}...


3

Something like \documentclass[preview]{standalone} \usepackage{amsmath} \begin{document} \begin{align*} &\sum^\infty_{i=1} (3t_{2i-1}+t_{2i})9^{-i}&& \\ &=\sum^\infty_{i=1} (3t_{2i-1}+t_{2i})3^{-2i}\\ &= \sum^\infty_{i=1} 3^{-(2i-1)} t_{2i-1} + 3^{-2i} t_{2i}\\ &=\sum^\infty_{i=1} t_i 3^{-i} \end{align*} \end{document} should do ...


0

Try this: $\left\{ \begin{array}{ll} C^{-}e^{r^{-}x} & \text{if }x\geq x^{\ast } \\ -\frac{1}{\rho }\left( x+\frac{a}{\rho }\right) & \text{if }x<x^{\ast }% \end{array}% \right. $


1

Is this what you want? \documentclass[12pt]{article} \usepackage[letterpaper]{geometry} \geometry{top=1.5cm, bottom=2.5cm, hmargin=3cm} \usepackage[fleqn]{amsmath} \usepackage{xcolor} \usepackage{multicol} \begin{document} \begin{enumerate} \item \begin{align*} \int e^{-x}\,&dx \\ &\begin{cases} & u=-x\\ & du=-dx \end{cases}\\ & \...


2

You just have to add a & before the cases environment, and remove the & inside cases. I propose a second layout which uses flalign: \documentclass[12pt]{article} \usepackage[letterpaper]{geometry} \geometry{top=1.5cm, bottom=2.5cm, hmargin=3cm} \usepackage[fleqn]{mathtools} \usepackage{xcolor} \usepackage{multicol} \begin{document} % \begin{...


3

You can insert a multlined environment (from mathtools) inside align. However I think it's better to use aligned inside align. I added a \mathdotfill macro with argument the length of the dotline. Also, I used the medium sized fractions fom nccmath fir the coefficients 1/2. Finally, as I wondered whether the series of q1 , q2 , qn and so on, is a ...


3

You should use the \exp math operator, and remove the pair of braces around the argument of exp. I propose this way of splitting the formula. I think the lines should be closer than the default so I used \\[-1ex]: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{multline} \frac{1}{2^j}K_{b_0}K_{b_1}..K_{b_{j-1}}K_{b_j}= \frac{(\sqrt{...


2

The problem is that you are breaking up the curley brackets { and } after exp. I guess you wanted to use \exp{}, and this is where the brackets came from. You can get the same result by removing the brackets and placing ext in a \text environment: \begin{multline} \frac{1}{2^j}K_{b_0}K_{b_1}..K_{b_{j-1}}K_{b_j}= \frac{(\sqrt{2})^j}{2^{j-1}} \text{exp} [(-...


8

The problem with \AfterEndEnvironment is that there's an extra \if@ignore\@ignorefalse\ignorespaces\fi bit of code after it. So the arguments k_k^ never reach their intended sub- and super-scripts. You can move around this with an extra argument u{\fi} (or, if you want to be more cautious, may be u{\if@ignore\@ignorefalse\ignorespaces\fi}, so it gives an ...


0

If your formular is not too long for a line in the first place, you can use \sloppy in the begining of your paragraph: The lineshape of the imaginary part of the susceptibility (e.g. $\mathrm{\mathfrak{Im}}\left(\left.\chi_{\phi\phi}\left(\omega\right)\right|_{B=B_{0}}\right)$ or $\mathfrak{Im}\left(\left.\chi_{\phi\phi}\left(B\right)\right|_{\omega=\...


2

The simplest is to type \middle/. Corresponding empty left and right delimiters \left. \right. can be obtained from the Delimiters dialog. A more advanced solution is to define a LyX macro with LaTeX output as above: \left.#1\middle/#2\right., and LyX display: \left.#1\big/#2\right. (which hides LaTeX command \middle which LyX does not know about). This will ...


0

I solved the issue by replacing \~{A} with \tilde{A}.


5

The problem is in the & tokens in the subsidiary environment, that should be protected from the outer environment. One of Knuth's dirty tricks that's often used in LaTeX is available. \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\@MatrixWithoutBracs}[1]{% \begin{matrix} #1% content \end{matrix}% } \...


7

The underscore _ doesn't have a definition and defining \_ doesn't help. You can do what you seem to want, but let me fiercely state that it's wrong. \documentclass{article} \begingroup \lccode`~=`_ \lowercase{\endgroup \def~#1{\sb{\!\sb{#1}}}% } \AtBeginDocument{\mathcode`_=\string"8000 \catcode`_=12 } \begin{document} $A_b^b$ \end{document} ...


13

Use \DeclareMathSizes. An extensive description of the command is given in [Yiannis Lazarides (2011)]. \documentclass[10pt]{article} \usepackage{lmodern} % scalable font %\DeclareMathSizes{10}{10}{7}{5} % default \DeclareMathSizes{10}{10}{5}{3} \begin{document} $a_{b_c}^{b^c}$ \end{document} Left is adjusted, right is default.



Top 50 recent answers are included