Search code examples
htmlxmldocbookdocbook-5

Indent the text in docbook


I want to indent my text in the article I am writing in docbook 5. I also need to add colors to my text. Is that possible? If so how? I tried indenting as follows but it was not visible when I took the html output of it.(Here I tried to align the text "Kerfun" to the center) I have no idea regarding the colour change. Can someone please tell me how? Where have I gone wrong?

<dbk:para text-indent="center">Kerfun</dbk:para>
   <dbk:para text-indent="center">
      <dbk:emphasis role="bold">Fadiah</dbk:emphasis>
   </dbk:para>

Solution

  • You haven't specified your OS or toolchain.

    To format your xml: I'd suggest using the "xmllint -format" command

    To validate your xml: Same command could be used to ensure your document is valid against the docbook schema

    To colorize your xml: That very much depends on what editor you use. Personally I'm a fan of gvim which has XML high-lighting enabled by default.

    Update

    As stated I'm not a windows guy but 2 minutes of googling lead me to the following:

    • Notepad++ appears to have an XML plugin. Source was the following link