Next: , Previous: , Up: AT commands   [Contents][Index]


5.5.11 ‘@K’: Extract global RCS-like keyword

The construction ‘@K Keyword @>’ accesses the value of a global RCS-like keyword. (For more discussion of such keywords, see ATz.) The command is treated differently by FTANGLE and FWEAVE depending on its location in the source file.

FWEAVE will expand the construction in the limbo section and TeX parts only. The value is not surrounded by quotes. For example,

@z
$Id:  test $
@x

@c

\def\ID{Id = \.{"@K Id @>"}}

@ \ID.  This is a @K Id @>.

will expand into

@c

@ \ID.  This is a test.

and when LaTeX is run the macro \ID will expand to ‘Id = \.{"Test"}’. The quotes are not necessary in the macro definition; they are included only to emphasize that in this (limbo) context the ‘@K’ construction can effectively be put inside a string. This is possible because the routine that copies the limbo section simply copies characters; it does not tokenize anything.

FWEAVE does not expand ‘@K’ constructions in the definition or code parts; it merely gives them a symbolic representation.

FTANGLE, on the other hand, expands ‘@K’ constructions in the definition or code parts (during input). The values are surrounded by quotes. (As usual, FTANGLE ignores material in the limbo section and TeX parts.)

For FTANGLE, the built-in function ‘$KEYWORD’ (see $KEYWORD) behaves essentially as does ‘@K’, except that it is expanded during output, not input. FWEAVE does not expand ‘$KEYWORD’.

The command ‘@k’ behaves as does ‘@K’ except that it accesses local keywords, not global ones. See ATk.


Next: , Previous: , Up: AT commands   [Contents][Index]