[FFmpeg-devel] [PATCH] doc: modify style for texi2html 1.76+

Janne Grunau janne-ffmpeg
Sat Jan 29 13:35:30 CET 2011


I have a better patch. This generates pages looking similar to what we
have currently on the website. Only checked with texi2html 1.76 and 1.78. 

Please check with 1.82 and 5.0

Patch should be pushed in coordiation with root so that texi2html is
upgraded before. I don't think this will work with the old version.

Janne
---8<---
The generated HTML files are similar to the ones generated with
texi2html 1.56k used on the website.
---
 Makefile             |    4 ++--
 doc/developer.texi   |    3 +++
 doc/faq.texi         |    3 +++
 doc/ffmpeg.texi      |    4 ++++
 doc/ffplay.texi      |    4 ++++
 doc/ffprobe.texi     |    4 ++++
 doc/ffserver.texi    |    4 ++++
 doc/general.texi     |    3 +++
 doc/libavfilter.texi |    3 +++
 doc/t2h_ffmpeg.init  |   22 ++++++++++++++++++++++
 10 files changed, 52 insertions(+), 2 deletions(-)
 create mode 100644 doc/t2h_ffmpeg.init

diff --git a/Makefile b/Makefile
index c5e74f0..4a5c872 100644
--- a/Makefile
+++ b/Makefile
@@ -123,8 +123,8 @@ doc/ffprobe.pod doc/ffprobe.html: doc/demuxers.texi doc/indevs.texi doc/protocol
 doc/libavfilter.html: doc/filters.texi
 
 doc/%.html: TAG = HTML
-doc/%.html: doc/%.texi
-	$(M)cd doc && texi2html -monolithic -number $(<:doc/%=%)
+doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h_ffmpeg.init
+	$(M)cd doc && texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h_ffmpeg.init $(<:doc/%=%)
 
 doc/%.pod: TAG = POD
 doc/%.pod: doc/%.texi
diff --git a/doc/developer.texi b/doc/developer.texi
index 89bc339..6e80106 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -7,6 +7,9 @@
 @sp 3
 @end titlepage
 
+ at top
+
+ at contents
 
 @chapter Developers Guide
 
diff --git a/doc/faq.texi b/doc/faq.texi
index c03a2e1..891da8f 100644
--- a/doc/faq.texi
+++ b/doc/faq.texi
@@ -7,6 +7,9 @@
 @sp 3
 @end titlepage
 
+ at top
+
+ at contents
 
 @chapter General Questions
 
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 98f2031..0260cdb 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -7,6 +7,10 @@
 @sp 3
 @end titlepage
 
+ at top
+
+ at contents
+
 @chapter Synopsis
 
 The generic syntax is:
diff --git a/doc/ffplay.texi b/doc/ffplay.texi
index c03905c..022ea59 100644
--- a/doc/ffplay.texi
+++ b/doc/ffplay.texi
@@ -7,6 +7,10 @@
 @sp 3
 @end titlepage
 
+ at top
+
+ at contents
+
 @chapter Synopsis
 
 @example
diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi
index bc96bd5..6561319 100644
--- a/doc/ffprobe.texi
+++ b/doc/ffprobe.texi
@@ -7,6 +7,10 @@
 @sp 3
 @end titlepage
 
+ at top
+
+ at contents
+
 @chapter Synopsis
 
 The generic syntax is:
diff --git a/doc/ffserver.texi b/doc/ffserver.texi
index 77deb85..dd0c214 100644
--- a/doc/ffserver.texi
+++ b/doc/ffserver.texi
@@ -7,6 +7,10 @@
 @sp 3
 @end titlepage
 
+ at top
+
+ at contents
+
 @chapter Synopsys
 
 The generic syntax is:
diff --git a/doc/general.texi b/doc/general.texi
index c1fecef..63e5d68 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -7,6 +7,9 @@
 @sp 3
 @end titlepage
 
+ at top
+
+ at contents
 
 @chapter external libraries
 
diff --git a/doc/libavfilter.texi b/doc/libavfilter.texi
index 8745928..ce176e8 100644
--- a/doc/libavfilter.texi
+++ b/doc/libavfilter.texi
@@ -7,6 +7,9 @@
 @sp 3
 @end titlepage
 
+ at top
+
+ at contents
 
 @chapter Introduction
 
diff --git a/doc/t2h_ffmpeg.init b/doc/t2h_ffmpeg.init
new file mode 100644
index 0000000..381b79e
--- /dev/null
+++ b/doc/t2h_ffmpeg.init
@@ -0,0 +1,22 @@
+# no horiz rules between sections
+$end_section = \&FFMPEG_end_section;
+sub FFMPEG_end_section($$)
+{
+}
+
+$print_page_foot = \&FFMPEG_print_page_foot;
+sub FFMPEG_print_page_foot($$)
+{
+    my $fh = shift;
+    print $fh "$SMALL_RULE\n";
+    T2H_DEFAULT_print_page_foot($fh);
+}
+
+# no navigation elements
+$SECTION_NAVIGATION = 0;
+
+# TOC and Chapter headings link
+$TOC_LINKS = 1;
+
+# print the TOC where @contents is used
+$INLINE_CONTENTS = 1;
-- 
1.7.4.rc2




More information about the ffmpeg-devel mailing list