Linked Questions

4
votes
0answers
93 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 ...
0
votes
1answer
56 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 ...
139
votes
5answers
12k 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). ...
26
votes
3answers
4k 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 ...
21
votes
3answers
5k 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, ...
25
votes
3answers
1k 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 \...
22
votes
2answers
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 ...
10
votes
2answers
1k 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, ...
5
votes
2answers
443 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 ...
6
votes
2answers
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 \...
10
votes
2answers
528 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 ...
6
votes
1answer
725 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 ...
4
votes
1answer
851 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 ...
2
votes
2answers
222 views

Enable \ifmeasuring@ flag

Apparently the \DHLhksqrt macro in the MWE below measures its content 20 times: Questions: Where exactly can I put the \measuring@true and \measuring@false so that I get the count of 1? If you ...
2
votes
1answer
150 views

How can I know if I am inside an equation environment if it's nested with others?

I wanted to define some partial derivative commands that would be \partial y/\partial x if it was inside an inline equation and would use \frac{\partial y}{\partial x} if inside an equation ...

15 30 50 per page