Linked Questions
20 questions linked to/from How to capture the current math style?
43
votes
2
answers
14k
views
The mysteries of \mathpalette
I would like to make a macro, \vfrac, which output would look like:
$$\displaylines{
\displaystyle\raise.25ex\hbox{$\displaystyle1$}\!/\!\lower.5ex\hbox{$\displaystyle2$} \cr
\textstyle\raise....
28
votes
6
answers
4k
views
Is there a test for the different styles inside maths mode?
Is there a test for the different styles within maths mode? What I really want is to be able to save the current style to reinvoke it later on, but a \if along the lines of \ifmmode would work just ...
29
votes
2
answers
2k
views
What’s behind \over?
Typically a TeX command have arguments coming after it. But the command \over, which is used to produce fractions, can access the token before it. How exactly is it implemented and can I define a ...
31
votes
2
answers
21k
views
Shifting a symbol vertically in Math mode
I have a small nitpicking query
I have:
$S\sqsubset\mathbf{P}$
and noticed that the \sqsubset symbol is a bit too low (off centered) for my liking. Is it possible to shift it up slightly?
26
votes
2
answers
4k
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 ...
8
votes
4
answers
2k
views
Custom Math Symbol - Two Sigma Sums
I'd like to be able to set a new math command/macro that is a Sigma shifted slightly (diagonal) on top of another Sigma, but am unsure how to go about it. I'd like it to behave just as a single Sigma ...
12
votes
2
answers
590
views
Value of LuaTeX’s \mathstyle in \frac (de)nominator
This was fixed in version from 2017/06/15 (available on CTAN).
This is a followup question of How to transfer math style in \hbox_set?.
While the code I posted there as an answer using LuaTeX’s \...
8
votes
2
answers
656
views
Less aggressive automatic paren stretching with \left
\left and \right are convenient but sometimes they're a bit overeager in stretching the parentheses. In that case we can manually use \bigl, \Bigl, etc.
I have defined a new command like this
\...
5
votes
4
answers
302
views
How to create special math macros which preserve the current style?
The mathtools package provides a number of commands like \mathmbox which preserve the current math style. The process seems to involve a lot of \expandafters, \mathpalette and \m@th. The following ...
4
votes
2
answers
2k
views
Adjusting the position of \dot
I'm writing a paper that uses the symbol \dot{\mathcal{U}} which for me (in PDFLaTeX with Palatino math fonts) looks like this:
As you can imagine, from further away, the dot is invisible. Is there ...
7
votes
1
answer
710
views
(Nonfatal but Symptomatic) Conflict of amsmath and mathstyle Packages
This was brought to my attention by our colleague, Lover of Structure, but since it affects my scalerel package (which began using the mathstyle package to detect the current math style, as of version ...
2
votes
1
answer
2k
views
Aligning equality sign with overset text
I'm typing a logic definition within an align environment that uses \overset{def}{=} from the amsmath environment.
However, the new sign is aligned vertically based on the equality sign, and not on ...
3
votes
1
answer
208
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 ...
5
votes
1
answer
467
views
\ThisStyle, \SavedStyle and \bm
I think this is a follow-up to How to capture the current math style?.
In this MWE, \bm{\testbox} works when used after \testbox. But it does not work on its own (commented line):
\documentclass{...
4
votes
2
answers
256
views
How to transfer math style in \hbox_set?
This question is kind of follow up question of the following
How to capture the current math style?
Is there a test for the different styles inside maths mode?
Cache math content in savebox and ...