Page 1 of 1
Enter a new paragraph line without spacing
Posted: Wed Jan 10, 2024 2:26 pm
by Olivier
Hi,
Could you please advise on how to insert a line break without spacing in oxygen xml, ie like the Shift+Enter shortcut in msword.
Note the only way I have found to insert a carriage return is to insert a new paragraph, which obviously generates the inter-paragraph spacing set in the css...
Thanks in advance!
Olivier
Re: Enter a new paragraph line without spacing
Posted: Wed Jan 10, 2024 3:05 pm
by Radu
Hi Olivier,
There is no "soft line break" element in the DITA XML standard which would be the equivalent of <br>.
There is a special processing instruction "<?linebreak?>" which should be already handled by the publishing stylesheets.
For example in a DITA topic in the middle of a paragraph if working in the Author mode you press ENTER, select "processing-instruction" and then insert linebreak inside the processing instruction. Then publish and see how that looks like.
Regards,
Radu
Re: Enter a new paragraph line without spacing
Posted: Wed Jan 10, 2024 3:31 pm
by Olivier
Thanks Radu,
I guess I should have specified that I was trying to enter table heading content on multiple lines whilst avoiding the spacing which <p> elements naturally generate between them.
I found a solution using a <div> element:
Code: Select all
<entry>Unused <div>(31-9)</div></entry>
instead of
Code: Select all
<entry><p>Unused </p>
<p>(31-9)</p></entry>
Works fine for table headers.
Note: Your solution returns the following error in a usual paragraph:
The processing instruction must begin with the name of the target
Re: Enter a new paragraph line without spacing
Posted: Thu Jan 11, 2024 7:56 am
by Radu
Hi,
Right, using the <div> element to break the line is not semantically correct but it works

About this remark:
Note: Your solution returns the following error in a usual paragraph:
The processing instruction must begin with the name of the target
You probably did something wrong when inserting it.
I'm attaching an animated gif.
linebreak.gif
Regards,
Radu