Literals and Emphasis

literal constructemphasis construct

When writing about program code, it is often desirable to be able to indicate that a particular word or phrase be typeset in the same manner as the code being discussed. For example, one might talk about the variable topval or the procedure stack_pop and wish for them to be typeset as they are in this sentence. This, of course, is simple to do using TEX macros, but use of the (more general) FunnelWeb typesetting directives to do the same work has the added benefit of keeping the document portable to other typesetters.

FunnelWeb provides two in-text type modification constructs: @{...@} and @/...@/@slash@braces where … is raw text. The @{...@} construct sets the enclosed text in the same manner as the text of macro definitions is set. The @/...@/ construct emphasises its enclosed text in some typesetter-dependent fashion. Typically the emphasised text is set in italics.

Here is an example of how these constructs might be used:

The following procedure @{put_sloth@} writes the @{sloth@} variable to
the output file. Note: @/The output file must be opened for writing
at this point or the program will crash!@/