Blocks within a <sect2>

Started by Roberto Melloabout 25 years ago6 messagesdocs
Jump to latest
#1Roberto Mello
rmello@cc.usu.edu

Hi,

I am working on the PL/pgSQL docs right now and I need a way to
further subdivide blocks within a <sect2> in DocBook.
For example, I have a "Variables and Constants" <sect2> and I want to
have blocks for "Declaring Variables", "Declaring Constants" and
"Assigning Values to Variables". Each with its own header that stands out
as a block. How do I do that in DocBook?

Another thing is how do I declare tha HTML equivalent of a
"<A NAME='blah'>" so I can <link linkend="blah">FooBar</link> somewhere
else?

Thanks,

	-Roberto
-- 
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club|------+
  Roberto Mello - Computer Science, USU - http://www.brasileiro.net 
      http://www.sdl.usu.edu - Space Dynamics Lab, Web Developer    
Bet my floppy's bigger than yours.
#2Ross J. Reedstrom
reedstrm@rice.edu
In reply to: Roberto Mello (#1)
Re: Blocks within a <sect2>

On Wed, Mar 14, 2001 at 02:03:27PM -0700, Roberto Mello wrote:

Hi,

I am working on the PL/pgSQL docs right now and I need a way to
further subdivide blocks within a <sect2> in DocBook.
For example, I have a "Variables and Constants" <sect2> and I want to
have blocks for "Declaring Variables", "Declaring Constants" and
"Assigning Values to Variables". Each with its own header that stands out
as a block. How do I do that in DocBook?

<sect3> </sect3>

Another thing is how do I declare tha HTML equivalent of a
"<A NAME='blah'>" so I can <link linkend="blah">FooBar</link> somewhere
else?

<anchor id="blah">

Ross

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Roberto Mello (#1)
Re: Blocks within a <sect2>

Roberto Mello writes:

I am working on the PL/pgSQL docs right now and I need a way to
further subdivide blocks within a <sect2> in DocBook.
For example, I have a "Variables and Constants" <sect2> and I want to
have blocks for "Declaring Variables", "Declaring Constants" and
"Assigning Values to Variables". Each with its own header that stands out
as a block. How do I do that in DocBook?

<sect3> <sect4> <sect5> (no further)

Another thing is how do I declare tha HTML equivalent of a
"<A NAME='blah'>" so I can <link linkend="blah">FooBar</link> somewhere
else?

Use 'id' attributes. E.g.,

| <sect2 id="foo">
| <title>About Foos</title>
|
| <para>
| ...
| </para>
| ...
| </sect2>

Elsewhere:

| For more information about Foos, refer to <xref linkend="foo">.

Note that the <xref> inserts the fitting text, like "Section 1.2.3". In
general, <link> should only be used in limited circumstances, as it won't
come out right in print.

As for id attribute naming, use some hierarchical scheme. E.g., if the
chapter is "PL/pgSQL", the sect1 is "Description", the sect2 is "Variables
and Constants", and sect3 is "Constants", use something like

<sect3 id="plpgsql-description-var-const">

The HTML files and anchors will be named like the id's. (Try 'ls
*.html'.)

Note that in theory you could <xref> to any element that has an id, but
the stylesheets we use only implement xrefs to a subset that contains
things like chapters, sect's, examples, tables, and similar named block
elements.

Actually, the existing PL/pgSQL documentation source should be a good
example of these concepts.

Btw., have you read the book at docbook.org?

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#4Roberto Mello
rmello@cc.usu.edu
In reply to: Roberto Mello (#1)
Re: Blocks within a <sect2>

Here's what I am trying to do with links. I want to link the items in
the itemized list with its respecitev counterparts in the
<variablelist> below. Suggestions?

<sect2 id="plpgsql-advantages">
<title>Advantages of Using PL/pgSQL</title>

<itemizedlist>
<listitem>
<para>
Better performance
</para>
</listitem>
<listitem>
<para>
SQL Support
</para>
</listitem>
<listitem>
<para>
Portability
</para>
</listitem>
</itemizedlist>

<variablelist>

<varlistentry id="better-performance">
<term>
Better Performance
</term>
<listitem>
<para>
<acronym>SQL</acronym> is the language PosgreSQL
(and most other Relational Databases) use as query
language. It's portable and easy to learn. But every
<acronym>SQL</acronym> statement must be executed
individually by the database server.
</para>

	-Roberto
-- 
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club|------+
  Roberto Mello - Computer Science, USU - http://www.brasileiro.net 
      http://www.sdl.usu.edu - Space Dynamics Lab, Web Developer    
Je n'est suis pas tr���s content avec cette classe de Calculus.
#5Justin Clift
justin@postgresql.org
In reply to: Roberto Mello (#1)
How to I submit tips?

Hi All,

Is there some way of automatically submitting "Tips" as are now
appearing on the end of our emails?

Regards and best wishes,

Justin Clift

#6Peter Eisentraut
peter_e@gmx.net
In reply to: Roberto Mello (#4)
Re: Blocks within a <sect2>

You probably want to make the <variablelist> entries into separate
<sect3>'s and leave the itemizedlist as you show it, possibly with some
links (xref's) to the respective section.

Roberto Mello writes:

Here's what I am trying to do with links. I want to link the items in
the itemized list with its respecitev counterparts in the
<variablelist> below. Suggestions?

<sect2 id="plpgsql-advantages">
<title>Advantages of Using PL/pgSQL</title>

<itemizedlist>
<listitem>
<para>
Better performance
</para>
</listitem>
<listitem>
<para>
SQL Support
</para>
</listitem>
<listitem>
<para>
Portability
</para>
</listitem>
</itemizedlist>

<variablelist>

<varlistentry id="better-performance">
<term>
Better Performance
</term>
<listitem>
<para>
<acronym>SQL</acronym> is the language PosgreSQL
(and most other Relational Databases) use as query
language. It's portable and easy to learn. But every
<acronym>SQL</acronym> statement must be executed
individually by the database server.
</para>

-Roberto

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/