Setext

Lightweight markup language for text documents


title: "Setext" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["lightweight-markup-languages"] description: "Lightweight markup language for text documents" topic_path: "linguistics" source: "https://en.wikipedia.org/wiki/Setext" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Lightweight markup language for text documents ::

::data[format=table title="Infobox file format"]

FieldValue
nameSetext
extension.etx
ownerIan Feldman
released
latest release date
genreLightweight markup language
::

| name = Setext | logo = | icon = | iconcaption = | screenshot = | caption = | extension = .etx | mime = | type code = | uniform type = | conforms to = | magic = | owner = Ian Feldman | released = | latest release version = | latest release date = | genre = Lightweight markup language | container for = | contained by = | extended from = | extended to = | standard = | free = | url = Setext (Structure Enhanced Text) is a lightweight markup language used to format plain text documents such as e-newsletters, Usenet postings, and e-mails. In contrast to some other markup languages (such as HTML), the markup is easily readable without any parsing or special software.

Setext was first introduced in 1992 by Ian Feldman for use in the TidBITS electronic newsletter.

Purpose

Setext allows viewing of marked-up documents without special viewing software. When appropriate software is used, however, a rich text-style experience is available to the user.

Smaller documents are trivial to create in any text editor.

To prevent errors, most large setext publications are created using a markup language such as HTML or SGML and then converted. The setext document can then be distributed without the need for the recipient to use a HTML email or web viewer.

Multiple ''setext'' documents in the same file

Multiple setext documents can be stored in the same file, similarly to how the mbox format can store multiple e-mail messages together.

It was initially announced that this tag was not an official part of setext, and that multiple documents should instead be delimited by $$ appearing at the end of a line of text.

Regardless of the number of documents stored in the same file, basic metadata can be stored about any or all of them by using the subject-tt tag syntax.

Setext tags

The following are the ten most common of the 16 different setext tags.

::data[format=table title="style="text-align: center;" | ''setext'' tag usage and examples{{efn | name="table_notes" |''(For a document to be valid setext, the only required tag is either 'subhead-tt' or 'title-tt' - all others are optional.)''}}{{efn |name=formal_def | "(A) formal definition of what makes a ''setext'':"]

Namesetext patternExampleCommentstitle-ttsubhead-ttindent-ttbold-ttitalic-ttunderline-tthot-ttinclude-ttbullet-ttquote-tthref-ttnote-tttwobuck-ttsuppress-tttwodot-ttsubject-tt
TitleThis is a long titleA distinct title identified by the text, maximum one per setext.
SubheadSubheading OneA distinct subheading identified by the text, zero or more per text.
66-char lines indented by 2 spacesLines undented and unfolded (longer lines are generally tolerated by most parsers).
**[multi]word**This is very important...One or more bold words, generally *word* or **word** in emails
~word~This is an italic word.A single, italicized word; multi-word form was not officially specified due to "visual-clarity reasons"
[_multi]word_This is underlined text. This is underlined_text.Display in a (user) selected style, preferably with underlining--except in browsers where underlining corresponds to hot links.
[multi_]word_This is a hot_word_.Used to mark notes and URLs
[space] [text]Displayed in a user selected style, preferably monospaced with the leading ""
*[space] [text]Displayed in bullet or list format.
SETEXT_PATTERNEXAMPLECOMMENT
.. _hot_wordURL.. _Wikipedia_home_page https://wikipedia.org(Linked in the text with a hot-tt as Wikipedia_home_page_)
These 'link definitions' are commonly placed at the end of a paragraph/section, or at the very end of the setext document.
SETEXT_PATTERNEXAMPLECOMMENT
SETEXT_PATTERNEXAMPLECOMMENT
SETEXT_PATTERNEXAMPLECOMMENT
SETEXT_PATTERNEXAMPLECOMMENT
SETEXT_PATTERNEXAMPLECOMMENT
::

|- ! NAME | SETEXT_PATTERN | EXAMPLE | COMMENT

  • END List row template (4 columns) --

Temporary notes for use during table verification / update – July/August 2022

References:

Still missing from table above:

  • quote-tt
  • note-tt
  • twobuck-tt
  • suppress-tt
  • twodot-tt
  • subject-tt

To do:

  • Add missing 'tt's to table
  • Update table for accessibility per https://en.m.wikipedia.org/wiki/Help:Table
  • Table caption (visible) and summary (invisible, like an 'alt' tag)
  • Column and row headers must have 'scope' tags
  • 'Tooltips' using in place of column-titles?
  • Fix table cell wrapping
  • Optimize usage of 'code', 'pre', and 'syntaxhighlight' tags
  • proofread everything

never officially used

  • some implementations used '$$' to delimit between setext documents in the same file/stream

Purpose -

  • Structured text system. Human-readable in 'raw' form, but actual appearance depends on display program and any formatting options it provides

  • Setext was of particular use before web browsers were commonly available!

All tags (16 total)

+-------------------------------------------------------------+ | a text that contains at least one verified setext subhead | | or setext title | +-------------------------------------------------------------+"

subject-tt Subject: ...[From: ... & Date: ... ] - splits into e-mail style header fields or LaTeX title page ' \title, \author, and \date '

  • In effect, metadata for multi-document setext streams title-tt "Title subhead-tt "Subhead——-" Only required element for valid setext (or 'title-tt") https://web.archive.org/web/20010430054401/http://www.bsdi.com/setext/typotags.txt indent-tt 66-char lines indented by 2 spaces (regular body text) bold-tt [multi]word italic-tt word underline-tt [multi]word hot-tt [multi]word_ Hyperlinks or LaTeX references (is 'hot_word_' literal, like 'http' or can it be 'any_terms_'? Is it, for example, "Website_name_"??) include-tt [space] [text] quoted text bullet-tt [space] [text] bulleted list item quote-tt [typo tags from (a)-(p)] like or tags href-tt ^.. _hot_word URL note-tt ^.. _hot_word Note:("") Hyperlink notes (Footnotes? Pullquotes/sidebars?) twobuck-tt $$[at end of line] supress-tt ^..[space] [not dot] Invisible (i.e. like an HTML comment) twodot-tt ^.. End of file

Editor note: for any wikilinks that should not be automatically bolded, use ; for example:

--

Standalone Setext files

By default all properly setext-ized files will have an ".etx" or ".ETX" suffix. This stands for an "emailable/enhanced text".

References

Notes

References

References

  1. (1992-01-06). "TidBITS in new format".
  2. "comp.sys.mac.announce / TidBITS file server available". UseNet.
  3. (1992-03-09). "Administrivia".
  4. Sanders, Tony. (29 August 1993). "setext -> HTML converter (setext.pl)".
  5. Oliver, Erik. "Setext command reference".
  6. Feldman, Ian. (1992-08-16). "What is setext".
  7. Feldman, Ian. (1992-03-15). "setext sermon – Part 1".
  8. Feldman, Ian. (1992-03-29). "setext sermon – Part 2".
  9. Oliver, Erik. (2007). "Setext2LaTeX".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

lightweight-markup-languages