Miscellaneous style-sheet primitives

<extern|scheme-foo|arg-1||arg-n>
(apply extern typesetting macro)

This primitive allows the user to implement macros in Scheme. The primitive applies the Scheme function or macro scheme-foo to the arguments arg-1 until arg-n. For instance, the code <extern|(lambda (name) ‘(concat "hi " ,name))|dude> yields “hi dude”.

The arguments arg-1 until arg-n are evaluated and then passed as trees to scheme-foo. When defining a macro which relies on extern scheme code, it is therefore recommended to pass the macro arguments using the quote-arg primitive:

< assign | inc-div | < macro | x | y |

<\extern|

(lambda (x y) ‘(frac ,x (concat "1+" ,y)))

|

<quote-arg|x>

|

<quote-arg|y>

>

> >

It has been foreseen that the accessability of the macro arguments x and y is preserved for this kind of definitions. However, since TeXmacs does not heuristically analyze your Scheme code, you will have to manually set the D.R.D. properties using drd-props.

Notice also that the Scheme function scheme-foo should only rely on secure scheme functions (and not on functions like system which may erase your hard disk). User implemented Scheme functions in plug-ins may be defined to be secure using the :secure option. Alternatively, the user may define all Scheme routines to be secure in EditPreferencesSecurityAccept all scripts.

<write|aux|content>
(write auxiliary information)

Please document.

<flag|content|color>

<flag|content|color|var>
(display an informative flag)

This tag is used to in order to inform the user about information which is present in the document, but not visible when printed out. TeXmacs displays such informative flags for labels, formatting directives such as page breaks, and so on. In DocumentViewInformative flags, the user may specify how the informative flags should be rendered.

The two-argument variant displays an informative flag with a given content and color. The content is only rendered when selecting DocumentViewInformative flagsDetailed. For instance, <flag|warning|red> is rendered as . The optional var argument may be used in order to specify that the flag should only be visible if the macro argument var corresponds to an accessible part of the document. For instance, TeXmacs automatically generated labels for section titles (so as to include them in the table of contents), but it is undesirable to display informative flags for such labels.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".