Hi all,

>>>>> Stefan Monnier <monn...@iro.umontreal.ca> writes:
>> And I like the way the manual is formatted.  Compare this:
>> https://www.gnu.org/software/auctex/manual/auctex.html
>> with this:
>> https://elpa.gnu.org/devel/doc/auctex.html

> Hmm... nice.  FWIW, the elpa rendering is the same as that of

>     https://www.gnu.org/software/emacs/manual/html_node/emacs/index.html

> not sure why https://www.gnu.org/software/auctex/manual/auctex.html is
> not as nice.

The reason must be that the traditional AUCTeX html manuals are
generated with texi2html, not makeinfo.

A while ago, I noticed that the preview-latex html manual lacks its
contents in the FAQ section[1] and am preparing to propose the attached
change to use makeinfo rather than texi2html, so that others can test
it. But it seems it's no longer necessary :-)

[1] all nodes below 
https://www.gnu.org/software/auctex/manual/preview-latex/Frequently-Asked-Questions.html

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

>From 37a225843d9995b308a36942f3d38fdfbaec9a46 Mon Sep 17 00:00:00 2001
From: Ikumi Keita <ik...@ikumi.que.jp>
Date: Thu, 18 Apr 2024 22:18:24 +0900
Subject: [PATCH] Immigrate from texi2html to makeinfo

* gendocs.sh.patch: New file. Copy from gendocspatch branch and arrange
for use with makeinfo.
* Makefile.in (www-doc): Arrange options for gendocs.sh for makeinfo.
Change URL to retrieve gendocs.sh.patch from master branch.
---
 Makefile.in      | 12 ++++-----
 gendocs.sh.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+), 6 deletions(-)
 create mode 100644 gendocs.sh.patch

diff --git a/Makefile.in b/Makefile.in
index bc2ea951..c2c8bf83 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -605,17 +605,17 @@ www-doc: check-tag
 	$(CP) auctex-$(TAG)/doc/*.texi $(WWWDIR)/manual
 	cd $(WWWDIR)/manual \
 	&& wget -O gendocs.sh 'https://cvs.savannah.gnu.org/viewvc/%2acheckout%2a/texinfo/texinfo/util/gendocs.sh' \
-	&& wget -O gendocs.sh.patch 'https://git.savannah.gnu.org/gitweb/?p=auctex.git;a=blob_plain;f=gendocs.sh.patch;hb=gendocspatch' \
+	&& wget -O gendocs.sh.patch 'https://git.savannah.gnu.org/gitweb/?p=auctex.git;a=blob_plain;f=gendocs.sh.patch;hb=master' \
 	&& patch <gendocs.sh.patch \
 	&& chmod u+x gendocs.sh \
 	&& wget -O gendocs_template 'https://cvs.savannah.gnu.org/viewvc/%2acheckout%2a/texinfo/texinfo/util/gendocs_template' \
 	&& sed -i -e 's/html_node\/index\.html/%%PACKAGE%%\/index.html/' gendocs_template \
 	&& mkdir .texinfo \
-	&& echo -e "emacs split https://www.gnu.org/software/emacs/manual/html_node/emacs/\nemacs mono https://www.gnu.org/software/emacs/manual/html_mono/emacs.html\nreftex split https://www.gnu.org/software/auctex/manual/reftex/\nreftex mono https://www.gnu.org/software/auctex/manual/reftex.html\n"; > .texinfo/htmlxref.cnf \
-	&& ./gendocs.sh --email bug-auc...@gnu.org --texi2html \
-	  --html --use-nodes auctex "AUCTeX Manual" \
-	&& ./gendocs.sh --email bug-auc...@gnu.org --texi2html \
-	  --html --use-nodes preview-latex "preview-latex Manual"
+	&& echo -e "emacs node https://www.gnu.org/software/emacs/manual/html_node/emacs/\nemacs mono https://www.gnu.org/software/emacs/manual/html_mono/emacs.html\nreftex node https://www.gnu.org/software/auctex/manual/reftex/\nreftex mono https://www.gnu.org/software/auctex/manual/reftex.html\n"; > .texinfo/htmlxref.cnf \
+	&& ./gendocs.sh --email bug-auc...@gnu.org \
+	  auctex "AUCTeX Manual" \
+	&& ./gendocs.sh --email bug-auc...@gnu.org \
+	  preview-latex "preview-latex Manual"
 
 preview-ball: check-tag
 	test ! -d $(PREVIEW_BUILD_DIR) || rm -r $(PREVIEW_BUILD_DIR)
diff --git a/gendocs.sh.patch b/gendocs.sh.patch
new file mode 100644
index 00000000..3c3967ce
--- /dev/null
+++ b/gendocs.sh.patch
@@ -0,0 +1,67 @@
+--- gendocs.sh.orig	2014-10-29 14:25:47.404620794 +0100
++++ gendocs.sh	2014-10-29 14:35:45.812600075 +0100
+@@ -320,9 +320,9 @@
+     tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html
+   )
+   eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"`
+-  rm -f "$outdir"/html_$1/*.html
+-  mkdir -p "$outdir/html_$1/"
+-  mv ${split_html_dir}/*.html "$outdir/html_$1/"
++  rm -f "$outdir"/${PACKAGE}/*.html
++  mkdir -p "$outdir/${PACKAGE}/"
++  mv ${split_html_dir}/*.html "$outdir/${PACKAGE}/"
+   rmdir ${split_html_dir}
+ }
+ 
+@@ -351,9 +351,9 @@
+   )
+   eval \
+     html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
+-  rm -rf "$outdir/html_$split/"
+-  mv $split_html_dir "$outdir/html_$split/"
+-  du -s "$outdir/html_$split/"
++  rm -rf "$outdir/${PACKAGE}/"
++  mv $split_html_dir "$outdir/${PACKAGE}/"
++  du -s "$outdir/${PACKAGE}/"
+   ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
+ 
+ else # use texi2html:
+@@ -368,8 +368,8 @@
+   mv $PACKAGE.html "$outdir/"
+ 
+   html_split node
+-  html_split chapter
+-  html_split section
++#   html_split chapter
++#   html_split section
+ fi
+ 
+ printf "\nMaking .tar.gz for sources...\n"
+@@ -421,13 +421,13 @@
+ fi
+ 
+ printf "\nMaking index file...\n"
+-if test -z "$use_texi2html"; then
++# if test -z "$use_texi2html"; then
+   CONDS="/%%IF  *HTML_SECTION%%/,/%%ENDIF  *HTML_SECTION%%/d;\
+          /%%IF  *HTML_CHAPTER%%/,/%%ENDIF  *HTML_CHAPTER%%/d"
+-else
+-  # should take account of --split here.
+-  CONDS="/%%ENDIF.*%%/d;/%%IF  *HTML_SECTION%%/d;/%%IF  *HTML_CHAPTER%%/d"
+-fi
++# else
++#   # should take account of --split here.
++#   CONDS="/%%ENDIF.*%%/d;/%%IF  *HTML_SECTION%%/d;/%%IF  *HTML_CHAPTER%%/d"
++# fi
+ 
+ curdate=`$SETLANG date '+%B %d, %Y'`
+ sed \
+@@ -454,7 +454,7 @@
+    -e "s,%%SCRIPTURL%%,$scripturl,g" \
+    -e "s!%%SCRIPTNAME%%!$prog!g" \
+    -e "$CONDS" \
+-$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
++$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/${PACKAGE}.index.html"
+ 
+ echo "Done, see $outdir/ subdirectory for new files."
+ 
-- 
2.44.0

Reply via email to