I would like to create a new environment to do this:
\begin{alltt}\normalfont
\textit{#1}
\end{alltt}
where I would like to put some text instead of #1.
Text consists of lines, as a poem:
aaa
bbb
ccc
I create the new environment like this:
\documentclass[20pt]{extarticle}
\usepackage{alltt}
\newenvironment{poem}[1]
{\begin{alltt}\normalfont
\textit{#1}}
{ \end{alltt} }
\begin{document}
\begin{poem}
{aaa
bbb
ccc}
\end{poem}
\end{document}
As result, the poem environment prints all the text in one line aaabbbccc. How to make the new environment, so the lines are separated?
documentenvironment. If I guess enough code to try your environment, I get the text spread over 3 lines, not one. – samcarter_is_at_topanswers.xyz Mar 08 '24 at 20:04\usepackage{alltt}
\newenvironment{poem}[1] {\begin{alltt}\normalfont \textit{#1}} { \end{alltt} }
\begin{document}
\begin{poem} {aaa bbb ccc} \end{poem}
\end{document}
– Marina Mar 08 '24 at 20:19{....}around youraaa bbb ccc– samcarter_is_at_topanswers.xyz Mar 08 '24 at 20:29