From c5696be8bfde10ab214feb13f84846afc8a7b149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 10 Jun 2022 23:43:06 +0200 Subject: Add README. --- README.x | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 README.x (limited to 'README.x') diff --git a/README.x b/README.x new file mode 100644 index 0000000..ea6bfc0 --- /dev/null +++ b/README.x @@ -0,0 +1,62 @@ + + + + + + + +\\fI\\$*\\fR<.> +\\f(BI\\$*\\fB<.> +\\f(CW\\$*\\fR<.> +\\f(CB\\$*\\fR<.> + + +, an alternative troff syntax +John Ankarström + + + +Introduction + is an alternative syntax for troff, visually inspired by SGML/XML. It differs from troff's default syntax in the following ways: + +Xroff requests begin with a less-than sign and end with a greater-than sign, e.g., >. These symbols may be escaped with a backslash.* +Xroff requests may be used inline. The following works as expected: bold\)">.** +Xroff ignores empty lines. +Default troff syntax may be used between and >. + +The similarities with XML end at the visual level. Unlike XML, xroff is unstructured and imperative. There is no concept of closing tags. + +For comparison, default troff requests begin with a newline and a control character, usually a period or an apostrophe, and end with another newline. + +Before an inline request, automatically inserts a escape when appropriate. + + +Example +\\fB\\$*\\fR<.> + +Example document +John Doe + +Pellentesque dapibus suscipit ligula. Donec posuere augue in quam. +Etiam vel tortor sodales tellus ultricies commodo. Suspendisse +potenti. Aenean in sem ac leo mollis blandit. Donec neque quam, +dignissim in, mollis nec, sagittis eu, wisi. + +Introduction + vel est convallis dignissim. Fusce suscipit, +wisi nec facilisis facilisis, est dui fermentum leo, quis tempor +ligula erat quis odio. Nunc porta vulputate tellus. +]> + + + +The program translates xroff source to troff source. + + + +For Emacs users, there is a major mode named that provides syntax highlighting for xroff source. To further improve the writing experience, I also recommend . + + +Caveats +Xroff does not treat indented lines specially. As such, indentation cannot be used to convey structure. -- cgit v1.2.3