[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH BOOK] Making multi page html-book

From: Jani Averbach <jaa_at_cc.jyu.fi>
Date: 2003-02-10 10:56:05 CET

On Mon, 10 Feb 2003, B. W. Fitzpatrick wrote:

> 1. I've changed the output dir for the chunk html to follow convention
> 2. make clean now zaps the whole dir
>

Makes sense. However, I like very much to have tmp in the name - we are
zapping that dir at the end, and I like to give an light warning to
innocent user what will happen (in case that they fiddle with content of
the dir). Feel free to change that if this is over cautious.

> Issues:
>
> 1. Images aren't working in the chunk copy--they're referenced and
> all, but there isn't even a link to the image (not even a broken
> one). Can you fix this?
>

Sorry, but I lost you.

I tried with cleaned out working copy and generating it from scratch with
plain install-book-html-chunk. And I have working images.

Would you test and look it at here:

http://www.cc.jyu.fi/~jaa/book/ch04s02.html#svn-ch-4-sect-2.2
http://www.cc.jyu.fi/~jaa/book/ch07.html#svn-ch7-sect1-dia1

This version is produced by patch with this mail (essential same as your
patch) and with

$ docbook-xsl-1.57.0 (I checked also docbook-xsl-1.60.0)
$ xsltproc --version
Using libxml 20426, libxslt 10022 and libexslt 713
xsltproc was compiled against libxml 20426, libxslt 10022 and libexslt 713
libxslt 10022 was compiled against libxml 20426
libexslt 713 was compiled against libxml 20426

> 2. Are you up for adding this target to the top-level Makefile.in?
>

Yes, very willingly, however I hope that this not so urgent task.

There is few things to sort out:

1) Should we do full scale autoconf stuff for detection of xsltproc and
   co? It is probably Right Thing to do, isn't?

2) Is this reasonable scheme for findind docbook-xsl?
   i) look at --with-docbook-xsl=<path>
   ii) look at /usr/local/share/sgml/docbook-xsl
   iii) look at /usr/share/sgml/docbook-xsl

   It seems that there is a nice VERSION file in docbook-xsl-x.y.z/.

3) There is a change that I can't test generation of pdf part. I have to
   take look at it.

Should this to be made an issue and marked as started?

BR, Jani

The current form of patch:

Changed $(BOOK_DIR)/html-chunk to $(BOOK_DIR)/tmp-html-chunk
Added -r to rm -f $(BOOK_HTML_CHUNK_DIR)

Log:

With this patch it is possible to create multi page html version of the
Subversion Book. The book-html-chunk will create a tmp dir
(tmp-html-chunk) because otherwise those gazillon html pages will clutter
up the current working dir.

* doc/book/Makefile:
  Added book-html-chunk and install-book-html-chunk targets.

Index: doc/book/Makefile
===================================================================
--- doc/book/Makefile (revision 4814)
+++ doc/book/Makefile (working copy)
@@ -6,6 +6,7 @@
 SHELL = /bin/sh

 BOOK_TOP = .
+BOOK_HTML_CHUNK_DIR = $(BOOK_DIR)/tmp-html-chunk
 BOOK_DIR = ${BOOK_TOP}/book
 BOOK_HTML_TARGET = $(BOOK_DIR)/book.html
 BOOK_PDF_TARGET = $(BOOK_DIR)/book.pdf
@@ -27,6 +28,7 @@
 XSL_DIR = ${BOOK_TOP}/tools/xsl
 XSL_FO = ${BOOK_TOP}/tools/fo-stylesheet.xsl
 XSL_HTML = $(XSL_DIR)/html/docbook.xsl
+XSL_HTML_CHUNK = $(XSL_DIR)/html/chunk.xsl

 RUN_FOP = ${BOOK_TOP}/tools/bin/run-fop.sh

@@ -34,15 +36,15 @@

 install: install-book install-misc-docs

-all-html: book-html misc-docs-html
+all-html: book-html book-html-chunk misc-docs-html

 all-pdf: book-pdf misc-docs-pdf

 all-ps: book-ps misc-docs-ps

-all-book: book-html book-pdf book-ps
+all-book: book-html book-html-chunk book-pdf book-ps

-install-book: install-book-html install-book-pdf install-book-ps
+install-book: install-book-html install-book-html-chunk install-book-pdf install-book-ps

 all-misc-docs: misc-docs-html misc-docs-pdf book-ps

@@ -57,6 +59,11 @@
 $(BOOK_HTML_TARGET): $(BOOK_ALL_SOURCE)
         $(XSLTPROC) $(XSL_HTML) $(BOOK_XML_SOURCE) > $(BOOK_HTML_TARGET)

+## This trailing slash is essential so that xsltproc will output pages to the dir
+book-html-chunk: $(BOOK_ALL_SOURCE)
+ mkdir -p $(BOOK_HTML_CHUNK_DIR)
+ $(XSLTPROC) -o $(BOOK_HTML_CHUNK_DIR)/ $(XSL_HTML_CHUNK) $(BOOK_XML_SOURCE)
+
 book-pdf: $(BOOK_PDF_TARGET)

 book-ps: $(BOOK_PS_TARGET)
@@ -77,6 +84,12 @@
         $(INSTALL) $(BOOK_HTML_TARGET) $(BOOK_INSTALL_DIR)
         $(INSTALL) $(BOOK_DIR)/images/*.png $(BOOK_INSTALL_DIR)/images

+## index.html is created last
+install-book-html-chunk: $(BOOK_HTML_CHUNK_DIR)/index.html
+ $(INSTALL) -d $(BOOK_INSTALL_DIR)/images
+ $(INSTALL) $(BOOK_HTML_CHUNK_DIR)/*.html $(BOOK_INSTALL_DIR)
+ $(INSTALL) $(BOOK_DIR)/images/*.png $(BOOK_INSTALL_DIR)/images
+
 install-book-pdf: $(BOOK_PDF_TARGET) $(BOOK_INSTALL_DIR)
         $(INSTALL) $(BOOK_PDF_TARGET) $(BOOK_INSTALL_DIR)

@@ -85,6 +98,7 @@

 book-clean:
         rm -f $(BOOK_HTML_TARGET) $(BOOK_FO_TARGET)
+ rm -rf $(BOOK_HTML_CHUNK_DIR)
         rm -f $(BOOK_PDF_TARGET) $(BOOK_PS_TARGET)

 misc-docs-html: $(MDOCS_HTML_TARGET)

--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 10 10:57:00 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.