47k views

### When to use \edef, \noexpand, and \expandafter?

I'm quite happy hacking TeX macros and cobbling together bits and pieces from different style files to suit my own ends, but I have a suspicion that my resulting hacks are not quite as elegant as they ...
216k views

### How can I get Roman numerals in text?

For example: Charles's sister Bona, married the eldest son of Philip VI of France, the future John II of France, in 1335. How can I get Roman numerals?
27k views

### Defining commands/abbreviations that contain numbers

35k views

### How to check if a macro value is empty or will not create text with plain TeX conditionals?

I have a macro which holds some text value, e.g. \macro{some text}. If it is empty, I would like for nothing to appear in the document, but it has some content of any kind which would produce text ...
10k 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 ...
11k views

### How to concatenate strings into a single command?

I'd like to concatenate several parts of math text into a single command, and i read a great solution here on this site, allowing me to create this working example of what i mean : \documentclass[...
6k views

### What is the difference between \empty and \@empty?

I want to elaborate a command that would print differently simple differential dx and multidimensional differential d^3x. For this purpose I invented the command \dif with one optional argument. It is ...
1k views

### How to use \def or similar command to store an arbitrary number of variables for later processing?

I'm trying to create a package for drawing simple sequence diagrams using PGF/TikZ. Here is the basic idea I'm stuck at (not the whole idea to make it short): Let's say we have 1 environment (say ...