t \(\longleftarrow\) (focus-tree)
tag \(\longleftarrow\) (tree-label t)
n \(\longleftarrow\) (tree-arity t)
nl \(\longleftarrow\) (focus-doc-arg-names t 0 '())
tag-doc \(\longleftarrow\) (tmdoc-search-tag tag)
![]() |
Contextual help on the “tag” tag | ![]() |
if tag-doc
Description\(\Uparrow\)
tag-doc
else
Usage\(\Uparrow\)
‘(explain-macro ,(symbol->string tag) ,@nl)
description-aligned
description-aligned
if (tree-label-extension? tag)
Current definition\(\Uparrow\)
\(\langle\)inactive*|\(\langle\)assign|tag|(get-env-tree (symbol->string tag))\(\rangle\)\(\rangle\) |
if (or (focus-has-variants? t) (focus-has-toggles? t))
Structured variants\(\Uparrow\)
if (focus-has-variants? t)
The tag tag has several structured variants: \(\langle\)intersperse , |\(\langle\)for v in (variants-of tag)|v\(\rangle\)\(\rangle\). You may circle among these variants using the keyboard shortcuts ⌥⇥ and ⌥⇧⇥. You may also pick a specific variant from the Focus\(\rightarrow\)(focus-tag-name tag) menu or the (focus-tag-name tag) menu on the focus toolbar.
if (numbered-context? t)
For most style files, the tag
environment is \(\langle\)if (symbol-numbered?
tag)|numbered|else|unnumbered\(\rangle\).
The environment has \(\langle\)if (symbol-numbered?
tag)|an unnumbered|else|a
numbered\(\rangle\) variant (symbol-toggle-number
tag). You may
toggle the numbering using the keyboard shortcut ⎋#,
the menu entry Focus\(\rightarrow\)Numbered, or by pressing the
icon on the focus toolbar.
if (alternate-context? t)
if (alternate-first? t)
if (alternate-second? t)
The tag environment is “unfolded” and has a folded variant (symbol-toggle-alternate tag). You may fold the environment using the keyboard shortcut ⎋*, the menu entry Focus\(\rightarrow\)(alternate-second-name t), or by pressing the \(\langle\)icon|(alternate-second-icon t)\(\rangle\) icon on the focus toolbar.
Folding and unfolding is performed automatically during the traversal of a document in presentation mode.
if (focus-has-preferences? t)
Style preferences\(\Uparrow\)
opts \(\longleftarrow\) (search-tag-options t)
pars \(\longleftarrow\) (list-filter (search-tag-parameters t) parameter-show-in-menu?)
thms \(\longleftarrow\) (search-tag-themes t)
The rendering of the tag
tag can be customized by editing the macro which defines it.
This can be done by clicking on Edit
macro button in the Focus\(\rightarrow\)Preferences menu (or in the
equivalent
icon menu on the focus
toolbar). You may also directly edit the macro in the style
file or package where it was defined, using Edit
source.
if (nnull? (append opts pars thms))
Still using the Focus\(\rightarrow\)Preferences menu, you may also specify \(\langle\)if (and (nnull? opts) (null? pars))|style options\(\rangle\)\(\langle\)if (and (null? opts) (nnull? pars))|style parameters\(\rangle\)\(\langle\)if (and (nnull? opts) (nnull? pars))|style options and parameters\(\rangle\) that apply to the tag tag. These settings are global, so they will apply to all other tag tags in your document, and generally also to other similar tags.
if (nnull? thms)
if (nnull? opts)
\(\circ\)Style options
if (nnull? pars)
\(\circ\)Style parameters
for thm in thms
\(\circ\)Parameters for the thm theme
if (focus-can-move? t)
Structured navigation\(\Uparrow\)
It is sometimes useful to quickly go through all tag tags and its variants, inside a document. This can be done efficiently using the following keyboard shortcuts, menu entries, or icons on the focus toolbar:
Jump to the first tag similar to tag.
Jump to the previous tag similar to tag.
Jump to the next tag similar to tag.
Jump to the last tag similar to tag.
For more information and further useful shortcuts, we refer to the section on structured cursor movements.
if (and (defined? 'any-table-tag?) (any-table-tag? tag))
Structured insert and delete\(\Uparrow\)
The tag tag is a tabular environment. New rows and columns can be inserted using the following keyboard shortcuts, menu entries, or icons on the focus toolbar:
Insert a new column on the left-hand side of the cursor.
Insert a new column on the right-hand side of the cursor.
Insert a new row above the cursor.
Insert a new row below the cursor.
Existing rows and columns can be removed as follows:
Remove the column at the left-hand side of the cursor.
Remove the current column and move to the next one.
Remove the row above the cursor.
Remove the current row and move to the one below.
else
if (and (defined? 'field-tags) (tm-in? t field-tags))
Structured insert and delete\(\Uparrow\)
The tag tag is used inside interactive sessions. New input fields can be inserted using the the following keyboard shortcuts, menu entries, or icons on the focus toolbar:
Existing input or input/output fields can be removed as follows:
Remove the field above the cursor.
Remove the current field and move to the one below.
Remove the start-up banner of the session.
Remove the last field of the session.
else
if (or (structured-horizontal? t) (structured-vertical? t))
Structured insert and delete\(\Uparrow\)
The tag tag has a variable number of arguments. New arguments can be inserted using the following keyboard shortcuts, menu entries, or icons on the focus toolbar:
description-long
description-long
Existing arguments can be removed as follows:
description-long
description-long
if (< (length (tree-accessible-children t)) n)
Hidden arguments\(\Uparrow\)
il \(\longleftarrow\) (list-filter (.. 0 (length nl)) (lambda (i) (not (tree-accessible-child? t i))))
sl \(\longleftarrow\) (map (lambda (i) (list-ref nl i)) il)
When the tag
tag is activated, the following arguments are
hidden: \(\langle\)intersperse
, |\(\langle\)for x
in sl|x\(\rangle\)\(\rangle\). In
order to edit the hidden arguments, you should use Focus\(\rightarrow\)Show
hidden or push the
icon on the focus toolbar. Deactivated tags can be reactivated
by pressing ↩.
Non internal hidden arguments which contain string values can also be edited directly in the text fields on the focus toolbar; no need to deactivate the tag tag in this case.
if (focus-has-geometry? t)
Structured geometry\(\Uparrow\)
Not yet documented.