docbook: Thread: Making pretty .html filenames (was: How to create a HOWTO on Red Hat Linux 9?)


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Making pretty .html filenames (was: How to create a HOWTO on Red Hat Linux 9?)
From: Tabatha Marshall ####@####.####
Date: 21 Oct 2003 08:09:01 -0000
Message-Id: <1066723947.7357.5.camel@mysticchild>

I can suggest very simple method for correcting the obscure html
filenames created when you convert your doc.

For each chapter and section, add an id.  Syntax:
<chapter id="intro">
	<sect1 id="aboutauthor">

...and so forth.  When you process to html, the filenames will be
intro.html, aboutauthor.html, etc.  

Hope that helps!

Tab

On Mon, 2003-10-20 at 19:42, Martin A. Brown wrote:
>  :          4. If I try to create multiple HTML pages instead of
>  : just one, the filenames are "t1.html" and "x76.html" which seems
>  : very odd to me. Is there no way to suggest "howto-1.html" and
>  : "howto-2.html" names? I remember the old sgml-tools used to name
>  : them this way, and it seemed a much more intuitive method to me.
> 
> I, too, stumbled over this, and find that it's annoying and also
> somewhat non-intuitive, however, the fix isn't too hard.
> 
> It's the famous "use-id-as-filename" flag, which is available with
> different syntax in either a DSSSL or XSL processor.  Since you are
> using Jade (correct?), you should add the following option to your
> jade command:
> 
>   -V %use-id-as-filename%
> 
> http://docbook.sourceforge.net/release/dsssl/current/doc/html/use-id-as-filename.html

-- 
Tabatha Marshall
Web: www.merlinmonroe.com
Linux Documentation Project Review Coordinator (http://www.tldp.org)
Linux Counter Area Manager US:wa (http://counter.li.org)

Subject: Re: Making pretty .html filenames (was: How to create a HOWTO on Red Hat Linux 9?)
From: "Rodolfo J. Paiz" ####@####.####
Date: 21 Oct 2003 13:28:49 -0000
Message-Id: <6.0.0.22.0.20031021071753.02501dc0@mail.simpaticus.com>

At 02:12 10/21/2003, Tabatha Marshall wrote:
>I can suggest very simple method for correcting the obscure html
>filenames created when you convert your doc.
>
>For each chapter and section, add an id.  Syntax:
><chapter id="intro">
>         <sect1 id="aboutauthor">
>
>...and so forth.  When you process to html, the filenames will be
>intro.html, aboutauthor.html, etc.

Unfortunately this is not happening. Since I started from Stein Gjoen's 
(sp?) template, all my sections do have ID's associated with them: "intro" 
and "summary" are the first two. I was able to partially fix this with some 
advice by Martin A. Brown, who told me to include "-V %use-id-as-filename%" 
in the jw command. Now I have "t1.html" (which does not obey the ID of 
"intro") and "summary.html" (which does).

I am now using "jw -f docbook -b html -V %use-id-as-identifier% sgml.file" 
as a command. Ideally I would like to recreate the behavior of sgml-tools 
many moons ago, and end up with either:

Sendmail-SMTP-AUTH-HOWTO-1.html
Sendmail-SMTP-AUTH-HOWTO-2.html
Sendmail-SMTP-AUTH-HOWTO-3.html

which is good since it indicates order, or:

Sendmail-SMTP-AUTH-HOWTO-intro.html
Sendmail-SMTP-AUTH-HOWTO-summary.html
Sendmail-SMTP-AUTH-HOWTO-faq.html

which is good in a different way since it indicates content. I think I 
prefer the first, but have not made up my mind yet.

So there are now three questions about pretty HTML names:

         1. Why is the ID for intro not being read or used?

         2. Is there a way I can prepend "Sendmail-SMTP-AUTH-HOWTO-" to 
whatever name jw chooses, and still have it create the links correctly? So 
far I've done this by hand, but of course that will quickly become unwieldy.

         3. Instead of using the ID tag associated with each section, is it 
possible to have jw name the HTML files sequentially as in the first example?

>Hope that helps!

Indeed it does; as you can see, I am making progress.


-- 
Rodolfo J. Paiz
####@####.####

Subject: Re: Making pretty .html filenames (was: How to create a HOWTO on Red Hat Linux 9?)
From: "Rodolfo J. Paiz" ####@####.####
Date: 21 Oct 2003 13:39:09 -0000
Message-Id: <6.0.0.22.0.20031021073515.0251ebe0@mail.simpaticus.com>

At 07:27 10/21/2003, Rodolfo J. Paiz wrote:

>So there are now three questions about pretty HTML names:
>
>         1. Why is the ID for intro not being read or used?

Sorry to reply to my own post, but in the docs Martin suggested I have 
found two partial answers. For question #1, the %root-filename% variable 
appears to control this and explains why I'm getting "t1.html".

>         2. Is there a way I can prepend "Sendmail-SMTP-AUTH-HOWTO-" to 
> whatever name jw chooses, and still have it create the links correctly? 
> So far I've done this by hand, but of course that will quickly become unwieldy.

In this case, the %html-prefix% appears to be what I want.

However, I can see that "-V %parameter%" sets something as a flag of true, 
but I cannot find any syntax that will let me set this to a value (e.g. 
%root-filename%="index"). What might this syntax be?

>         3. Instead of using the ID tag associated with each section, is 
> it possible to have jw name the HTML files sequentially as in the first 
> example?

This question I have not yet been able to answer on my own.


-- 
Rodolfo J. Paiz
####@####.####

[<<] [<] Page 1 of 1 [>] [>>]


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