11 questions linked to/from Make Characters Active via Macro in Math Mode
1k views

### The \lowercase trick

We have a number of questions or rather answers using (and explaining) the \lowercase “trick”. \begingroup \lccode\~=\. \lowercase{\endgroup\def~}#1{foo with #1} However, after reading on ...
3k views

### Can I change the font and colour of a letter permanently?

For my lectures, I like to colour the symbols in the equations to make it easier to follow what's going on - a bit like syntax highlighting. So all vector spaces are one colour, all sets another, e ...
461 views

### Macro to take a character as argument, make it active, then \def it.

I have a XeLaTeX document in which I want some unicode symbols to be auto-substituted, like ¼ → 1/4, » → >>, « → <<. But instead of a long list like \catcode\¼=\active\def¼{1/4} \catcode\«=\...
1k views

### “Activate” active characters in argument passed as macro

Let's say I have some macro (\iPrint in the MWE) that internally uses active characters to interpret its argument: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \...
198 views

### Why does the amsmath package define \std@minus and \std@equal?

The amsmath package secures away the original \mathcode of the minus and equal signs, and subsequently uses the saved values in the macros that provide the extensible arrows (e.g., \leftarrowfill@). ...
443 views

### How do you define macros to toggle a character active and define a macro for it?

I'm experimenting with core tex in order to learn some basics. My goal is to define a shorthand environment which makes use of active characters. The general idea is to activate the used characters ...
1k views

### Redefining asterisk (*) in math mode

I am attempting to use a symbol from a separate font for the centered asterisk (∗) math operator. The font in question only has the heightened (in many fonts) asterisk glyph (*), which I try to use ...
123 views

### How to redefine spacing of a symbol inside a macro?

When writing mathematics expression, I would like to remove the space around the symbol +. For a simple expression a+b, I can do it by enclosing + like a{+}b. But it requires more labor work for ...
154 views

### Active ! Character Hangs within TikZ

The MWE below makes the ! active in math mode using the solution from Make Characters Active via Macro in Math Mode and uses the tikz \hcancel via Diagonal strikeout starting too low and ending too ...