4
votes
2answers
63 views

How to deal with macro expansion and 'TeX capacity exceeded' when using write18?

this thing is driving me nuts. ever since the friendly and knowledgeable people here on tex SE have guided me to doing multiple string replacements the proper way, i've been trying to incorporate that ...
5
votes
1answer
79 views

\begingroup, \endgroup expansion problem “Undefined control sequence.”

I just created an answer that uses a temporary variable with \write\@auxout and thought it would be good idea to scope with \begingroup, \endgroup. For some Reason this results in: ! Undefined ...
1
vote
0answers
34 views

What's the shortest input that makes TeX and/or TeX-based systems go into a loop? [duplicate]

The following 12-character input causes TeX to go into a loop. \def\x{\x}\x It won't crash, it won't produce an error message, it'll just sit there for ever, trying to compile the document (but not ...
9
votes
3answers
139 views

Problem with ^^<HEX>

I have small problem with ^^<HEX>. If I have a <HEX> part of the ^^<HEX> in the macro \def\attemp{<HEX>}, I cannot write ^^<HEX> as ^^\attempt or ...
6
votes
4answers
138 views

Expansion of commands in errmessage

When I run \documentclass{article} \def\pet{dog} \errmessage{My \pet\ is {sick}} \begin{document} My \pet\ is {sick}. \end{document} the error message is: My dog\ is {sick}. but the PDF ...
3
votes
2answers
238 views

Undefined control sequence \pgfmath@

Why does the following code give me this error message? Error ERROR: Undefined control sequence. --- TeX said --- \pgfmath@dimen@ ...men@@ #1=0.0pt\relax \pgfmath@ l.28 \draw ...
7
votes
3answers
640 views

\uline within a pgfmath expression produces an error

Why does using \uline within a pgfmath expression result in an error? \documentclass{article} \usepackage[normalem]{ulem} \usepackage{tikz} \begin{document} \pgfmathparse{width("\uline{blabla}")} ...
13
votes
1answer
126 views

\( \) don't work with TOC?

If i write this line of code \subsection{Ranger \( n \) boules distinguables dans \( M \) boîtes} I obtain an error over the second \) (./Probabilité.toc ./Probabilité.toc:8: LaTeX Error: Bad ...
4
votes
2answers
323 views

expand macro in single byte encoded code

In this minimal (not) working example, I try to use single-byte latin10-encoded source file, and expand a command-macro containing a character with \catcode254: % -*- mode: latex; unibyte: t; ...
5
votes
2answers
216 views

\StrMid and \MakeUppercase problem

What's wrong with this: \documentclass{minimal} \usepackage{xstring} \begin{document} \newcommand{\cim}{c1095} \StrMid{\MakeUppercase{\cim}}{1}{1} \StrMid{\cim}{2}{100} \end{document} ...
6
votes
4answers
336 views

Signalling error in “expandable context”

I'm reviewing a few old macros of mine to make them fully expandable. One of the macros takes one argument, which should either be a two-digit or a four-digit integer (>1955). The macro then converts ...
0
votes
2answers
2k views

The argument of foo has an extra }.

I'm trying to write a command that does, effectively, an \fbox in something like an align environment. The following code works: \usepackage{etextools} \makeatletter ...