🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #2630

Re: Problem in Verbatim Mode

#2630
From: Donald Arseneau
Date: Sat, 22 Aug 1992 11:07
43 lines
2191 bytes
In article <MASROOR.92Aug22121606@human.ai.kyushu-u.ac.jp>, masroor@human.ai.kyushu-u.ac.jp (Muhammad Masroor Ali) writes...
> 
>I have got two sets of macros in two different .MAC files:
> 
>        1. vten.MAC
>           a) BeginTenVerbatim          - begins ten point verbatim mode
>           b) EndTenVerbatim            - finishes ten point verbatim mode
> 
>        2. vtwelve.MAC
>           a) BeginTwelveVerbatim       - begins twelve point verbatim mode  
>           b) EndTwelveVerbatim         - finishes twelve point verbatim mode
> 
....
>Runaway argument?
>If you want to give a man something practical, consider tires.  More^^M\ETC.
>! File ended while scanning use of \ttfinish.
..

The problem is that three are two conflicting definitions of \ttfinish:

>        |gdef|ttfinish#1^^M#2\EndTenVerbatim{#1|vbox{#2}|endgroup$$}}
>        |gdef|ttfinish#1^^M#2\EndTwelveVerbatim{#1|vbox{#2}|endgroup$$}}

Only the second definition to be read will be retained.  Thus, if definition
two is in effect, only Twelveverbatim will end properly.

To fix it, use the definition

      |gdef|ttfinish#1^^M#2\EndVerbatim{#1|vbox{#2}|endgroup$$}}

and use it as follows:

  \BeginTenVerbatim        and        \BeginTwelveVerbatim
     Some Text                           Larger Text
  \EndVerbatim                        \EndVerbatim

It would also be more efficient to combine the bulk of the macro definitions
into one macro:

   \def\BeginTwelveVerbatim{\BeginVerbatim{\twelvett}}
   \def\BeginTenVerbatim{\BeginVerbatim{\tentt}}

Donald Arseneau                asnd@reg.triumf.ca
Technical Details
Message-ID: <22AUG199204074981@reg.triumf.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!van-bc!ubc-cs!unixg.ubc.ca!reg.triumf.ca!asnd
References: <MASROOR.92Aug22121606@human.ai.kyushu-u.ac.jp>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!van-bc!ubc-cs!unixg.ubc.ca!reg.triumf.ca!asnd
From: asnd@reg.triumf.ca (Donald Arseneau)
Subject: Re: Problem in Verbatim Mode
Message-ID: <22AUG199204074981@reg.triumf.ca>
News-Software: VAX/VMS VNEWS 1.41    
Sender: news@unixg.ubc.ca (Usenet News Maintenance)
Nntp-Posting-Host: reg.triumf.ca
Organization: TRIUMF: Tri-University Meson Facility
References: <MASROOR.92Aug22121606@human.ai.kyushu-u.ac.jp>
Distribution: comp.text.tex,fj.comp.texhax
Date: Sat, 22 Aug 1992 11:07:00 GMT
Lines: 51