Tag Info

New answers tagged

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


6

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}


1

If you are happy to use the Stix fonts, you could try this: \documentclass{article} \usepackage{stix} \begin{document} A script k in maths $\mathscr k$ \end{document} Otherwise you need to find a maths font that implements the Unicode character: 𝓀 or "MATHEMATICAL SCRIPT SMALL K" which is Unicode code point U+1D4C0, and compile with xelatex or lualatex.


7

Simplifying the example a bit... \documentclass[a4paper]{article} \usepackage{amsmath,amssymb} % without array it looks fine, with array extra space is added in the % right of each matrix env \usepackage{array} \begin{document} \begin{equation*} \begin{pmatrix} \begin{matrix} x \end{matrix}{} \end{pmatrix} \end{equation*} ...


4

A simplistic solution would be adding \renewcommand{\qedsymbol}{} in the preamble, but this doesn't really work, as the following example shows: \documentclass{article} \usepackage{amsthm} \renewcommand{\qedsymbol}{} \begin{document} \begin{proof} A one liner \end{proof} \begin{proof} This ends with a display \[ 0=0. \] \end{proof} \begin{proof} ...


3

If you don't want qed symbol in all proofs, use etoolbox and \AtBeginEnvironment{proof}{\renewcommand{\qedsymbol}{}}{}{} MWE: \documentclass{article} \usepackage{amsthm} \usepackage{etoolbox} \AtBeginEnvironment{proof}{\renewcommand{\qedsymbol}{}}{}{} \begin{document} \begin{proof} This has the QED symbol. \end{proof} \begin{proof} This hasn't. ...


0

Some more free available versions: % arara: lualatex \documentclass{article} \usepackage{fontspec} \begin{document} Script Capital H: {\fontspec{arialuni.ttf}\symbol{"210B}} {\fontspec{code2000.ttf}\symbol{"210B}} {\fontspec{dejavusans.ttf}\symbol{"210B}} {\fontspec{freeserif.otf}\symbol{"210B}} ...


3

\documentclass{report} \usepackage[leqno]{amsmath} \makeatletter \newcommand{\leqnomode}{\tagsleft@true\let\veqno\@@leqno} \newcommand{\reqnomode}{\tagsleft@false\let\veqno\@@eqno} \makeatother \begin{document} \begin{align} f(x) &= ax^2 + bx + c \\ g(x) &= dx^2 + ex + f \end{align} \reqnomode \begin{align} f(x) &= ax^2 + bx + c \\ ...


1

You can get something very similar to what Mico showed using \mathscr{H} and mathrsfs, which is free. \documentclass{standalone} \usepackage{mathrsfs} \begin{document} $\mathscr{H}$ \end{document}


2

The H produced by the \mathscr macro of the MathTime Pro 2 Professional font package -- note that it's not free of charge -- may (or may not...) be what you're looking for: \documentclass{article} \usepackage[mtpscr]{mtpro2} % http://www.pctex.com/mtpro2.html \begin{document} $\mathscr{H}$ \end{document} Many more possibilities present themselves if ...


2

Abuse flalign ;-) Flushing the first part to the margin doesn't seem good, in my opinion, so I provided two macros for pushing it forward; with \rhide you get alignment to the right end, conversely with \lhide. \documentclass{article} \usepackage{showframe} \usepackage{mathtools} \newcommand{\rhide}[2]{\mathrlap{\hspace{#1}\mathllap{#2}}} ...


1

If a tricky solution is also allowed... We use the fact, that gather centers the lines. Tricky is \intertext. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{gather*} \intertext{$f a b c ={}$} <very very very very long centered definition of f>\\ \intertext{$g a b c d ={}$}\\ <very very very very long centered ...


0

Have you tried just making the font size of the body smaller? I imagine that would make it easier to use one of those environments effectively. Or try using a tabular environment?


1

Ah, that's a different question. Unfortunately, a math symbol can be either of class mathopen or mathclose, but not both at the same time. But the following construction should do: \mathclose{\arrowvert}\mathopen{} for an equivalent to \middle\arrowvert. I tested it and on my screen it looks the same. But, since \arrowvert is of type mathord (and not ...


2

Without MWE (Minimal Working Example) we can guess, how you used the code, but we cannot, how you want to, hence two cases. \documentclass{article} \usepackage{amsmath} \begin{document} You have $ a\mathop{\sum\sum\sum}_{a=\frac12}^{\text{some text}}b $ You want to \[ a\mathop{\sum\sum\sum}_{a=\frac12}^{\text{some text}}b \] If you want it in ...


0

