GNU Info

Info Node: (groff)Copy-in Mode

(groff)Copy-in Mode


Next: Parameters Prev: Writing Macros Up: Writing Macros
Enter node , (file) or (file)node

Copy-in Mode
------------

   When `gtroff' reads in the text for a macro or diversion, it copies
the text (including request lines, but excluding escapes) into an
internal buffer.  Escapes are converted into an internal form, except
for `\n', `\$', `\*', `\\' and `\<RET>' which are evaluated and
inserted into the text where the escape was located.  This is known as
"copy-in" mode or "copy" mode.

   What this means is that you can specify when these escapes are to be
evaluated (either at copy-in time or at the time of use) by insulating
the escapes with an extra backslash.  Compare this to the `\def' and
`\edef' commands in TeX.

   The following example prints the numbers 20 and 10:


     .nr x 20
     .de y
     .nr x 10
     \&\nx
     \&\\nx
     ..
     .y


automatically generated by info2www version 1.2.2.9