This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: code examples and whitespace


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.

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.

(3. Of course you can always change your XML editor. My Emacs doesn't
corrupt my documents ;-)

				Jirka

-- 
-----------------------------------------------------------------
  Jirka Kosek  	                     
  e-mail: jirka@kosek.cz
  http://www.kosek.cz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]