Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manual linebreak and formatting docbook

Tags:

xml

docbook

I am trying to make a simple help with Docbook. I need to format the text rather than letting text to be compact and non readable. It is better if the text can be set as it is being typed (i.e: preserve white spaces and line breaks)

So far I tried <?line-break?>, <?lb?> and <sbr/>. I only tried adding them to the position where I expect the line break as if using "\n" on C based language.

I am clueless of getting this done and I could not find any helpful resources. Any help appreciated regarding manual line break or formatting the text

<article xmlns='http://docbook.org/ns/docbook'>
    <title>Welcome to help</title>
    <section>
        <simplesect>
            <title>Abstract</title>
            <para>
              <!--Multi-lined paragraph where I 
                  need to break the lines manually
               -->
            </para>
        </simplesect>
    </section>
</article>
like image 549
Dinal24 Avatar asked Feb 11 '23 08:02

Dinal24


1 Answers

With Docbook all the white space and line breaks can be preserved when using the tag <literallayout>. Where manual line breaks can also be done easily as if editing plain text!

<literallayout>
  O, for a muse of fire, that would ascend
The brightest heaven of invention!
A kingdom for a stage, princes to act,
And monarchs to behold the swelling scene!
</literallayout>

would give the output as,

enter image description here

like image 164
Dinal24 Avatar answered Feb 13 '23 22:02

Dinal24