doctools_lang_cmdref(n)
β¨ NAME β¨
doctools_lang_cmdref(n) β the doctools language command reference, bestie. π This is your girl for all the doctools markup language commands, version 1, and it's from the Documentation tools section. No cap.
π SYNOPSIS π
arg text
arg_def type name ?mode?
bullet
call args
category text
class text
cmd text
cmd_def command
comment plaintext
const text
copyright text
def text
description
enum
emph text
example text
example_begin
example_end
file text
fun text
image name ?label?
include filename
item
keywords args
lb
list_begin what
list_end
lst_item text
manpage_begin command section version
manpage_end
method text
moddesc text
namespace text
nl
opt text
opt_def name ?arg?
option text
package text
para
rb
require package ?version...?
section name
sectref id ?text?
sectref-external text
see_also args
strong text
subsection name
syscmd text
term text
titledesc desc
tkoption_def name dbname dbclass
type text
uri text ?text?
usage args
var text
vset varname value
vset varname
widget text
π¦ DESCRIPTION π¦
Okay so this document is the whole spec for both the names and the syntax of all the commands that together make up the doctools markup language, version 1. It's a reference, so the commands are listed in alphabetical order, and the descriptions are relatively short β no fluff, just facts. If you're a beginner, bestie, you should read the much more informally written doctools language introduction first. It's giving tutorial energy and it's way more chill. π
π COMMANDS π
arg text
Text markup, bestie. The text argument gets marked up as the argument of a command. Main uses are highlighting command arguments in free-form text, and for the argument parameters of the call and usage markup commands. Slay.
arg_def type name ?mode?
Text structure, list element, argument list. It automatically closes the previous list element. You use it to specify the data-type of the described argument of a command, its name, and its i/o-mode. That last one, mode, is optional. No pressure.
bullet
Deprecated, bestie. Text structure, list element, itemized list. See item for the canonical command to open a list item in an itemized list. This one's giving legacy vibes, so maybe don't use it for new stuff.
call args
Text structure, list element, definition list. Automatically closes the previous list element. It defines the term as a command and its arguments. The first argument is the name of the command described by the following free-form text, and all arguments coming after that are descriptions of the command's arguments. It is expected that the arguments are marked up with arg, method, option, etc., as is appropriate, and that the command itself is marked up with cmd. It is expected that the formatted term is not only printed in place, but also in the table of contents of the document, or synopsis, depending on the output format. So it's iconic in multiple places, you know?
category text
Document information. Can go anywhere. This command registers its plain text arguments as the category this document belongs to. If this command is used multiple times, the last value specified is used. So choose your category wisely, bestie.
class text
Text markup. The argument is marked up as the name of a class. The text may have other markup already applied to it. Main use is the highlighting of class names in free-form text. Cute.
cmd text
Text markup. The text argument is marked up as the name of a Tcl command. The text may have other markup already applied to it. Main uses are the highlighting of commands in free-form text, and for the command parameters of the markup commands call and usage. Periodt.
cmd_def command
Text structure, list element, command list. Automatically closes the previous list element. The argument specifies the name of the Tcl command to be described by the list element. Expected to be marked up in the output as if it had been formatted with cmd. So it's like cmd but for list definitions.
comment plaintext
Text markup. The plaintext argument is marked up as a comment standing outside of the actual text of the document. Main use is in free-form text. It's like a little side note that doesn't interrupt the main character energy of the document.
const text
Text markup. The argument is marked up as a constant value. The text may have other markup already applied to it. Main use is the highlighting of constants in free-form text. Slay.
copyright text
Document information. Anywhere. The command registers the plain text argument as a copyright assignment for the manpage. When invoked more than once the assignments are accumulated. So you can stack those copyrights, no cap.
def text
Text structure, list element, definition list. Automatically closes the previous list element. The text argument is the term defined by the new list element. Text markup can be applied to it. So you can get fancy with it.
description
Document structure. This command separates the header from the document body. Implicitly starts a section named DESCRIPTION (see command section). So it's the vibe shift from intro to main content.
enum
Text structure, list element, enumerated list. Automatically closes the previous list element. It's giving numbered list energy.
emph text
Text markup. The text argument is marked up as emphasized. Main use is for general highlighting of pieces of free-form text without attaching special meaning to the pieces. It's just emphasis for the sake of emphasis, you know?
example text
Text structure, text markup. This command marks its argument up as an example. Main use is the simple embedding of examples in free-form text. It should be used if the example does not need special markup of its own. Otherwise, use a sequence of example_begin ... example_end. So pick your fighter.
example_begin
Text structure. This command starts an example. All text until the next example_end belongs to the example. Line breaks, spaces, and tabs have to be preserved literally. Examples cannot be nested. No nesting, bestie β it's not that kind of party.
example_end
Text structure. This command closes the example started by the last example_begin. Simple as that.
file text
Text markup. The argument is marked up as a file or directory, i.e. in general a path. The text may have other markup already applied to it. Main use is the highlighting of paths in free-form text. So your paths can pop off.
fun text
Text markup. The argument is marked up as the name of a function. The text may have other markup already applied to it. Main use is the highlighting of function names in free-form text. Function names deserve to shine too. β¨
image name ?label?
Text markup. The argument is the symbolic name of an image and replaced with the image itself, if a suitable variant is found by the backend. The second argument, should it be present, will be interpreted as the human-readable description of the image, and put into the output in a suitable position, if such is supported by the format. The HTML format, for example, can place it into the alt attribute of image references. So alt text but make it doctools.
include filename
Templating. The contents of the named file are interpreted as text written in the doctools markup and processed in the place of the include command. The markup in the file has to be self-contained. It is not possible for a markup command to cross the file boundaries. So no cross-file shenanigans, bestie.
item
Text structure, list element, itemized list. Automatically closes the previous list element. It's the canonical glow-up for itemized list items.
keywords args
Document information. Anywhere. This command registers all its plain text arguments as keywords applying to this document. Each argument is a single keyword. If this command is used multiple times all the arguments accumulate. Keyword stacking, iconic.
lb
Text. The command is replaced with a left bracket. Use in free-form text. Required to avoid interpretation of a left bracket as the start of a markup command. So protect those brackets, bestie.
list_begin what
Text structure. This command starts a list. The exact nature of the list is determined by the argument what of the command. This further determines which commands have to be used to start the list elements. Lists can be nested, i.e. it is allowed to start a new list within a list element.
The allowed types (and their associated item commands) are:
argumentsβarg_def.commandsβcmd_def.definitionsβdefandcall.enumeratedβenumitemizedβitemoptionsβopt_deftkoptionsβtkoption_def
Additionally the following names are recognized as shortcuts for some of the regular types:
argsβ Short forarguments.cmdsβ Short forcommands.enumβ Short forenumerated.itemβ Short foritemized.optsβ Short foroptions.
At last the following names are still recognized for backward compatibility, but are otherwise considered to be deprecated.
argβ Deprecated. Seearguments.bulletβ Deprecated. Seeitemized.cmdβ Deprecated. Seecommands.optβ Deprecated. Seeoptions.tkoptionβ Deprecated. Seetkoptions.
list_end
Text structure. This command closes the list opened by the last list_begin command coming before it. So it's the closing bracket energy for your lists.
lst_item text
Deprecated, bestie. Text structure, list element, definition list. See def for the canonical command to open a general list item in a definition list. This one's legacy.
manpage_begin command section version
Document structure. The command to start a manpage. The arguments are the name of the command described by the manpage, the section of the manpages this manpage resides in, and the version of the module containing the command. All arguments have to be plain text, without markup. So keep it plain, no fancy formatting.
manpage_end
Document structure. Command to end a manpage/document. Anything in the document coming after this command is in error. So like, nothing after it, periodt.
method text
Text markup. The text argument is marked up as the name of an object method, i.e. subcommand of a Tcl command. The text may have other markup already applied to it. Main uses are the highlighting of method names in free-form text, and for the command parameters of the markup commands call and usage. Method names are main characters too. π
moddesctext β π Document information, header-coded. Registers the plain text argument as a short description of the module the manpage lives in. Boom, done.namespacetext β Text markup. Marks text up as a namespace name. The text may already have other markup applied to it. Main use? Highlighting namespace names in free-form text. β¨nlβ β οΈ Deprecated. Text structure. Go look atparainstead, that's the canonical command for inserting paragraph breaks into the text.opttext β Text markup. Marks text up as optional. It can already carry other markup. Main use is highlighting optional arguments β see the commandargfor that whole situation. πopt_defname ?arg? β Text structure. List element. Option list. Auto-closes the previous list element, queen behavior. Specifies name and arguments of the option described by the list element. It's expected that the name is marked up usingoption.optiontext β Text markup. Marks the argument up as an option. Other markup may already be on it. Main use is highlighting options (aka command-switches) either in free-form text or in the arguments of thecallandusagecommands.packagetext β Text markup. Marks the argument up as the name of a package. Other markup may already be applied. Main use is highlighting package names in free-form text. πparaβ Text structure. Breaks free-form text into paragraphs. Each command closes the paragraph before it and starts a fresh one for the text that follows. Higher-level forms of structure aresectionandsubsection.rbβ Text. Gets replaced with a right bracket. Use it in free-form text. Required, no cap, so that a right bracket doesn't get interpreted as the end of a markup command. πrequirepackage ?version...? β Document information. Header. Registers its argument package as the name of a package or application required by the described package or application. You can drop a whole set of required *version*s in there too. This argument can be marked up β the usual markup isopt.sectionname β Text structure. Starts a new named document section. The argument has to be plain text. It implicitly closes the last paragraph before it and implicitly opens the first paragraph of the new section. Implicit slay. β¨sectrefid ?text? β Text markup. Formats a reference to the section identified by id. If no text is specified, the title of the referenced section is used in the output; otherwise text is used.sectref-externaltext β Text markup. Likesectref, except the section is assumed to be in a different document, so it doesn't need to be identified and no existence checks are made. Only the text to format is needed.see_alsoargs β Document information, usable anywhere. Defines direct cross-references to other documents. Each argument is a plain text label identifying the referenced document. If you use this command multiple times, all the arguments accumulate. πstrongtext β β οΈ Deprecated. Text markup. Seeemphfor the canonical command to emphasize text.subsectionname β Text structure. Starts a new named subsection of a section. The argument has to be plain text. Implicitly closes the last paragraph before it and implicitly opens the first paragraph of the new subsection.syscmdtext β Text markup. Marks text up as the name of an external command. Other markup may already be applied. Main use is highlighting external commands in free-form text. π₯termtext β Text markup. Marks the argument up as unspecific terminology. It can already carry other markup. Main use is highlighting important terms and concepts in free-form text. πtitledescdesc β Document information. Header. Optional. Registers the plain text argument as the title of the manpage. Defaults to the value registered bymoddesc.tkoption_defname dbname dbclass β Text structure. List element. Widget option list. Auto-closes the previous list element. Specifies the name of the option as used in scripts, the dbname used by the option database, and its dbclass, i.e. its type. It's expected that the name is marked up usingoption.typetext β Text markup. Marks text up as the name of a data type. Other markup may already be applied. Main use is highlighting data types in free-form text. π¦uritext ?text? β Text markup. Marks the argument up as a uri (i.e. a uniform resource identifier). Other markup may already be applied. Main use is highlighting uris in free-form text. The second argument, should it be present, gets interpreted as the human-readable description of the uri β in other words, its label. Without an explicit label, the uri is its own label.usageargs β Text markup. Seecallfor the full description; this command is syntactically identical, and it's identical in what it expects for the markup of its arguments too. In contrast tocall, though, it is not allowed to generate output where this command occurs in the text. The command is silent. The formatted text may only appear in a different section of the output β for example a table of contents, or a synopsis β depending on the output format.vartext β Text markup. Marks text up as the name of a variable. Other markup may already be applied. Main use is highlighting variables in free-form text.vsetvarname value β Templating. In this form the command sets the named document variable to the specified value. It generates no output β the command gets replaced by the empty string.vsetvarname β Templating. In this form the command is replaced by the value of the named document variable.widgettext β Text markup. Marks text up as the name of a widget. Other markup may already be applied. Main use is highlighting widget names in free-form text. π§
π«Ά BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Like, obviously. Please report such in the category doctools of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist](http://core.tcl.tk/tcllib/reportlist). Also please report any ideas for enhancements you may have for either the package and/or the documentation. We want them fr fr. π
When proposing code changes, please provide unified diffs, i.e. the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. π
π SEE ALSO
doctools_intro, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax
π KEYWORDS
doctools commands, doctools language, doctools markup, markup, semantic markup
π CATEGORY
Documentation tools
Β©οΈ COPYRIGHT
Copyright (c) 2007-2010 Andreas Kupries <andreas_kupries@users.sourceforge.net>
okay bestie that's the whole page, you made it, I'm so proud of you π This one is from tcllib, version 1.0, dated the way doctools_lang_cmdref(n) always is β go off and mark up something iconic, mwah π
β¨
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2007-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms