3k views

### Why isn't everything expandable?

TeX's macro processor does its work in a process called expansion. For an input stream of tokens, the macro processor repeatedly expands them until non-expandable tokens remain. The resulting stream ...
3k 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 ...
9k views

### Expanding arguments before macro call

I've been banging my head against this for days. I have a macro which takes a macro name and its arguments. It then re-arranges the arguments a bit and then calls the passed macro with the re-arranged ...
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 \...
951 views

### What is TeX's gullet?

Chapter 7 of The TeXbook famously talks of TeX as having 'eyes', 'mouth' and 'stomach' and goes on to talk of TeX's 'digestive processes' and keeps reusing these terms. Chapter 8 introduces talk of ...
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 ...
3k views

While reading about packages that allow to hook macros to certain events, I came across this command, \shipout. Searching on the internet didn't help a lot but if I'm not so wrong it's somehow related ...
21k views

### \hat and \widehat look terrible: fixing width and better positioning?

I want to make the use of quantum mechanical operators explicit in my text using \hat{A} or \widehat{A}. The problem is that depending on the symbol under the accent it looks either misplaced or too ...