File: FAQ-edef.html

package info (click to toggle)
texlive-doc 2005.dfsg.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 125,100 kB
  • ctags: 12,558
  • sloc: xml: 24,267; perl: 14,394; makefile: 727; sh: 324; lisp: 276; java: 159; sed: 4
file content (20 lines) | stat: -rw-r--r-- 1,397 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<head>
<title>UK TeX FAQ -- question label edef</title>
</head><body>
<h3><code>\</code><code>edef</code> does not work with <code>\</code><code>protect</code></h3>
<p>Robust LaTeX commands are either "naturally robust" - meaning that
they never need <code>\</code><code>protect</code>, or "self-protected" - meaning that
they have <code>\</code><code>protect</code> built in to their definition in some
way. Self-protected commands are robust only in a context where the
<code>\</code><code>protect</code> mechanism is properly handled.  The body of an
<code>\</code><code>edef</code> definition doesn't handle <code>\</code><code>protect</code> properly, since
<code>\</code><code>edef</code> is a TeX primitive rather than a LaTeX command.
<p>This problem is resolved by a LaTeX internal command
<code>\</code><code>protected@edef</code>, which does the job of <code>\</code><code>edef</code> while keeping the
<code>\</code><code>protect</code> mechanism working.  There's a corresponding
<code>\</code><code>protected@xdef</code> which does the job of <code>\</code><code>xdef</code>.
<p>Of course, these commands need to be tended carefully, since they're

internal: see <a href="FAQ-atsigns.html">'@' in control sequence names</a>.
<p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=edef">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=edef</a>
</body>