Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Z shell introductory guide source
- X-seq: zsh-workers 53130
- From: "Jun. T" <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Z shell introductory guide source
- Date: Thu, 26 Sep 2024 20:06:41 +0900
- Archived-at: <https://zsh.org/workers/53130>
- In-reply-to: <CAH+w=7bb8V3kXNgyDk=Q+6zUC0eX1wYDXOC5RCzcRv3iCRxZbw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <6ca866e8-6ceb-4498-8cc0-aae56abbf596@zentaur.org> <CAH+w=7YqspdA6G6YNe7fcgQnRsqf4GReao-QrpXSYjygfqoAKg@mail.gmail.com> <fc938a38-91c7-46b7-b39e-60ef12b514c9@zentaur.org> <57613-1727030452.840509@-_pT.2mdf.TxLG> <CAH+w=7bb8V3kXNgyDk=Q+6zUC0eX1wYDXOC5RCzcRv3iCRxZbw@mail.gmail.com>
> 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