343 lines
5.2 KiB
HTML
343 lines
5.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Customizing your HTML files</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="LDP Author Guide"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="DocBook: Sample Markup"
|
|
HREF="using-docbook.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Entities (shortcuts,
|
|
text macros and re-usable text)"
|
|
HREF="tools-entities.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Converting Documents to DocBook XML"
|
|
HREF="x2docbook.html"></HEAD
|
|
><BODY
|
|
CLASS="section"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>LDP Author Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="tools-entities.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Appendix D. DocBook: Sample Markup</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x2docbook.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="section"
|
|
><H1
|
|
CLASS="section"
|
|
><A
|
|
NAME="namedfiles"
|
|
></A
|
|
>D.9. Customizing your HTML files</H1
|
|
><DIV
|
|
CLASS="section"
|
|
><H2
|
|
CLASS="section"
|
|
><A
|
|
NAME="filenames"
|
|
></A
|
|
>D.9.1. HTML file names</H2
|
|
><P
|
|
>By default,
|
|
when separate HTML files are made, the SGML processor will assign
|
|
arbitrary names to the resulting files. This can be confusing
|
|
to readers who may bookmark a page only to have it change.
|
|
Whatever your reasoning, here's how to make separate files
|
|
named the way you want:</P
|
|
><P
|
|
>In your first <TT
|
|
CLASS="sgmltag"
|
|
><article></TT
|
|
> tag (which should be the only
|
|
one) include an <TT
|
|
CLASS="parameter"
|
|
><I
|
|
>id</I
|
|
></TT
|
|
> parameter and call it <SPAN
|
|
CLASS="QUOTE"
|
|
>"index"</SPAN
|
|
>. This will make
|
|
your tag look like this:</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> <TT
|
|
CLASS="sgmltag"
|
|
><article id="index"></TT
|
|
> </PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>Do not modify the first
|
|
<TT
|
|
CLASS="sgmltag"
|
|
><chapter></TT
|
|
>
|
|
tag, as it's usually an introduction and you want that on the first
|
|
page. For each other <TT
|
|
CLASS="sgmltag"
|
|
><section></TT
|
|
>
|
|
tag, include the id parameter and name it. A name should include
|
|
only alphanumeric characters, and it should be short enough to
|
|
understand what it is.</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
>
|
|
<TT
|
|
CLASS="sgmltag"
|
|
><chapter id="tips"></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><DIV
|
|
CLASS="note"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="note"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/note.gif"
|
|
HSPACE="5"
|
|
ALT="Note"></TD
|
|
><TH
|
|
ALIGN="LEFT"
|
|
VALIGN="CENTER"
|
|
><B
|
|
>Pick section IDs intelligently</B
|
|
></TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
> </TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
> We all know that <A
|
|
HREF="http://www.w3.org/Provider/Style/URI.html"
|
|
TARGET="_top"
|
|
>Cool URIs Don't
|
|
Change</A
|
|
>. This means your ids should not change either. Unless of
|
|
course the content for the id has changed substantially and the id name is no longer
|
|
relevant.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><DIV
|
|
CLASS="warning"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="warning"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/warning.gif"
|
|
HSPACE="5"
|
|
ALT="Warning"></TD
|
|
><TH
|
|
ALIGN="LEFT"
|
|
VALIGN="CENTER"
|
|
><B
|
|
>HTML file name generation using Jade</B
|
|
></TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
> </TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
> If you are using <SPAN
|
|
CLASS="application"
|
|
>Jade</SPAN
|
|
> to transform
|
|
your DocBook into HTML you must use the following parameter:
|
|
<TT
|
|
CLASS="parameter"
|
|
><I
|
|
>-V %use-id-as-filename%</I
|
|
></TT
|
|
>.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="section"
|
|
><H2
|
|
CLASS="section"
|
|
><A
|
|
NAME="header"
|
|
></A
|
|
>D.9.2. Headers and Footers</H2
|
|
><P
|
|
> There is no <SPAN
|
|
CLASS="QUOTE"
|
|
>"easy"</SPAN
|
|
> way to add headers and
|
|
footers to your document. If you are using DocBook XSL and
|
|
doing your own document transformations you
|
|
may customize the XSL template to suit your needs. For more
|
|
information read <A
|
|
HREF="http://www.sagehill.net/docbookxsl/HTMLHeaders.html"
|
|
TARGET="_top"
|
|
>http://www.sagehill.net/docbookxsl/HTMLHeaders.html</A
|
|
>.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="tools-entities.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x2docbook.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Entities (shortcuts,
|
|
text macros and re-usable text)</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="using-docbook.html"
|
|
ACCESSKEY="U"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Converting Documents to DocBook XML</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |