5
votes
1answer
86 views

Always have the ring of the tensor product below the \otimes

I would rather have always have my tensor product look like $A\underset{R}{\otimes}B$ but still write $A\otimes_R B$. Is there a way to make this happen by some command in the preamble? (it's ok if it ...
1
vote
1answer
35 views

How do I create a newcommand which outputs a letter with an index? [duplicate]

When I use \newcommand{\F1}{$\mathrm{F}_1$} I get the Missing \begin{document}. error and missing $ inserted if I move it inside the document. How do I define a macro so that \F1 would expand to ...
20
votes
2answers
216 views

Defining arithmetic operators that insert brackets according to usual precedence rules

I have a program that generates bits of Tex code like these: $\product{a}{\add{b}{c}}\leftrightarrow \add{\product{a}{b}}{\product{a}{c}}$ $\add{a}{\add{b}{c}}\leftrightarrow \add{\add{a}{b}}{c}$ ...
2
votes
1answer
82 views

mathjax \sqrt command

I don't if this forum is the right place where post my question, anyway, it concerns TeX. Mathjax seems to create the bar over the argument of \sqrt command as a box with a sequence of very densely ...
3
votes
1answer
107 views

Alternative for \DeclareMathOperator

I'm getting a little tired of defining all my mathematical operators with \DeclareMathOperator. Also it is rarely useful to have them as a macro. On the contrary it sometimes leads to macro name ...
5
votes
1answer
120 views

How to make functions

I’m not entirely sure here what terminology I should exactly be using, but let me illustrate a use case. ... \matr{1 & 2 \\ 3 & 4} ... to replace this: ... $\left[\begin{matrix} 1 & 2 ...
2
votes
1answer
78 views

How can I influence the spacing of mathematical functions by an own macro?

I would like to get a macro \of to define a function with an optional macro \at to define its restriction. The reason is, that I don't like the spacing for functions (as there is no spacing) and I ...
6
votes
1answer
94 views

Commands with Capital letters in their name

A topic that appear over and over is to explain the difference about commands such as \operatorname vs. \DeclareMathOperator. So far I've seen discussions about using one or the other, but no one ...
4
votes
2answers
788 views

Declaring a math operator with cursor placement, e.g. expected value

I'd like to declare a new math operator \ev for representing the expected value, in the form: E<.> so that it looks like the following but with an argument ...
4
votes
2answers
245 views

How to build macros for vector-matrix operators?

Can anybody build macros for doing the following vector operations? Or are there already such macros? For example, 1) Example data: \def\a{(5,3,0)} \def\b{(5,1,6)} ...
26
votes
2answers
7k views

newcommand vs. DeclareMathOperator

As far as I understand, whatever can be done using DeclareMathOperator can also be achieved using newcommand, but not the other way around. If this is the case, what are the circumstances where ...
7
votes
1answer
145 views

Creating a customizable n-ary operator?

I'd like to be able to create a customizable n-ary operator that behaves like \sum or \bigoplus but which takes an arbitrary symbol as an argument. The closest that I have been able to come to ...
5
votes
1answer
487 views

How to make a \newcommand that acts like \dim?

The \dim command is good at deciding how to space things following it: for example, both $\dim M$ and $\dim_A M$ look right (the subscript immediately follows the dim, whereas the non-subscripted ...
9
votes
4answers
969 views

Swap definition of starred and non-starred command

I don't like the fact that I am required to use \abs* when I want the vertical line of the absolute value to automatically re-size. I pretty much always want it to re-size, so would like to swap the ...
34
votes
8answers
1k views

How can I specify a long list of math operators?

The preambles of my LaTeX documents often include many many lines of \DeclareMathOperator instructions, e.g. \DeclareMathOperator{\Rep}{Rep} \DeclareMathOperator{\Tet}{Tet} ...