diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-linmacnames.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-linmacnames.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-linmacnames.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-linmacnames.html index cb3a073af25..227f87446d3 100644 --- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-linmacnames.html +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-linmacnames.html @@ -29,7 +29,7 @@ I said, ``\csname cul8r\endcsname''. <dt>Pro:<dd> No unexpected side effects <dt>Con:<dd> So verbose as to be unusable </dl> -<li> Define a “special-command generator”, and use the resulting +<li> Define a “special-command generator”, and use the resulting commands: <blockquote> @@ -46,10 +46,10 @@ I said, ``\csname cul8r\endcsname''. </blockquote><p> <dl> <dt>Pro:<dd> Straightforward to use, not too untidy - <dt>Con:<dd> It’s hardly doing what we set out to do (experts will - see that you are defining a macro, but others likely won’t) + <dt>Con:<dd> It’s hardly doing what we set out to do (experts will + see that you are defining a macro, but others likely won’t) </dl> -<li> Convince TeX that “<code>8</code>” is a letter: +<li> Convince TeX that “<code>8</code>” is a letter: <blockquote> <pre> \catcode`8 = 11 @@ -59,13 +59,13 @@ I said, ``\cul8r''. </blockquote><p> <dl> <dt>Pro:<dd> <code>\</code><code>cul8r</code> can be used directly - <dt>Con:<dd> Likely to break other uses of “<code>8</code>” (such as + <dt>Con:<dd> Likely to break other uses of “<code>8</code>” (such as numbers or dimensions; so <code>\</code><code>setlength{<code>\</code><code>paperwidth</code>}{8in}</code> tells us: <blockquote> <pre> ! Missing number, treated as zero. -<to be read again> +<to be read again> 8 </pre> </blockquote><p> @@ -76,7 +76,7 @@ I said, ``\cul8r''. most ordinary users are well advised not even to try such a technique. <li> Define a macro <code>\</code><code>cul</code> which must always be followed by - “<code>8r</code>”: + “<code>8r</code>”: <blockquote> <pre> \def\cul8r{Goodbye!} @@ -86,17 +86,17 @@ I said, ``\cul8r''. <dl> <dt>Pro:<dd> <code>\</code><code>cul8r</code> can be used directly <dt>Con #1:<dd> Breaks if <code>\</code><code>cul</code> is followed by anything other - than “<code>8r</code>”, with a confusing diagnostic — + than “<code>8r</code>”, with a confusing diagnostic — <code>\</code><code>cul99</code> produces: <blockquote> <pre> ! Use of \cul doesn't match its definition. -<*> \cul9 +<*> \cul9 9 </pre> </blockquote><p> - (which would confuse someone who hadn’t even realised there + (which would confuse someone who hadn’t even realised there <em>was</em> a definition of <code>\</code><code>cul</code> in the document). <dt>Con #2:<dd> Silently redefines existing <code>\</code><code>cul</code>, if any; as a result, the technique cannot be used to define both a @@ -104,15 +104,15 @@ I said, ``\cul8r''. document. </dl> </ol> -Technique 3 is in fact commonly used — in a limited form — within +Technique 3 is in fact commonly used — in a limited form — within most LaTeX packages and within LaTeX itself. The convention is to -use “<code>@</code>” within the names of internal macros to hide them +use “<code>@</code>” within the names of internal macros to hide them from the user and thereby prevent naming conflicts. To this end, -LaTeX automatically treats “<code>@</code>” as a letter while +LaTeX automatically treats “<code>@</code>” as a letter while processing classes and packages and as a non-letter while processing -the user’s document. The key to this technique is the separation: -internally a non-letter is used for macro names, and the user doesn’t -see anything of it, while the status remains “frozen” in all the +the user’s document. The key to this technique is the separation: +internally a non-letter is used for macro names, and the user doesn’t +see anything of it, while the status remains “frozen” in all the definitions created within the class or package. See <a href="FAQ-atsigns.html"><code>\</code><code>@</code> and <code>@</code> in macro names</a> for more information. @@ -128,10 +128,10 @@ I said, ``\later''. </pre> </blockquote><p> which works, but rather defeats the object of the exercise. -(<code>\</code><code>later</code> has the “frozen” catcode for ‘8’, even though the value -has reverted to normal by the time it’s used; note, also, the use of -the primitive command <code>\</code><code>gdef</code>, since <code>\</code><code>newcommand</code> can’t make a -macro that’s available outside the group.) +(<code>\</code><code>later</code> has the “frozen” catcode for ‘8’, even though the value +has reverted to normal by the time it’s used; note, also, the use of +the primitive command <code>\</code><code>gdef</code>, since <code>\</code><code>newcommand</code> can’t make a +macro that’s available outside the group.) <p/><em>Recommendation</em>: Either choose another mechanism (such as <code>\</code><code>DefineRemark</code> above), or choose another name for your macro, one that contains only ordinary letters. A common approach is to use |