aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/sciteco.tmac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-01 23:13:10 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-02 11:59:05 +0300
commitcb1ef4788be0117f57497299ba008652f62cba24 (patch)
treecbfd1ad93c12a7d4c1ba1041a50e1d62e6447837 /doc/sciteco.tmac
parentd734f9904bbe0ba33dd86083e44d89cf2da3cbb2 (diff)
downloadsciteco-cb1ef4788be0117f57497299ba008652f62cba24.tar.gz
grosciteco: folding in woman pages
* Support fold level configuration using `.SCITECO_FOLDLEVEL`. This sets the current output line as the fold header and all subsequent lines with the given fold level (until another `.SCITECO_FOLDLEVEL` instruction is encountered). * This is now done automatically for man's SH and SS macros, so the man-page based woman pages provide folding. * The folding margin is therefore now always enabled in fallback.teco_ini.
Diffstat (limited to 'doc/sciteco.tmac')
-rw-r--r--doc/sciteco.tmac23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/sciteco.tmac b/doc/sciteco.tmac
index 026e489..8e53407 100644
--- a/doc/sciteco.tmac
+++ b/doc/sciteco.tmac
@@ -66,6 +66,29 @@
. device sciteco_setstyling:\\$1
..
.
+.\" Set the fold level of the current line __and__ all following lines.
+.\" This could be called at the beginning of chapters and sections.
+.de SCITECO_FOLDLEVEL
+. device sciteco_foldlevel:\\$1
+..
+.
+.\" man-page specific extensions.
+.\" FIXME: Is there a reliable way to detect the man-page macros?
+.if dan \{\
+. rn SH SH-orig
+. de SH
+. SH-orig
+. SCITECO_FOLDLEVEL 1
+. nop \\$*
+. .
+. rn SS SS-orig
+. de SS
+. SS-orig
+. SCITECO_FOLDLEVEL 2
+. nop \\$*
+. .
+.\}
+.
.\"
.\" Effectively disable paragraph filling in man pages.
.\" Word wrapping will be performed by Scintilla.