This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: code examples and whitespace
- From: Nick Bauman <nick at cortexity dot com>
- To: jirka at kosek dot cz
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 16 Jan 2002 21:05:05 -0600 (CST)
- Subject: Re: DOCBOOK-APPS: code examples and whitespace
- References: <3C4599DA.C7BF9ED1@kosek.cz>
- Reply-to: nick at cortexity dot com
Jirka Kosek wrote:
> Nick Bauman wrote:
>>
>> Er, anyone else have this problem? When I have a code example, my
>> white space is flattened into one line by my XML editor (XMLMind). My
>> how this sucks! Kinda undermines the whole point of of a code snippet.
>
> The are possibly two solutions:
>
> 1. You can configure your editor to preserve space in programlisting. I
> don't know if XMLMind allows this.
I don't see where it does allow it.
> 2. You can add xml:space="preserve" attribute to programlisting. This
> should prevent your editor from mangling white-space. But you then will
> be unable validate DocBook document as current DTD doesn't contain this
> attribute. I think that this will be fixed in DocBook 4.2, but I'm not
> sure.
I'm using the 4.1.2 DTD by the way.
> (3. Of course you can always change your XML editor. My Emacs doesn't
> corrupt my documents ;-)
>
> Jirka
Golly, Someday someone will build entire planets using just Emacs. I will
try that, (using emacs, not building planets) thanks.
> --
> -----------------------------------------------------------------
> Jirka Kosek
> e-mail: jirka@kosek.cz
> http://www.kosek.cz
--
Nick Bauman
Cortexity Development
http://www.cortexity.com/