From 18fe9a097cf390561795bd8e4a039d3e069f510b Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 13 Mar 2006 15:15:36 +0000 Subject: [PATCH] Provide support for adjusting default indent. Problem:: By default, man pages are output with a indent of 8 characters. That's a lot of wasted space that might better be used -- especially in cases where the content verbatim stuff that has long lines. Change:: Added support for customizing the roff "default indentation value" (value of IN register) man.indentation.default.adjust (boolean) and man.indentation.default.value params (number, 3n by default). Also made some adjustments to get better formatting of sub-subsection titles even without adjusting default indentation. --- xsl/manpages/docbook.xsl | 6 ++- xsl/manpages/lists.xsl | 3 -- xsl/manpages/other.xsl | 13 +++++- xsl/manpages/refentry.xsl | 92 ++++++++++++++++++++++++++++++++++++--- 4 files changed, 102 insertions(+), 12 deletions(-) diff --git a/xsl/manpages/docbook.xsl b/xsl/manpages/docbook.xsl index d2aa817f7..da8889bc6 100644 --- a/xsl/manpages/docbook.xsl +++ b/xsl/manpages/docbook.xsl @@ -39,6 +39,9 @@ 0 MANIFEST.man + 0 + 1 + 3n @@ -158,7 +161,8 @@ - + + diff --git a/xsl/manpages/lists.xsl b/xsl/manpages/lists.xsl index 28bfd2ae9..e58e47bd4 100644 --- a/xsl/manpages/lists.xsl +++ b/xsl/manpages/lists.xsl @@ -11,9 +11,6 @@ copyright and other information. ******************************************************************** --> - -0 - diff --git a/xsl/manpages/other.xsl b/xsl/manpages/other.xsl index 08f5a5657..a83d540b0 100644 --- a/xsl/manpages/other.xsl +++ b/xsl/manpages/other.xsl @@ -196,7 +196,8 @@ - + + @@ -211,6 +212,16 @@ (adjust text to left margin only) .ad l + + .\" store initial "default indentation value" + .nr zq \n(IN + .\" adjust default indentation + .nr IN + + + .\" adjust indentation of SS headings + .nr SN \n(IN + diff --git a/xsl/manpages/refentry.xsl b/xsl/manpages/refentry.xsl index 53e0e6b02..a9dbde6bb 100644 --- a/xsl/manpages/refentry.xsl +++ b/xsl/manpages/refentry.xsl @@ -81,21 +81,99 @@ + + + .SS " - + " - + + + + + .RS + + .RE + + + + + + + + + + + + + .\" end of SS subsection " + + " - + + + + + + + + + + .RS + + .RE + + + + + + + + + + .ti (\n(SNu * 5u / 3u) + + + + + .\" end of subsection " + + " + + + + + + + + + + + + + + + (\n(SNu) + + - .RS 3 + .RS (\n(SNu) .RE + .\" end of subsection " + + " -- 2.40.0