How do I deactivate an active character? The following works without the activizations in the preamble, but not with them, in spite of my attempt to reset the catcode of : to 12.


\catcode`:=\active \def:{\,\string:}
\catcode`!=\active \def!{\,\string!}


Tom went on whitewashing---paid no attention to the steamboat. Ben stared
a moment and then said: `\emph{Hi-Yi! You're} up a stump, ain't you!'

  • \label{not\string:to\string:be\string:typeset} – egreg Aug 16 '17 at 12:11
  • Better: use babel features. – egreg Aug 16 '17 at 12:17
  • 1
    The label is stored in a the aux-file and read back at \begin{document}, so you should pay attention at the catcode values there too. – Ulrike Fischer Aug 16 '17 at 12:19
  • @egreg, which babel features? – Toothrot Aug 16 '17 at 12:46
  • @egreg, I suppose one could use l3regex to replace all occurrences of : inside \label with \string:, unless there is a better way. – Toothrot Aug 16 '17 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.