4
votes
2answers
134 views

About \def\b*{\begin{align*}}

I want to make the code shorter. I defined the following pair of macros: \def\b*{\begin{align*}} \def\e*{\end{align*}} My point is that I saw this is a document, with \def\b*{\begin{eqnarray*}} ...
1
vote
2answers
70 views

amsmath, vec and if not working together

I am trying to define some macros in which I need an "if" which test contains an argument of the macro. The issue arises when this argument is \vec{<arg>} and the amsmath package is loaded. Here ...
4
votes
1answer
84 views

`split` not working with self-defined command

I have defined a handy little macro to typeset matrix elements in braket-notation and now want to align the next line to a part of this matrix element, because the equations are really long and ...
8
votes
2answers
132 views

Text misplacement with certains combinations of \mathring and \overline

If I try to compile the following document \documentclass{article} \usepackage{mathtools} \DeclareMathOperator{\Op}{Op} \begin{document} \[ 1 + \mathring \Op(4) = 2 \] \[ \overline{ 1 + \mathring ...
12
votes
3answers
432 views

Multiple letters without spacing in Math [duplicate]

Is there something I can add to the preamble of my document such that multiple letters without spacing in a Math environment (such as $NP$) do not have extra spacing between them and are not ...
6
votes
1answer
97 views

Temporarily undefining a “starred” command

I would like to temporarily undefine a command. The reason for this is that I need to use a specific class file which defines the equation* using \@namedef and I would also really like to use the ...
0
votes
1answer
127 views

Expansion of single line vs multiple line gather

As described in Multiple split equations I want to create an equation environment that inserts aligned and lets me split equations with \n. The solution I found there is a bit hackish I guess, but ...
5
votes
2answers
347 views

Multiple split equations

I find myself again and again using a combination of the gather and aligned environments. So it would be nice to not have to write so much. In particular, it is often only clear after writing the ...
7
votes
1answer
203 views

\ifmmode self-contradictory in amsmath (OK in just LaTeX)

File: \documentclass[11pt]{article} \usepackage{amsmath} \newcommand{\argghhh}{\relax\ifmmode\bar\else\expandafter\=\fi} \begin{document} $ \argghhh a $ \end{document} produces error (but ...
5
votes
1answer
207 views

Declaring a newcommand for a single letter in mathcal

I am trying to enter a command that references the \mathcal font for single letter in LaTeX. Below is what I am trying and it doesn't seem to work, would appreciate any help. \newcommand {\until} ...
9
votes
1answer
87 views

\@ifnextchar inside pmatrix?

I created a function which handles a superscript followed after the function. I do that by using \@ifnextchar^. Everything works well, except in any pmatrix environment. Why? As a quick-and-dirty ...
4
votes
3answers
225 views

Command to uppercase the first letter of a maths command

This question is a bit similar to Command to uppercase the first letter of each word in a sentence. What I want is to build a new command for being used just at math mode, using the ...
2
votes
2answers
274 views

Patch newline (\\) in math environment using amsmath

I want to patch the newline command \\ in an align environment provided by amsmath. The patched version should execute some custom code and finally call the original definition, like in the following ...
6
votes
1answer
793 views

Using \leftroot{}, \uproot{} with closed square root symbol

As mentioned in this answer to Nice-looking p-th roots the amsmath package provides \leftroot{} and \uproot{} which allow you to move the position of the root to the left, and up in small increments. ...
16
votes
3answers
4k views

\DeclareMathOperator won't take arguments

I'd like to define a family of math operators that have the same superscript, but different subscripts. My first attempt was: \DeclareMathOperator{\Upd}[1]{U^M_{#1}} But the log tells me that: l.3 ...
15
votes
2answers
2k views

Extendible equals sign

I have a command that has been floating around in my standard preamble for a while: \newcommand{\xeq}[1]{\stackrel{\;#1}{\cleaders\hbox{=\!}\hfill}\:} It is meant to mimic the AMS-LaTeX extendible ...
3
votes
3answers
464 views

preceding a command by an argument

Environment:LaTeX \usepackage{amsmath,amssymb,amsopn}% read amsldoc.pdf for more details %\genfrac{left-delim}{right-delim}{thickness}{mathstyle}{numerator}{denominator} ...
16
votes
3answers
2k views

How do magic \dots work in amsmath?

The amsmath package redefines the \dots command so that it "guesses" the correct height of the dots with respect to its context. For example $x, \dots, y$ will produce three lowered dots, aligned ...