1

I'am writing a class for the standardization of some documents and I want the interface to be smoothly as possible. One of the things I need is define an environment that produces something like this.

The titles are fixed and the user must provide the the text below that is split in two and displayed verbatim. I want the interface to be as simple as possible so, I'm thinking of something like this.

\begin{myenvironment}
1 2 3
4 5 6
&
1 2 3
1 4 5
\end{myenvironment}

I'm having trouble with the verbatim part.

Currently I have defined an environment that is used like this

\begin{myenvironment}
\begin{myenvironment1}
1 2 3
4 5 6
\end{myenvironment1}
\begin{myenvironment2}
1 2 3
1 5 6
\end{nyenvironment2}
\end {myenvironment}

But is too uncomfortable and hard to read for my needs.

Is there a way to achieve this or something similar?

  • 1
    Do you need verbatim for the contents? If not, \ttfamily also provides a typewriter style font without the hassle that allows for arbitrary catcode-content. – Werner Sep 30 '14 at 19:18
  • The text must preserve the spaces and newlines. I don't know iff there is a way to do this without verbatim. – Nico Lehmann Sep 30 '14 at 22:51
  • I think the issue Werner was asking was whether the content is pure text (numbers and letters), or does it include special TeX characters such as #&\$ etc. – Steven B. Segletes Oct 1 '14 at 11:17
  • Ah, now I get it. I need only numbers and letters. – Nico Lehmann Oct 1 '14 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.