Tag Info

New answers tagged

4

This is even more than in your answer (now comment). In any form of math mode, \par and equivalent forms, like an empty line, causes an error. The reason is in the Chapter 16, p. 135 of The TeXbook Conversely, a blank line or \par is not permitted in math mode. This gives TeX another way to recover from a missing $; such errors will be confined to ...


6

subeequations does not in itself start math math mode, but all numbered equations within it will be numbered as 1a, 1b, etc. The environment can also contain text. \documentclass[12pt,letterpaper]{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} \section{Hello World} \begin{subequations} Here ...


0

Following your question-answer, I thought "why not just use an align instead of two equations?". I tried it out and it worked, so here it is. Note: \DeclarePairedDelimiterXPP just won't work for me. I must have an outdated mathtools. You can put it back in. I substituted it with E\big[ and E[. \documentclass[12pt, a4paper] {article} \usepackage{mathtools} ...


0

Thanks, Bernard for your help. However I do encounter another problem now aligning this equations with my previous ones. \documentclass[12pt, a4paper] {article} \usepackage{mathtools} \DeclareMathOperator{\var}{var} \usepackage{mathdesign} \renewcommand{\vec}[1]{\mathbf{#1}} \providecommand\given{} \DeclarePairedDelimiterXPP\EV[1]{E}[]{}{ ...


1

You can use the multlined environment from mathtools. I also defined an \EV command, that works with a given command (following an example in the mathtools documentation). It has a simple syntax (\EV{A \given B} and gives a correct spacing for the Expected Value, and has delimiters and vertical line that adapt to the contents size in the star version; ...


1

i was stopped short by the error ! Double superscript. which was caused by several instances of this sub/superscript combination: \vec{X}^*_{i}' the ^* and ' are both superscripts, and, although this may not be immediately obvious, tex wants to consider them as a single group. so either precede the apostrophe (prime) by an empty group {} to separate it ...


1

Insert a \phantom equality sign (with appropriate spacing around it - as in {}={}) and add \qquad to push that part of the equation to the right. Here is a mock-up of what it will look like, using strutted boxes to represent your equation components: \documentclass{article} \usepackage{amsmath} ...


3

I can't read the image very well. This uses bm and \tau. I've also replaced x with \times. I've also added some potentially useful packages - remove any you don't want. I've used Latin Modern just for the example because mathdesign didn't display well in my viewer with the default settings and I didn't want to mess around with it. \documentclass[12pt, ...


4

the image shows a rather inconsistent font choice using bold upright roman and bold slanted greek for vectors. Perhaps the simplest way to achieve that is using bm package and \newcommand\vec[1]{\bm{\mathrm{#1}} then \vec{R} and \vec{\theta} should do the right thing


6

You are better off with bm package and \renewcommand{\vec}[1]{\bm{#1}} Code: \documentclass[12pt, a4paper] {article} \usepackage{amsmath} \usepackage{bm} \DeclareMathOperator{\var}{var} \usepackage{mathdesign} \renewcommand{\vec}[1]{\bm{#1}} \begin{document} \begin{equation} \begin{gathered} R_{i\tau} = \alpha_{i} + \beta_{i} R_{m\tau} + ...


2

The amsmath alignment environments pass over the material twice. In the measurement pass, the conditional \ifmeasuring@ is set to true, otherwise it's false. I have made some amendments to the code. For instance you have two wrong % after +1; also your settings of the counters were sometimes local sometimes global, which is wrong. There are \@namedef and ...


2

Your first P has a \texitit rather than \textit. Notice the extra i?


1

You can have multiline brackets, following Sébastien Gouezel's example on po. 28-29 of the mathtools documentation. In addition, I propose another alignment based on the alignedat environment: \documentclass{article} \usepackage[showframe]{geometry} \usepackage{mathtools} % \usepackage{braket} \newcommand\MTkillspecial[1]{% helper macro \bgroup ...


4

In addition to Przemysław's answer, I made it a little bit more beautiful. You do not need that big parenthesis at all. If you want to use an automated bracket like \left(, you have to 'close' it with \right. on the same line. Here is my MWE. You could even reduce one row. There is enough space in order to make the equation a bit wider: % arara: pdflatex ...


2

You have unbalanced \left ... \right (they must be in the same logical line). An exemplary, however ugly, solution: \documentclass{article} \usepackage{amsmath,braket} \begin{document} \begin{equation} \begin{split} %\left( (\hat{c}_{0}^{\dagger} + \hat{c}_{1}^{\dagger})\hat{t}_{0}^{\dagger} \ket{0000}\otimes\ket{00}= \\ \Bigl(- c_{0}^{\dagger} ...


4

Use gathered and not aligned: \documentclass{article} \usepackage{amsmath} \DeclareMathOperator{\var}{var} \begin{document} \begin{equation} \label{eq: market model} \begin{gathered} R_{it} = \alpha_{i} + \beta_{i} R_{mt} + \varepsilon_{it} \\ E(\varepsilon_{it} = 0) \qquad \var(\varepsilon_{t}) = \sigma_{\varepsilon_{it}}^2 \end{gathered} \end{equation} ...


4

It is also possible to put the equation into the brackets and then use the \middle/ instead of the regular slash. So, for example, this equation: \int \limits_{a}^{b} \frac{x}{y} / \int \limits_c^d \frac{x}{y} would turn into this one: \left[ \int \limits_{a}^{b} \frac{x}{y} \middle/ \int \limits_c^d \frac{x}{y} \right] Or if you do not need any ...


3

Supply an optional argument to the ex environment. This is referred to as a "theorem note": \documentclass{article} \usepackage{amsthm,lipsum} \newtheorem{ex}{Exercise} \begin{document} See Exercise~\ref{exercise:ABC}. \begin{ex}[Author~ABC, Chapter~X, Exercise~Y.Z] \label{exercise:ABC}\lipsum[1] \end{ex} \end{document} When you reference ...


3

Place an ampersand (&) at the point where you would like the equations to align. \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation} \begin{split} &\alpha_{a}\alpha_{b}+\alpha_{b} \alpha_{a}=\{\alpha_{a},\alpha_{b}\}=2\delta_{ab}\boldsymbol{1_{N}}, \: a,b=1,2,3, \\ &\{\alpha_{a},\beta\}=\boldsymbol{0}, \: a=1,2,3, \\ ...


1

Here, I save the align* in a temporary \vbox and then stack under it. The [-23pt] controls the vertical separation of the underbrace; the to 270pt controls the length of the underbrace; and the {30pt} controls the horizontal placement of the underbrace. \documentclass[12pt]{article} \usepackage{amsmath,stackengine,lipsum} \stackMath \begin{document} ...


3

Some thing like this: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{align*} \underbrace{ \begin{alignedat}{2} &\text{\rlap{Kinematics}} & \text{\rlap{Rotation Kinematics}} & \\ x &= x_ot+v_ot+\frac{1}{2}at^2 & \qquad\qquad\qquad \theta &= \theta_ot\omega_ot+\frac{1}{2}\alpha t^2\\ ...


5

\documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation*} \pi_1(X,x_0) \xrightarrow{\mathmakebox[1.5cm]{f_{x_0}}} \pi_1(Y,y_0) \xrightarrow{\mathmakebox[1.5cm]{g_*}} \pi_1(X,x_1) \xrightarrow{\mathmakebox[1.5cm]{f_{x_1}}} \pi_1(Y,y_1) \end{equation*} \end{document}


4

Whether you use “sign” or “sgn” is a style issue which your intended publisher can answer, not us. That said, you probably want to use AMSMath’s \DeclareMathOperator not \newcommand; see newcommand vs. DeclareMathOperator: … \usepackage{amsmath} \DeclareMathOperator{\sign}{sign} … Depending on the value of $\sign x$, $y$ will take the following values: … ...


6

MathML is not a typesetting system so there is a difference between what it can specify and what you can currently typeset with it. I usually typeset MathML by translating it to TeX for example, so necessarily that restricts things to those that are easily typeset by TeX. Things that MathML has simple markup for which are (more or less) hard to render using ...


5

It's easy to define ‘tag styles’ with the \newtagform command from the mathtools package : \documentclass{article} \usepackage{mathtools} \usepackage[x11names]{xcolor} \newtagform{blue}{\color{SteelBlue3}(}{)} \newtagform{redandblue}[\textcolor{SteelBlue3}]{\color{red}(}{)} \begin{document} \usetagform{blue} \begin{align*} d(x, y) &= d(y, x) ...


5

It's easy enough to redefine \maketag@@@: \documentclass{article} \usepackage{amsmath,xcolor} \makeatletter \def\maketag@@@#1{\hbox{\m@th\normalfont\color{black!50}#1}} \makeatother \begin{document} \begin{align*} d(x, y) &= d(y, x) \tag{symmetry} \\ &\leq d(y, z) + d(z,x) \tag{triangle} \end{align*} \end{document} Note that the ...


9

Well, I've done some analysis on this and it looks like a bug that was probably introduced day one (so it is now in there for what, 20+ years? ... can't remember when I wrote that code :-). The issue is the following: around cell content the code adds \ignorespaces ... \unskip to remove any unwanted space on either side. That is absolutely necessary with ...


1

Run with xelatex \documentclass{article} \usepackage{amsmath} \usepackage{unicode-math} \setmathfont{STIX Math} \def\kay{\ensuremath{\mscrk}} \begin{document} $\ell$ and $\kay$ and $\mscrl$ \end{document}



Top 50 recent answers are included