docbook: Alternative to tag in Docbook


Previous by date: 5 Aug 2002 02:37:47 -0000 Re: is the linuxdoc DTD deprecated for LDP?, David Merrill
Next by date: 5 Aug 2002 02:37:47 -0000 Re: is the linuxdoc DTD deprecated for LDP?, Tabatha Persad
Previous in thread: 5 Aug 2002 02:37:47 -0000 Alternative to tag in Docbook, odc
Next in thread: 5 Aug 2002 02:37:47 -0000 Re: Alternative to tag in Docbook, John R. Daily

Subject: Re: Alternative to tag in Docbook
From: "John R. Daily" ####@####.####
Date: 5 Aug 2002 02:37:47 -0000
Message-Id: <200208050237.g752bj607275@clmboh1-smtp3.columbus.rr.com>

At (time_t)1028510270 odc wrote:

> Is there any alternative for Para that doesn't have a newline /
> carriagereturn ?
> 
> I'm trying to use it in a listitem, but I don't want the listitems to be
> spaced apart.

Your complaint isn't with the <para> tag per se, but rather with
the stylesheets and the fact that web browsers treat <li><p> as
two blocks instead of one.

I ran a simple test using Norm Walsh's XSL stylesheets, and the
relevant HTML came out thusly:

<html><body>
<div class="itemizedlist">
  <ul type="disc">
  <li><p>Foo</p></li>
  <li><p>Foo2</p></li>
  </ul>
</div></body></html>

By removing the <p> tags, you can achieve a closer nesting in
Mozilla, at least.

So, there would seem to be at least a few options:

1) Customize the XSL/DSSSL stylesheets to not insert the <p>.
   I think something along the lines of this would work for XSL:

<xsl:template match="listitem/para">
  <xsl:apply-templates/>
</xsl:template>

2) Break validation, and remove the <para> tags.  Undesirable but
   straightforward.

3) Use CSS to define a <p> nested in a <li> as an inline instead
   of block:

<head>
<style type="text/css">
  li p {
    display: inline;
  }
</style>
</head>

If you already have a CSS stylesheet, the last option would
clearly be the simplest, and in general feels like the best
solution to me.

(On-topic plug: I knew little about CSS until this weekend, but
picked up "Cascading Style Sheets: Designing for the Web" by Lie
& Bos yesterday, and read straight through it.  Excellent,
excellent book.)

--
John R. Daily
<email><mailbox>john</mailbox><domain>geekhavoc.com</domain></email>

Previous by date: 5 Aug 2002 02:37:47 -0000 Re: is the linuxdoc DTD deprecated for LDP?, David Merrill
Next by date: 5 Aug 2002 02:37:47 -0000 Re: is the linuxdoc DTD deprecated for LDP?, Tabatha Persad
Previous in thread: 5 Aug 2002 02:37:47 -0000 Alternative to tag in Docbook, odc
Next in thread: 5 Aug 2002 02:37:47 -0000 Re: Alternative to tag in Docbook, John R. Daily


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