aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/sciteco.tmac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-26 02:02:50 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-18 07:05:52 +0100
commite7867fb0d9979c550e6e3d7597ece73b680c4af6 (patch)
treedc7a273abc5dd75ecdd94bc62419cd966f38b6d0 /doc/sciteco.tmac
parentc0fe49457d37e4c51cd4fd829895a60ae24bc8af (diff)
downloadsciteco-e7867fb0d9979c550e6e3d7597ece73b680c4af6.tar.gz
implemented self-documenting (online) help system
* the new "?" (help) command can be used to look up help topics. * help topics are index from $SCITECOPATH/women/*.woman.tec files. * looking up a help topic opens the corresponding "womanpage" and jumps to the position of the topic (it acts like an anchor into the document). * styling is performed by *.woman.tec files. * Setting up the Scintilla view and munging the *.tec file is performed by the new "woman.tes" lexer. On supporting UIs (Gtk), womanpages are shown in a variable-width font. * Woman pages are usually not hand-written, but generated from manpages. A special Groff post-processor grosciteco has been introduced for this purpose. It is much like grotty, but can output SciTECO macros for styling the document (ie. the *.woman.tec files). It is documented in its own man-page. * grosciteco also introduces sciteco.tmac - special Troff macros for controlling the formatting of the document in SciTECO. It also defines .SCITECO_TOPIC which can be used to mark up help topics/terms in Troff markup. * Woman pages are generated/formatted by grosciteco at compile-time, so they will work on platforms without Groff (ie. as on windows). * Groff has been added as a hard compile-time requirement. * The sciteco(1) and sciteco(7) man pages have been augmented with help topic anchors.
Diffstat (limited to 'doc/sciteco.tmac')
-rw-r--r--doc/sciteco.tmac65
1 files changed, 65 insertions, 0 deletions
diff --git a/doc/sciteco.tmac b/doc/sciteco.tmac
new file mode 100644
index 0000000..7613c6e
--- /dev/null
+++ b/doc/sciteco.tmac
@@ -0,0 +1,65 @@
+.\" sciteco.tmac
+.\"
+.\" grosciteco is similar to grotty, so we can
+.\" inherit its definitions:
+.nroff
+.do mso tty.tmac
+.
+.\"
+.\" Define topics at the current document position.
+.\" This is handled by grosciteco to create a topic index
+.\" at the top of the file which is in turn read by SciTECO
+.\" to build a global help topic index.
+.\"
+.\" NOTE: We let Troff handle the argument processing, since
+.\" parsing them in SciTECO would be tricky.
+.\"
+.de SCITECO_TOPIC
+. while \\n(.$ \{\
+. device sciteco_topic:\\$1
+. shift 1
+. \}
+..
+.
+.
+.\"
+.\" grosciteco does not handle font families right now
+.\" and probably will never do because of the limited
+.\" number of Scintilla styles available.
+.\" But even if we did, we sometimes have to enforce
+.\" a fixed-width font for drawings and tables, since
+.\" they can only be "typeset" with glyphs by Scintilla.
+.\"
+.de SCITECO_TT
+. if \\n(.$ .ll \\$*
+. device sciteco_tt
+..
+.
+.de SCITECO_TT_END
+. if '\\$1'SP' .sp
+. device sciteco_tt_end
+. ll 65535n
+..
+.
+.\"
+.\" Effectively disable paragraph filling in man pages.
+.\" Word wrapping will be performed by Scintilla.
+.\"
+.ll 65535n
+.nr LT 90n
+.
+.\"
+.\" remove hyphenation
+.\"
+.nh
+.nr HY 0
+.
+.de hy
+..
+.de nh
+..
+.
+.\" avoid line breaks after hyphen-like characters.
+.cflags 0 -\[hy]\[em]\[en]
+.
+.\" end of file, make sure this is the last line \ No newline at end of file