Backslash on soft line break (soft wrap)

asked 2019-11-28 09:24:20 +0200

Antanas gravatar image

By entering long commands or long lines of code into technical writing automatic backslash mark at the end of line could be desirable. image description

It could be a paragraph property and could be applied using paragraph style. Is it possible?

edit retag flag offensive close merge delete



To the best of my knowledge, this is not possible with paragraph styles. I am frequently confronted to this problem. I use Preformatted Text style (or a custom derived one) with a monospaced font. Consequently, line width is predictable and I can manually insert the backslash followed by a line break Shift+Return.

Unfortunately, if I change page or paragraph margins, I must manually review the paragraphs.

ajlittoz gravatar imageajlittoz ( 2019-11-28 09:34:18 +0200 )edit

No it is not possible, and I even don't see how could it be useful or implemented.

The "\" is just one of possible continuation syntaxes (sh-inspired; there are others, like "_" for Basic); the continuation might be sensitive to placement (e.g. might be not valid inside quoted strings); and it is actually manually added by users/programmers when using console. Natural language word breaking rules differ from those in programming languages / command processors, so automatically wrapping lines might not be correct (breaking between characters constituting a single identifier, like func-name in lisp). It is unclear how could it automatically cope with e.g. Writer's automatic collapsing of all spaces running outside of the page margin (you may add as many spaces as you like before the next word, and the spaces at the page margin are hidden). So I don't think such a feature makes sense ...(more)

Mike Kaganski gravatar imageMike Kaganski ( 2019-11-28 09:59:38 +0200 )edit

Thanks, Mike, all your arguments make sense. The method described by ajlittoz seems the only acceptable.

Antanas gravatar imageAntanas ( 2019-11-28 10:29:35 +0200 )edit