Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Z shell introductory guide source



> 2024/09/23 3:47, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> 
> In particular some
> of the macro definitions don't appear to work correctly, e.g. this:
> 
> .de Sh
> .SH
> \\$1
> .XS
> \\$1
> .XE
> ..
> 
> produces many ".XS without .XE" errors during processing.

I think .XS/.XE is for creating the table of contents. But it seems
the current version of groff has an ability to create the TOC
automatically.

If ".XS ... .XE" is removed then

groff -ms -Thtml intro.ms > intro.html

produces a "readable" html, but the font size in the text changes
after examples. So I also removed the '.ps' in .Ds and .De macros
(there may be better solutions, I guess).

In the patch below I also removed the front page. I hope this may
help to get better html.

If we want separate html files for each section:

groff -ms -Thtml -P-jxxx intro.ms > intro.html

this will produce intro.html and xxx-1.html xxx-2.html ...

# the patch is just for producing html, not for intro.pdf.

diff --git a/Doc/intro.ms b/Doc/intro.ms
index 4dd08f601..8d77613b3 100644
--- a/Doc/intro.ms
+++ b/Doc/intro.ms
@@ -8,14 +8,12 @@
 .de Ds
 .DS I .5i
 .ft C
-.ps 9
 .vs 11
 .ss 11
 ..
 .de De
 .DE
 .ft R
-.ps
 .vs
 .ie \n(.g .ss \n(De
 .el .ss
@@ -23,33 +21,7 @@
 .de Sh
 .SH
 \\$1
-.XS
-\\$1
-.XE
 ..
-.nr HM 4i
-.ce 99
-.ps 18
-.vs 20
-.ss 20
-\f3An Introduction to the Z Shell\fP
-
-.ps 14
-.vs 16
-.ss 16
-\f2Paul Falstad
-pf@xxxxxxxxxxxx
-
-Bas de Bakker
-bas@xxxxxxxxxxx\fP
-.ce 0
-.nr HM 1i
-.pn 1
-.bp
-.\" This blank page on the reverse of the cover.
-.sv |1i
-.pn 1
-.bp
 .TL
 An Introduction to the Z Shell
 .AU
@@ -2716,6 +2688,3 @@ me of any errors in this document.
 .bp
 .sv 1i
 .\}
-.pn 1
-.bp
-.PX







Messages sorted by: Reverse Date, Date, Thread, Author