122 views

### How to use \ifinner to differentiate between text math and display math mode? [duplicate]

Possible Duplicate: Is there a test for the different styles inside maths mode? This is my first post here, so I can't promise to get all formatting right, but I'll try. Consider the following ...
65 views

### Make macro which checks the type of math mode its in [duplicate]

I frequently find that I want to make a macro, say a derivative macro for example with the following syntax: \def\dd #1;#2;{ return... } However, I want it to check if it is inline math such as when ...
13k views

### LaTeX3 versus pure Lua

Reading this site for the last nearly two years I've learned a lot about LaTeX3 (which I had previously understood to be a defunct pipe dream) and LuaTeX (of which I was previously totally unaware). ...
5k views

### Vertically asymmetric size variation for parentheses

One of the difficulties I have with writing formulas in LaTeX is that the standard sizing tools for the variable-size operators (parentheses, etc.) do not account for "high" symbols and "low" symbols ...
6k views

### \newcommand: How to determine if in math mode (and then include )?

I would like to define a new command which should determine (within a tikz plot) whether its argument is in math mode or not. If so, it should wrap the argument with . I found \ifmode to do this, ...
2k views

### How to capture the current math style?

\mathchoice helps to distinguish between math styles: \mathchoice {<something in \displaystyle>} {<something in \textstyle>} {<something in \scriptstyle>} {<something in \...
3k views

### Proper use of \mathchoice

I am trying to learn how to use \mathchoice. Before the solution was posted for Non-invasive replacement for \fbox?, I attempted to use mathchoice to adjust the size of the parameter before measuring ...
3k views

### Coloured underlines of equations and text in LaTeX Beamer

A previous question asked how to underline equations in color (1). However, many of the solutions suggested don't work in LaTeX Beamer. I also had difficulties finding ways for simple customisation, ...
512 views

### How to make the amsxtra \accentedsymbol work with subscripts etc.?

The amsxtra package provides the \accentedsymbol command which typesets the argument and stores the result. This can speed up LaTeX compilation significantly if lots of accents etc. are used ...
1k views

### Problem with \mathpalette and \mathchoice

When working on an additional answer to this question of mine, I stumbled across the following problem with \mathpalette. For simplicity I give an example where in practice it is ridiculous to use \...
573 views

### How do I get references in subscripts to be the right size when compiling to dvi with hyperref?

(Having investigated the original question, I'm taking the liberty of re-writing it as I've found a MWE and so isolated the problem, but I don't know a solution. Andrew Stacey.) The scenario is as ...
1k views

### New math command with alternative definition for inline mode

I'm interested in writing a command which would result in output that varies when called within $...$ tags and when called within, say, displaymath environment. For instance, assume that I want to ...
1k views

### Create rotated prime symbol

I would prefer to work with a prime symbol that is less rotated. I tried the following \usepackage[figuresright]{rotating} \newcommand*{\p}{\turnbox{12}{$\,'$}\;} which is visually what I desire. If ...