How can the special characters { and } be written literally to an external file in LaTeX, without being balanced?
Obviously the following does not work:
\immediate\write\my@outfile{{}
\immediate\write\my@outfile{}}
|
How can the special characters Obviously the following does not work:
|
||||
|
|
|
Writing balanced braces doesn't require anything special, as the following transcript of an interactive TeX session shows:
If you want to write unbalanced braces you can do with
that is, using
Notice that LaTeX already has equivalents of Alternative definitions for
or
|
||||
|
|
|
In order to write unbalanced braces you should use macros which hold them as verbatim characters instead. These will be expanded when written to the file. LaTeX2e defines
You can also define you own macro easily with
|
|||
|
|
|
Depends what you want to do, you can try escaping it
This will write |
|||
|
|