How do I add a line break after each sentence in the text? Preferably without altering the text too much because I have to be able to reuse the text in other cases where I don't want this behavior.
I've tried using inserting a line break in the source after each sentence and then turning on \obeylines
but this makes each sentence into its own paragraph. I only want a new line (something like \\
) not a new paragraph. This got me looking for the definition of \obeylines
(which I got from share) so that I could define an alternative version which made use of \\
instead of \par
. However, that doesn't seem to change its behavior at all. Any hints as to what I'm doing wrong (or if there is a better approach)?
\documentclass[12pt]{report}
\usepackage{fullpage}
\def\myobeylines{\catcode\endlinechar\active \let \endlinechar\\ }
\newenvironment{speech}%
{%begin
\Large
\setlength{\parskip}{\baselineskip}
\setlength{\parindent}{-1cm}
\setlength{\leftmargin}{1cm}
\myobeylines
}
{%end
}
\begin{document}
\begin{speech}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed faucibus, sem vel suscipit eleifend, ipsum dolor tempus nunc, ut iaculis nibh arcu vitae tortor.
Pellentesque a efficitur lectus, eget sagittis lorem.
Fusce vestibulum feugiat nibh, pulvinar convallis eros sagittis ac.
Pellentesque aliquam arcu a augue malesuada, sit amet eleifend orci vulputate.
Sed nibh dolor, commodo vel risus quis, elementum consequat dui.
Pellentesque eu neque eleifend, tincidunt mauris id, ultricies odio.
Aenean ac nisi congue, mollis leo a, cursus dolor.
Aenean non justo felis.
Cras interdum quam eu metus imperdiet ultricies.
Fusce finibus pellentesque volutpat.
Praesent id lacus eget dui ullamcorper finibus nec nec urna.
Quisque vel vestibulum quam.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Mauris vel nisl eros.
\end{speech}
\end{document}
\parskip
to0pt
in your environment do what you want? – Alan Munn Sep 27 '18 at 2:340pt
, use\obeylines
and then use a custom\par
, e.g.,\def\mypar{\vspace{\baselineskip}}
. – Alan Munn Sep 27 '18 at 2:54\mypar
(as a simple alias for\par
) for those instances where I'm reusing the text in a context where a more continuous text is needed, but that shouldn't be too hard. – rpspringuel Sep 27 '18 at 20:45