Quantcast
Channel: Mark where a line break should go IF the line needs breaking - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Mark where a line break should go IF the line needs breaking

$
0
0

I want to paragraph-break a text at a specific spot, but only if the text is too long for the line. In the MWE below, the first text fits the line width, but the second does not. Of course, I could just manually add a \par whenever the text turns out to be too long, but I would like LaTeX to spot this automatically [on a second pass, perhaps?] and break the line before the \Rbar symbol.

\documentclass[]{article}\usepackage{xcolor}\usepackage{gregoriotex}\begin{document}%\newcommand\versicle[1]{%    \textbf{\color{red}\Vbar. }{#1 }%    \textbf{\color{red}\Rbar. }{#2}}%%%This fits in one line\versicle{Dóminus vobíscum.}{Et cum spíritu túo.}\par%%%This should line break at the \Rbar.\versicle{Panem de cælo præstitísti eis, allelúia.}{Omne delectaméntum in se habéntem, allelúia.}%\end{document}

The code produces this: enter image description here

I'd like to get this:enter image description here


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>