So @giordano was at least partially correct, this is closely related to Cross-ref an equation using RefTeX, AUCTeX and cleveref and more specifically the bug fixed by this patch On Mac OS X, in order to fix it, using Emacs 24.3 (9.0) I did the following: Sudo Emacs /Applications/Emacs.app//Contents/Resources/lisp/textmodes/reftex-ref.el.gz Then within ...


0

Note the exact behaviour of \middle in eTeX as spelled out in the reference (http://archiv.dante.de/projects/nts/archiv/etex-ref-prel.html#middle): analogous to TeX's \left and \right, \middle specifies that the following delimiter is to serve both as a right and left delimiter; it will be set with spacing appropriate to a right delimiter w.r.t. ...


4

You haven't given any indication of what this code is intended to do and it is a very bizarre mix of latex3, latex2e and tex primitives, so I haven't attempted to guess what it is doing, but this version runs without error. \documentclass[a4paper]{report} \usepackage{amsmath,xparse} \makeatletter \newif\ifinvd@lims\invd@limsfalse \newif\iflr\lrfalse ...


4

Define an alignts environment that's the same as align, but uses \textstyle throughout. The problem with long alignments is solved by issuing \allowdisplaybreaks. I tested with 216 equations without any problem. Don't use eqnarray under any circumstances. \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \makeatletter ...


4

As stated in the answer to Hyperref jumps to the wrong equation if the equation has a \tag and cleveref is used by CyberSingularity, the starred environment should be used. If you do it and load hyperref after amsmath all links are correct: \documentclass{article} \usepackage{amsmath} \usepackage{hyperref} \begin{document} Some text \begin{equation} 0=0 ...


5

I'm not sure why you want to define in a wrong way what's already featured in amsmath, namely \tag. \documentclass[11pt]{article} \usepackage[fleqn]{amsmath} \newcounter{eqnthing}\setcounter{eqnthing}{0} \newcommand\geofflabel[1]{% \refstepcounter{eqnthing}\tag{\theeqnthing}\label{#1}% } \begin{document} \[ a+b=c\geofflabel{maththing} \] ...


2

Its the way amsmath has redesigned equations, especially labelling inside of them - handled differently when using the fleqn package option. Specifically, amsmath redefines how \label works, as in some cases (most notably within multi-parse items like align and friends) it has to switch it on-and-off in order to avoid multiply defined labels. You can still ...


2

Lookng around on TeX.SX it seems that there are many bugs with the fleqn option such as /equation-spacing-issue-with-fleqn-amsmath-and-frenchb-babel, problem-using-option-fleqn-in-amsmath-package, combined-use-of-fleqn-and-qedhere, ... I am not sure whether this one is known or not. The problem seems to be that when amsmath closes off a displayed equation ...


1

You can use a | delimiter and an array % arara: pdflatex \documentclass{scrbook} \usepackage{blindtext} \usepackage{mathtools} \usepackage{array} \begin{document} \blindtext \begin{equation} z = \frac{R(S_2 − S_1)}{2(S_1 + S_2)} + \frac{R}{2} \quad \left|\quad\begin{array}{r@{\ }>$l<$} R & is the amount of the light pulse received, ...


9

Use flalign (full length align). However, in my opinion \intertext or \shortintertext are better: I find no reason that justifies “and generally” being on the same line as the equation. \documentclass{article} \usepackage{mathtools} \usepackage{lipsum} % just for the example \begin{document} \lipsum*[2] \begin{align*} a^m \times a^n &= a^{m + n}, \\ ...


9

Here is an option that sets both equations in a \linewidth box, measuring the duplicating the widest parts in the shorter (first) equation in order to center the contents. It also allows the placement of and generally to be flush-left: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align*} a^m \times a^n &= a^{m + n}, \\ ...


2

If you use the \mbinom command, from the nccmath package (medium-sized \binom, ~80 % of display style), it looks much better, in my opinion: \documentclass[fontsize=8pt, a4paper, DIV12]{scrbook} \usepackage{amsmath, nccmath} \begin{document} \[ e^t = x^{(5)} - 2x^{(3)} + \dot{x} = ∑_{k = 0}⁵ \mbinom{5}{k} p^{(k)}(t) e^t -2∑_{k = 0}³ \mbinom{3}{k} ...


4

Use empheq (but first think again if you really need separate numbers): \documentclass{article} \usepackage{amsmath} \usepackage{empheq} \begin{document} \setcounter{equation}{9} % just for the example \begin{subequations} \begin{empheq}[left=\empheqlbrace]{align} k \cdot E &= 0 \\ k \cdot B &= 0 \end{empheq} \end{subequations} \end{document}



Top 50 recent answers are included