[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: index generation for html using sgmltools-2



Ah, I misunderstood that you want "toc" generation, 
but I found that you wrote "index" generation now.

 at "Fri, 12 May 2000 08:06:20 -0400",
  Paul Reavis <preavis@partnersoft.com> writes:

> > > Does sgmltools-2's html stylesheet generate indexes? I tried a simple
> > > example from the docbook guide:
> > >
> > > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
> > > <book>
> > > <title>Animals</title>
> > > <chapter>
> > > <title>Big Cats</title>
> > > <sect1>
> > > <title>The Tiger</title>
> > > <para>
> > > The Tiger<indexterm>
> > > <primary>Big Cats</primary>
> > > <secondary>Tigers</secondary>
> > >   </indexterm>
> > > is a very large cat indeed.
> > > </para>
> > >       </sect1>
> > >   </chapter>
> > > </book>
> > >
> > > But no index was generated. Adding in an <index> section seems to just
> > > work for hand-generated indices. Does sgmltools-2 / docbook-stylesheets
> > > support this, or do I need to hand-generate my index?
> > 
> > Try "sgml-tools -j '-V %generate-book-toc%' your-sgml-file"
> 
> Actually, I was looking for index (<index>) generation - but that's in
> the doc, too, under
> file:///usr/doc/docbook-stylesheets-doc/indexing.html

Sorry for my out-focus information, and I'm glad that you can get 
the answer by yourself.

> Seems to work fine, but is kind of cumbersome (you have to generate HTML
> version to do it, then run another program, then generate the html again
> (or ps/rtf/whatever).
> 
> You have to be careful when generating the index file to run jade
> against the exact same stylesheet (*.dsl) that sgmltools uses; otherwise
> the indices can be messed up (the upstream distribution of nwalsh's
> stylesheets, for example, does _not_ name the html files after their
> section ID codes, while the debian does the right thing and does so).
 
Well, perhaps you may be able to use

 "sgmltools -j '-V html-index' your-sgml-file"

in order to generate the raw index data (HTML.index).

This will make assure that the style-sheet used is exactly same 
what sgmltools uses :)

> This is my new Makefile entry for HTML; as you can see there are a bunch
> of steps and it's not real fast. (it translates
> source/somebook/book.sgml into html/somebook/*.html)
> 
> $(HTMLBOOKS): html/%/index.html : source/%
> 	nsgmls -s source/$*/book.sgml
> 	mkdir -p html
> 	rm -rf html/$*/
> 	mkdir -p temp/$*/
> 	cd temp/$*/; jade -t sgml -d
> /usr/lib/sgml/stylesheet/dsssl/sgmltools/html.dsl#html -V html-index
> ../../source/$*/book.sgml
> 	perl /usr/bin/collateindex.pl -o source/$*/AutoIndex.sgml
> temp/$*/HTML.index
> 	sgmltools -b html source/$*/book.sgml
> 	mv source/$*/book html/$*/
> 	if test -e source/$*/index.html; then cp source/$*/index.html
> html/$*/index.html; else cp html/$*/book1.html html/$*/index.html; fi
> 	if test -d source/$*/graphics; then cp -R source/$*/graphics
> html/$*/graphics; fi;
> 	rm -rf temp/
> 
> Does anyone know of a way to make jade generate the index file without
> generating actual html files? Perhaps there needs to be a separate
> stylesheet or something.

I don't know.

This may not be what you want, but

 "sgmltools -j '-V html-index -V %root-filename%' your-sgml-file"

does output filename-dir/HTML.index but does not produce other html files
due to some errors. And generated HTML.index seems the same as produced
normally.

> But, cumbersome or not, it works and works pretty well. I'm happy and
> very glad I'm not using a word processor for the 400+ pages (postscript
> version) of configuration manual for our software.
> 
> Thanks for the help-

I am glad to hear that. Luck.

-- 
  Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>



Reply to: