Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!rochester!kodak!uupsi!sunic!kth.se!cyklop.nada.kth.se!news From: grodan@cyklop.nada.kth.se (Mats G L|fdahl) Newsgroups: comp.text.tex Subject: How do I combine Midnight Macros dolines with LaTeX \item ? Message-ID: Date: 29 May 91 13:07:47 GMT Sender: news@nada.kth.se (Mr News) Distribution: comp Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 58 Hi, I recently picked up the midnight macros, since the dolines.tex stuff seemed to be useful for what I'm trying to do. I'm working on a LaTeX style for theatre manuscripts where the macros for lines are made with \item. With a line I mean something a role character says, like Hamlet: To be or not to be, that is the question. that is created with essentially \item[Hamlet:] To be or not to be, that is the question. In many cases one wants to decide the line breaks from the input and get Hamlet: To be or not to be, that is the question. from \vitem[Hamlet:] To be or not to be, that is the question. The trouble is to write the \vitem command ('v' for verse). I thought I'd be able to combine the midnight doline stuff with LaTeX items, but I can't seem to get it right. I tried a number of approaches, inspired from the manual pp.10-11, but with no success: ------------------------------------------------------------------------- \def\beforelines{\def\enddolines{}} % 'Hamlet:' ends up _after_ \def\everyline#1{\hbox{#1}} % the text. \def\afterlines{\par} \let\enddolines=\relax \def\vitem[#1]{\item[#1]\begindolines} ------------------------------------------------------------------------- ... \def\vitem[#1]{\begindolines\item[#1]} % Gives LaTeX error ------------------------------------------------------------------------- \def\beforelines{\def\enddolines{}\item} % I get: ... % [Hamlet:] To be or not to be, \def\vitem{\begindolines} % that is the question. ------------------------------------------------------------------------- Does anybody out there know how to combine the doline stuff with \item? I'll be equally glad for other solutions to my problem, but I don't want solutions built on making \vitem start a group (or environment), that is ended by the next command. I've implemented that already, in a plain TeX version, but I'm not very happy with it. /Mats -- ----------------------------------------------------------------------------- Mats Lofdahl, Stockholm Observatory, S-133 36 Saltsjobaden | +46 - 8 16 44 75 ----------------------------------------------------------------------------- Internet: lofdahl@astro.su.se | Bitnet: grodan@sekth | Sunet: royacs::lofdahl -----------------------------------------------------------------------------