Linked Questions

9
votes
1answer
160 views

weird ifnum with compact syntax [duplicate]

In some packages like tabularx, I find the following syntax in many places {\ifnum0=`}\fi or even \ifnum0=`{\fi} But I can't figure out why this can be useful for? Is ` a register of some kind? ...
30
votes
6answers
28k views

What is \iffalse for?

So this is something I've wondered about for a while. What use is a conditional that always evaluates to false? I guess it's a neat way to "hide code from LaTeX" but apart from that, is it ever useful?...
26
votes
5answers
2k views

Where do I find \futurelet's nasty behaviour documented?

Until recently, I thought that execution of \futurelet\testtoken<token1><token2>... has the following effect: The control sequence \testtoken is \let to <token2> and \futurelet\...
38
votes
3answers
2k views

TeX macro idioms, or: understanding advanced macros

I often find that when I look at solutions from the experts here, the macro definitions are completely inscrutable to me. Trying to use standard techniques one would use to understand code in most ...
8
votes
6answers
419 views

When might it be helpful to use implicit braces instead of explicit braces?

We've covered the question "When can one use implicit braces instead of explicit braces?"; this leads immediately in my mind to the question "Why would one want to?" (Remember, implicit braces are e....
14
votes
3answers
439 views

Expansion of first token in a tabular cell

Background I currently do some work on the collcell package which collects the content of a tabular/array cell and provides it to a user defined macro, e.g. using >{\collectcell\mymacro}c<{\...
4
votes
3answers
2k views

Replace chars with xstring. Catcode problem

I try to do something like this (minimal example): \documentclass[]{article} \usepackage{mathtools} \usepackage{xstring} \newcommand{\foo}[1]{ \StrSubstitute{#1}{:}{\string&}[\fooo] \...
6
votes
2answers
433 views

how to lower last term in a continued fraction after a diagonal row of dots?

How can I lower the last term of a continued fraction when it follows a diagonal row of dots?
21
votes
1answer
599 views

When can one use implicit braces instead of explicit braces?

For context, an implicit character is a control sequence that has been \let to a character. For example, both plain TeX and LaTeX use \let\bgroup{ \let\egroup} making \bgroup and \egroup into implicit ...
5
votes
2answers
96 views

Overwrite matrix to work inside align (to use mtpro2 parentheses and braces)

To use large round parentheses and large curly braces provided by the MathTime Pro 2 font, I’m using the code from this answer by @BrunoLeFloch to redefine pmatrix, Bmatrix and cases. However, ...