{catcodes} is about "category codes" — an integer number from 0–15 associated to each of the 256 character codes. The category codes indicate the role of a character.

learn more… | top users | synonyms

19
votes
2answers
413 views

How bad is slack \makeatother discipline really?

Following Will Robertson's admission that Fwiw, i'm not aware of any troubles with a missing \makeatother, but you're right. It's a bad habit of mine to omit it, and my own progressive slackness about ...
2
votes
2answers
609 views

ignorespace and unskip in verbatim/listings?

I am writing a \bashDemo macro that will (a) execute its argument in a shell, e.g., bash, script, and (b) display the argument in a listings. So, \bashDemo ls -ls > myfiles \END will both run ls ...
4
votes
2answers
144 views

Command to display free-text answers from a survey, eliminating ascii control chars

I'd like to create a report from a survey with free-text answers that is collected in a database. For each question there are typically many answers which I could present in an itemize environment, ...
4
votes
2answers
193 views

Get tokens between two commands

I'm trying to create a screenplay-like class that uses a very simple syntax to create the dialogue, and dumps it as a plain text file for use in subtitles. To divide the subtitle sections I use &, ...
223
votes
1answer
29k views

What do \makeatletter and \makeatother do?

Many TeX “hacks” begin with \makeatletter and end with \makeatother. What do these commands do?
9
votes
4answers
564 views

How do I get the category code of a character that is the value of a control sequence?

How can I get the category code of a character that is the value of a control sequence? If I do this The catcode for A is \the\catcode`A. I get The catcode for A is 11. If I do this \let\abc=A ...
13
votes
4answers
2k views

How to make a real backslash (escape) character?

I just want a good way to make a backslash character (or whatever character(s) any given format uses as escape characters), suitable to \write to a file or pass to a pdfTeX primitive. Let me ...
34
votes
1answer
3k views

Is it \catcode or \catcode`?

I've noticed that \catcode is poorly documented in the TeXbook. The primitive is defined as \catcode but every time it is used, it is used as \catcode` ... the backquote is never discussed. ` itself ...
4
votes
2answers
433 views

How to test whether next token on input stream is catcode 10

Why doesn't the following code work? From a failed, now fixed, SO answer of mine: \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \newcommand\latinabbrev[1]{ \peek_meaning:NTF . {% Same ...