Setext Explained
Setext (Structure Enhanced Text)[1] 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 1991 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 multiple documents could be included in a single stream, separated by a special <end>
tag serving as a document delimiter. After several months, it was clarified[2] 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.[3] [4]
setext tag usage and examples! scope="col" Name | setext pattern | Example | Comments |
---|
title-tt | Title <nowiki>===== </nowiki> | This is a long title
| A distinct title identified by the text, maximum one per setext. Must start at the beginning of the line.
|
---|
subhead-tt | Subhead <nowiki>-------</nowiki> | Subheading One-------------- | A distinct subheading identified by the text, zero or more per text.Must start at beginning of line. See note in title-tt about handling.|-! indent-tt| 66-char lines indented by 2 spaces| class="nowrap" | First paragraph... ...more of paragraph.[blank line] Next paragraph...| Lines undented and unfolded (longer lines are generally tolerated by most parsers).
This is primary body text, generally plain undented in emails, etc. currently.|-! bold-tt| class="nowrap" | **[multi{{nbsp}}]word** | This is **very important**... | One or more bold words, generally *word* or **word** in emails|-! italic-tt| class="nowrap" | ~word~ | This is an ~italic~ word.| A single, italicized word; multi-word form was not officially specified due to "visual-clarity reasons"
Multi-word form of ~first~second~third~ supported by setext2latex.[5] |-! class="nowrap" |underline-tt| class="nowrap" | [_multi{{nbsp}}]word_ [_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.
One or more underlined words|-! hot-tt| class="nowrap" | [multi_]word_ | This is a hot_word_. | Used to mark notes and URLs|-! include-tt| class="nowrap" | >[space] [text] | > This is quoted text...> ...more... | Displayed in a user selected style, preferably monospaced with the leading ">"|-! bullet-tt| class="nowrap" | *[space] [text]| * Item 1 that is... ...really long * Item 2 | Displayed in bullet or list format.|-! href-tt| class="nowrap" | ^.. _hot_word{{nbsp}}URL | ^.. _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.|}
Standalone Setext files
By default all properly setext-ized files will have an ".etx" or ".ETX" suffix. This stands for an "emailable/enhanced text".
See also
Other lightweight markup languages (inspired by Setext):
References
References
External links
Implementations
]
|
---|
Notes and References
- Web site: Engst. Adam C.. comp.sys.mac.announce / TidBITS file server available. UseNet. 21 December 2015.
- Web site: 1992-03-09 . Administrivia . 2022-07-01 . TidBITS . en.
- Web site: Oliver . Erik . Setext command reference . 2022-07-01 . Erik Oliver's Home Page . live . https://web.archive.org/web/20220816203127/http://valdemar.net/~erik/site-features/setext/ . 2022-08-16 .
- Web site: Feldman . Ian . 1992-08-16 . What is setext . https://web.archive.org/web/20010430053834/http://www.bsdi.com/setext/setext_concepts_Aug92.etx . 2001-04-30 . bsdi.org.
- Web site: Setext2LaTeX . freecode.com . 16 August 2022 . https://web.archive.org/web/20140626075732/http://freecode.com/projects/setex2latex . 26 June 2014 . en.
Web site: Setext2LaTeX – setext -> LaTeX converter . Erik Oliver's Home Page . Oliver . Erik . 2007 . 16 August 2022 . live . https://web.archive.org/web/20140626075744/http://valdemar.net/~erik/setext/setext2latex.txt . 26 June 2014 . en.