Next: , Previous: , Up: Conditionals   [Contents][Index]


16.4 Inline Conditionals: @inline, @inlineifelse, @inlineraw

Texinfo provides a set of conditional commands with arguments given within braces:

@inlinefmt{format, text}

Process the Texinfo text if format output is being generated.

@inlinefmtifelse{format, then-text, else-text}

Process the Texinfo then-text if format output is being generated; otherwise, process else-text.

@inlineraw{format, text}

Similar, but for raw text (see Raw Formatter Commands).

The supported format names are:

docbook  html  info  plaintext  tex  xml

For example,

@inlinefmt{html, @emph{HTML-only text}}

is nearly equivalent to

@ifhtml
@emph{HTML-only text}
@end ifhtml

except that no whitespace is added, as happens in the latter (environment) case.

In these commands, whitespace is ignored after the comma separating the arguments, as usual, but is not ignored at the end of text.

To insert a literal at sign, left brace, or right brace in one of the arguments, you must use the alphabetic commands @atchar{} (see Inserting an Atsign), and @lbracechar{} or @rbracechar{} (see Inserting Braces), or the parsing will become confused.

With @inlinefmtifelse, it is also necessary to use @comma{} to avoid mistaking a ‘,’ in the text for the delimiter. With @inlinefmt and @inlineraw, @comma{} is not required (though it’s fine to use it), since these commands always have exactly two arguments.

For TeX, the processed text cannot contain newline-delimited commands. Text to be ignored (i.e., for non-TeX) can, though.

Two other @inline... conditionals complement the @ifset and @ifclear commands; see the next section.


Next: , Previous: , Up: Conditionals   [Contents][Index]