I'm working on a memoir
class document which happens to use interparagraph spacing rather than indented first lines, yet I'm trying to create an environment that showcases sample text - I'm calling it hangingsample
- where:
- the text is indented (like in a
quote
orquotation
environment), - the text is set in typewriter font (I use
\texttt
for this), - the text is set
\raggedright
, - each paragraph uses hanging indentation (like in APA referencing), and
- the interparagraph spacing is zero.
To illustrate:
The only way I have managed to create this effect thus far is to do everything manually, combining the figure
, minipage
, and hangparas
environment, the \raggedright
command, and enveloping each separate paragraph in \texttt{x}
and following up each paragraph with \vspace{-\parskip}
:
Preceding text ...
\begin{figure}[h]
\hspace*{5mm}\begin{minipage}[h]{125mm}
\begin{hangparas}{5mm}{1}\RaggedRight
\texttt{Technic is ... LEGO.}\vspace{-\parskip}
\texttt{Technic sets are ... electric motors.}\vspace{-\parskip}
\texttt{The style of ... technic bricks.}\vspace{-\parskip}
\texttt{Lego Technic. ... wiki/Lego\_Technic}
\end{hangparas}
\end{minipage}
\end{figure}
Following text...
surely this cannot be the most economical way of doing it... I'm looking for a simple new (or renewed) environment that does all of these things.
So far, I have created the following environment:
\newenvironment{hangingsample}{%
\everypar{\hangafter=1 \setlength{\hangindent}{5mm}}\ttfamily\raggedright}
{\par%
}
Which achieves most points except the full indentation of the paragraphs.
Anyone any idea what I could do to solve this?
Most kind regards,
Cees