Page 1 of 1
Linebreaks in HTML export
Posted: Wed Dec 13, 2023 8:18 pm
by IanMayo
I have
read that the
<?linebreak?> processing instruction can be used to force a linebreak in published output, effectively replacing the HTML
<br> element.
But, it seems to have no effect when I publish a simple DITA doc using the Oxygen WebHelp publishing template. There certainly isn't a BR at the relevant location in the published output.
Re: Linebreaks in HTML export
Posted: Wed Dec 20, 2023 2:21 pm
by marius
Hi,
In
Oxygen XML Editor 26.0, in a DITA topic I inserted several
<?linebreak?> PI's, then I ran the default
DITA Map WebHelp Responsive transformation scenario. All PI's where translated to
<br> elements in the HTML output.
So my DITA topic look like this:
in.png
And the output I get is:
out.png
Re: Linebreaks in HTML export
Posted: Mon Apr 22, 2024 3:35 pm
by IanMayo
Thanks for your support Marius,
based on you demonstrating that it "should" work, I persevered, and realised I was adding the special element in `author-mode` rather than `plain-text-mode`.
The feature does work

Re: Linebreaks in HTML export
Posted: Mon Apr 22, 2024 3:42 pm
by Radu
Hi,
To add in the Author mode a processing instruction named <?linebreak?> you need to press ENTER, then choose "processing-instruction" and then inside the newly added processing instruction type "linebreak". Otherwise if you just type "<?linebreak?>" in the Author visual editing mode you get plain text.
Regards,
Radu