discuss: Thread: Contents Question (HTML output)


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Contents Question (HTML output)
From: "Ryan Gallagher" ####@####.####
Date: 11 Jan 2001 21:08:56 -0000
Message-Id: <000301c07c12$f8437580$d16ea8c0@ibooks.com>

Hello,

I'm trying to get exactly the same output of linuxdoc sgml --> html that
Linuxdoc.org gets on their site.  I'm using linuxdoc-tools and have
everything working now but differences arrise in these areas:

Contents does not display sections below chapters

doing this:

1. Introduction
2. Setting up WWW client software (Antiquated)
3. Lynx

instead of this:

1. Introduction
	1.1 Copyright
	1.2 Feedback
	1.3 New versions of this Document
2. Setting up WWW client software (Antiquated)
	2.1 Overview
3. Lynx
	3.1 Where to get

Also... within documents it links chapters names back to the toc.

1. (Introduction) --> href'ed back to main documents toc entry for 1.

Does anyone know what i'm missing... my command used was :

linuxdoc -B html Any-LinuxdocSGML-HOWTO.sgml

-=-=-=-=-=-=

Separate Question:

Has anyone done any altering of the Linuxdoc DTD or process for their own
purposes to produce cleaner "more valid" HTML?  Stuff like not closing <p>
tags (and excessive unneeded <p> tags) can cause problems for my use of the
documents post conversion.  Any pointers?

Thank you in advance,
Ryan

####@####.####


Subject: Re: Contents Question (HTML output)
From: Dan York ####@####.####
Date: 12 Jan 2001 14:51:35 -0000
Message-Id: <3A5F19DB.23A5ABD7@e-smith.com>

Ryan,

> I'm trying to get exactly the same output of linuxdoc sgml --> html that
> Linuxdoc.org gets on their site.  I'm using linuxdoc-tools and have
> everything working now but differences arrise in these areas:
> 
> Contents does not display sections below chapters

Well... first, pretty much all LDP work now goes on using DocBook, so the
"linuxdoc" stuff is not used as much.  

I would suggest you take a look at the LAG at:

  http://www.linuxdoc.org/LDP/LDP-Author-Guide/

When I first started using DocBook, I had the same problem when using
the default DSSSL stylesheets provided by Norman Walsh. However, the
"ldp.dsl" file recommended for LDP work solves that problem. The LAG
mentions it, and there is a specific page on it at:

  http://www.linuxdoc.org/LDP/LDP-Author-Guide/usingldpdsssl.html

I believe the relevant DSSSL code that would create the in depth TOC
would be:

  (define (toc-depth nd)
    ;; more depth, 2 levels, to toc, instead of flat hierarchy
    2)

Now I have never worked with the linuxdoc tools, so I don't know 
where the DSSSL formatting for HTML is done, but if you inserted
these lines (the ;; comment is not necessary), that might do it.
(Or... you could just work on converting your linuxdoc over to
DocBook and then using the ldp.dsl file against it.)
> -=-=-=-=-=-=
> 
> Separate Question:
> 
> Has anyone done any altering of the Linuxdoc DTD or process for their own
> purposes to produce cleaner "more valid" HTML?  Stuff like not closing <p>
> tags (and excessive unneeded <p> tags) can cause problems for my use of the
> documents post conversion.  Any pointers?

I have not done this with linuxdoc, but the DocBook tools like "openjade"
produce very valid HTML.  They all work fine.

Regards,
Dan

-- 
Dan York, Director of Training        ####@####.####
Ph: +1-613-751-4401  Mobile: +1-613-263-4312 Fax: +1-613-564-7739 
e-smith, inc. 150 Metcalfe St., Suite 1500, Ottawa,ON K2P 1P1 Canada
http://www.e-smith.com/            open source, open mind
Subject: Re: Contents Question (HTML output)
From: Taketoshi Sano ####@####.####
Date: 13 Jan 2001 14:31:48 -0000
Message-Id: <y5ad7dsz5p2.fsf@kgh12351.nifty.ne.jp>

Hi.

  on Thu, 11 Jan 2001 15:10:48 -0600,
 "Ryan Gallagher" ####@####.#### wrote:

> 1. Introduction
> 	1.1 Copyright
> 	1.2 Feedback
> 	1.3 New versions of this Document
> 2. Setting up WWW client software (Antiquated)
> 	2.1 Overview
> 3. Lynx
> 	3.1 Where to get

If you use linuxdoc-tools version 0.6.0 or later, then
you can use option "-T" (or --toc) for html backend.
Just try to use  "linuxdoc -B html -T 2 <some-linuxdoc-sgml-source>"

Option "-T 0" produces no TOC, "-T 1" single level TOC, 
and "-T 2" makes 2 level TOC.  Although I have hope to get
more multi-level TOC, it doesn't come to real yet. So max is 2.

BTW, you can get single html output with 2 level TOC using
 "linuxdoc -B html -s 0 -T 2 <some-linuxdoc-sgml-source>"
 (so sgml21html is not necessary now).

Version 0.9.0 or later has updated manual page about linuxdoc command
and these options are explained at html backend section.

> Also... within documents it links chapters names back to the toc.
> 
> 1. (Introduction) --> href'ed back to main documents toc entry for 1.

Option "-T 2" enables this.

> -=-=-=-=-=-=
> 
> Separate Question:
> 
> Has anyone done any altering of the Linuxdoc DTD or process for their own
> purposes to produce cleaner "more valid" HTML?  Stuff like not closing <p>
> tags (and excessive unneeded <p> tags) can cause problems for my use of the
> documents post conversion.  Any pointers?

Check $LibDir/dist/linuxdoc-tools/html/mapping file. This is a kind of
"stylesheet" for linuxdoc-tools (as same as its mother, sgml-tools v1).

Hmm, It does not define the closing p element tag (</p>), as there:

<p>                     "<P>"
</p>                    ""                      +

maybe change this into

<p>                     "<P>"
</p>                    "</P>"                      +

would work.

Regards.
-- 
  Taketoshi Sano: ####@####.####
[<<] [<] Page 1 of 1 [>] [>>]


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.