about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2024-11-12 12:34:39 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2024-11-12 12:34:39 +0900
commit6973a9ea843b1504e4c39ed560ee6e99d829ee8f (patch)
treef53a3d22be37f8fcd13635ee93e8c90a54f20129
parent393cb298aaa849bae62e7294fecb1b60d0dd3910 (diff)
downloadzsh-6973a9ea843b1504e4c39ed560ee6e99d829ee8f.tar.gz
zsh-6973a9ea843b1504e4c39ed560ee6e99d829ee8f.tar.xz
zsh-6973a9ea843b1504e4c39ed560ee6e99d829ee8f.zip
53137 + 53213: support creating intro.html
-rw-r--r--ChangeLog5
-rw-r--r--Doc/Makefile.in13
-rw-r--r--Doc/intro.ms40
3 files changed, 50 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index bdb60cf33..22ee71a4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-11-12  Jun-ichi Takimoto  <takimoto-j@kba.biglobe.ne.jp>
+
+	* 53137 + 53213: Doc/Makefile.in, Doc/intro.ms, allow creating
+	intro.html
+
 2024-11-11  Eric Cook  <llua@gmx.com>
 
 	* 53144: Completion/Unix/Command/_sysctl:
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index fa2a336ad..a986aa1c5 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -121,9 +121,16 @@ zsh.pdf zsh_a4.pdf zsh_us.pdf: $(sdir)/zsh.texi
 intro.pdf intro.a4.pdf intro.us.pdf: $(sdir)/intro.ms
 	if test $@ = intro.us.pdf || \
 	  { test $@ = intro.pdf && test "$(PAPERSIZE)" = us; }; then \
-	  pdfroff -ms -P-pletter $(sdir)/intro.ms > $@; \
+	  pdfroff -mspdf --no-kill-null-pages -P-pletter --pdf-output=$@ $<; \
 	else \
-	  pdfroff -ms -P-pa4 $(sdir)/intro.ms > $@; \
+	  pdfroff -mspdf --no-kill-null-pages -P-pa4 --pdf-output=$@ $<; \
+	fi
+
+intro.html: $(sdir)/intro.ms
+	if groff -ms -Thtml -P-jintro $< > tmp.html; then \
+	  mv tmp.html $@; \
+	else \
+	  rm -f tmp.html; false; \
 	fi
 
 texi: $(sdir)/zsh.texi
@@ -170,7 +177,7 @@ a4_ps: zsh_a4.ps
 zsh_a4.ps: zsh_a4.dvi
 	$(DVIPS) -t a4 -o $@ zsh_a4.dvi
 
-html: zsh_toc.html
+html: zsh_toc.html intro.html
 .PHONY: html
 
 zsh_toc.html: $(sdir)/zsh.texi texi2html.conf
diff --git a/Doc/intro.ms b/Doc/intro.ms
index 4dd08f601..49f6cc07f 100644
--- a/Doc/intro.ms
+++ b/Doc/intro.ms
@@ -3,8 +3,32 @@
 .if \n(.g \{\
 .if "\*(.T"ascii" .ftr C R
 .if "\*(.T"latin1" .ftr C R
+.if "\*(.T"html" .nr HTML 1
 .nr De \n[.ss]
 .\}
+.\" ----- macro defintions -----
+.\" Ds/De: start/end of example
+.\" Sh: section header
+.\" XXX: It seems we can't use the same definition for both pdf and html
+.\"      (at least with groff-12.3.0).
+.\"
+.\" for HTML output
+.ie \n[HTML] \{\
+.de Ds
+.DS I .5i
+.ft C
+..
+.de De
+.DE
+.ft R
+..
+.de Sh
+.NH
+\\$1
+..
+.\}
+.\" for other output (such as PDF)
+.el \{\
 .de Ds
 .DS I .5i
 .ft C
@@ -21,12 +45,13 @@
 .el .ss
 ..
 .de Sh
-.SH
-\\$1
-.XS
-\\$1
-.XE
+.NH
+.XN \\$1
 ..
+.\}
+.\"
+.\" ----- Cover page -----
+.if !\n[HTML] \{\
 .nr HM 4i
 .ce 99
 .ps 18
@@ -50,6 +75,9 @@ bas@phys.uva.nl\fP
 .sv |1i
 .pn 1
 .bp
+.\}
+.\"
+.\" ----- main text -----
 .TL
 An Introduction to the Z Shell
 .AU
@@ -2712,6 +2740,7 @@ I (Bas de Bakker) would be happy to receive mail if anyone has any
 tricks or ideas to add to this document, or if there are some points
 that could be made clearer or covered more thoroughly.  Please notify
 me of any errors in this document.
+.if !\n[HTML] \{\
 .if o \{\
 .bp
 .sv 1i
@@ -2719,3 +2748,4 @@ me of any errors in this document.
 .pn 1
 .bp
 .PX
+.\}