1

I am trying to modify the class sides to write scripts (no particular packages), and I was wondering how to obtain the following output for every character:

Donald Duck: Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem
             Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum  

In the text the code should look something like \character{Donald Duck}{Lorem Ipsum Lorem Ipsum...}but I do not really know what to write in the .cls to get this output.

Kolmin
  • 559
  • 1
    Consider using lists instead of true two-column mode. – TeXnician Oct 05 '17 at 12:58
  • Thanks a lot. I took a look at the various options and some look promising, e.g., \labeling. However, what should I actually write in the class file to have something that works? I just realized I do not really know how to do it, since everytime I should begin and end an enviroment, and I have no clue on how to do this in the .clsfile. – Kolmin Oct 05 '17 at 13:11
  • Please post an example how the environmemts should look like. – TeXnician Oct 05 '17 at 13:32
  • 1
    You could define a new list environment with, e.g., enumitem (let's call it "xyz") and then use \begin{xyz}\character{bli}{bla blub}\character{quack}{zzz}\end{xyz} where each \character does sth. like \item[#1] #2. – TeXnician Oct 05 '17 at 13:40
  • Right! But the problem is how to avoid to write \begin{xyz}and \end{xyz}everytime. I would like to have it built in so that I can write \character{bli}{bla blub} every time avoiding to write begin and end, and this is what I don't know how to do in the class file. – Kolmin Oct 05 '17 at 14:01
  • 1

1 Answers1

1

For example, something like this:

\def\character#1#2{\par
   \setbox0=\hbox{#1:\quad}\dimen0=\wd0
   \hbox{\box0 \vtop{\advance\hsize by-\dimen0 \noindent #2}}
   \medskip
}

\character{Donald Duck}{Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum
                        Lorem Ipsum Lorem Ipsum Lorem Ipsum...}

\bye
wipet
  • 74,238