Page 1 of 1

How to add a line break in the middle of a <p> paragraph?

Posted: Wed Sep 18, 2019 3:08 am
by Carl
Hello. This simple word processing task has eluded me in Oxygen. I did a Google search and found this response from Radu 10 years ago:
Re: Entering a newline from the middle of a tag
Post by Radu ยป Fri Oct 02, 2009 1:32 am

Hello Mark,

Oxygen 11 (available in a few weeks) will have the Insert new line after action available either from the contextual menu -> Source submenu or with the Cmd+Alt+Enter shortcut which can be configured from the Menu shortcut keys preferences page.

Regards,
Radu
We are now 10 major versions later, but I still cannot find the "insert new line" feature! Am I missing something? I've searched your support responses further, and now it seems to imply that this capability isn't supported??

Re: How to add a line break in the middle of a <p> paragraph?

Posted: Wed Sep 18, 2019 2:06 pm
by Radu
Hi Carl,

Problem is that when XML document is edited and saved, sometimes new lines are inserted inside paragraph content for readability reasons and the publishing engine will ignore all line breaks added inside elements which are not space-preserve.
As DITA content is published besides PDF to various web output formats and the published content needs to adjust various screen sizes, in general line breaks inside paragraphs are not something often requested.
The DITA standard does not have a special element called <lines> which can be used instead of a paragraph and all line breaks inside of it should be kept in the PDF and HTML-based outputs.

Regards,
Radu

Re: How to add a line break in the middle of a <p> paragraph?

Posted: Thu Sep 19, 2019 1:46 am
by Carl
Hi Radu.

So what you're saying is that this line break feature added 10 years ago was quickly removed, because it didn't work in DITA?

I am surprised to hear that line breaks are not requested very often. I agree that I don't use it often, but when it's needed, a workaround is difficult. For example, addresses: each line in the address normally resides on a separate line. Separate paragraphs leave too big of a gap. The workaround is to format it as a code block, but that really does look like a workaround hack.

I'm no DITA expert, but why doesn't the HTML "<br>" tag work?

Re: How to add a line break in the middle of a <p> paragraph?

Posted: Thu Sep 19, 2019 7:46 am
by Radu
Hi Carl,

That particular "Insert new line after" feature you found mentioned 11 years ago is a feature which works in the Text editing mode and which adds a plain new line at the end of the current line even if the cursor is not located at the end of the line:

https://www.oxygenxml.com/doc/versions/ ... odes2.html

but as I said in my previous adding a new line inside a paragraph (going to the Text editing mode and pressing ENTER somewhere inside the paragraph) does not mean that the new line will be present in the published output.

Regards,
Radu