GNU TeXmacsUser manualReferenceAboutEnglishยทDeutsch
Operations on text
<length|expr>
(length of a string)

If expr is a string, the length of the string is returned. For instance, <length|Hello> evaluates to 5.

<range|expr|start|end>
(extract a substring)

Return the substring of expr starting at position start and ending at position end (not included). For instance, <range|hottentottententententoonstelling|9|15> evaluates to tenten.

<merge|expr-1|\(\cdots\)|expr-n>
(concatenate strings)

This primitive may be used to concatenate several strings expr-1 until expr-n. For instance, <merge|Hello|World> produces HelloWorld. Inline content (a concat) is converted to a string before being concatenated. The merge primitive may also be used for concatenating tuples, or the bodies of two macros with the same arguments.

<number|number|render-as>
(alternative rendering of numbers)

Renders a number in a specified way. Supported values for render-as are

roman

Lower case Roman: <number|18|roman> \(\longrightarrow\) xviii.

Roman

Upper case Roman: <number|18|Roman> \(\longrightarrow\) XVIII.

alpha

Lower case letters: <number|18|alpha> \(\longrightarrow\) r.

Alpha

Upper case letters: <number|18|Alpha> \(\longrightarrow\) R.

arabic

Arabic numbers: <number|18|arabic> \(\longrightarrow\) 18.

fnsymbol

Footnotes symbols: <number|2|fnsymbol> \(\longrightarrow\) \({\dagger}\).

<date>

<date|format>

<date|format|language>
(obtain the current date)

Returns the current date in a specified format (which defaults to a standard language-specific format when empty) and a specified language (which defaults to the current language). The format is similar to the one used by the Unix date command. For instance, <date> evaluates to “November 29, 2026”, <date||french> to “29 novembre 2026” and <date|%d %B om %k:%M|dutch> to “29 november om 2:57”.

<translate|what|from|into>
(translation of strings)

Returns the translation of a string what of the language from into the language into, using the built-in TeXmacs dictionaries. The languages should be specified in lowercase letters. For instance, <translate|File|english|french> yields “Fichier”.

The list of currently available languages can be checked in the Document\(\rightarrow\)Language menu. The built-in TeXmacs dictionaries can be found in

$TEXMACS_PATH/langs/natural/dic

When attempting to use a non-existing dictionary, the program may quit. For most purposes, it is more convenient to use the localize macro, which converts a string from English into the current language.

<change-case|content|mode>
(change the case of letters)

Change the case of the letters in content, while preserving its markup. The evaluated mode may be UPCASE (convert all letters to upper case), locase (convert all letters to lower case), Upcase (capitalize the first letter) or first (only keep the first character of a string). For instance, <change-case|hello|UPCASE> yields HELLO.

<find-file|dir-1|\(\cdots\)|dir-n|file>

<find-file-upwards|file|stop-1|\(\cdots\)|stop-n>
(search files)

The find-file primitive searches the file in the directories dir-1 until dir-n and then in the directory of the current document. The find-file-upwards primitive searches the file in the directory of the current document (including its subdirectories) and then in its ancestors; the search goes upwards until a directory whose name is one of stop-1 until stop-n has been searched, and it fails if there is no such ancestor. Both primitives return the name of the file found, relative to the current document when possible, or false if the file could not be found.

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".