🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #298

Re: Monospace in TeX/LaTeX

#298
From: Joakim Sernbrant
Date: Wed, 12 Jul 1989 11:53
42 lines
1759 bytes
In article <955@diemen.cc.utas.oz> ben@tasis.utas.oz.au@munnari.oz (Ben Lian) writes:
>I am trying to typeset some program fragments in typewriter style. At
>the moment I do this by defining a new (LaTeX) tabbing environment and
>then doing things like
>
>\begin{program}
>\>{\tt TYPE} \\
>\>\>{\tt T1 = PRODUCT} \\
>\>\>\>{\tt f1 : word} \\
>\>\>\>{\tt f2 : word} \\
>\>\>{\tt END}
>\>{\tt END}
>\end{program}
>
>(1)  There must be an easier way of doing this, and I'd appreciate it if
>     you could let me in on the secret;

Try this:
\begin{verbatim}
  TYPE
    T1 = PRODUCT
           f1 : word
           f2 : word
         END
  END
\end{verbatim}
The verbatim environment copies the text exactly as you enter it;
with spaces and all.

>(2)  The single space between each colon and the following 'word' gets
>     expanded to what looks like something between 1.5 and 2 spaces.
>     Why is this happening? And what can be done about it? (This is also
>     happening with 'c ! e' and 'c ? v'.

LaTeX handles a colon as a punctation mark, and therefore
adds some space after it. No space is added in the verbatim 
environment though.

-- 
--  Joakim Sernbrant, Royal Institute of Technology, Stockholm, Sweden
--  Internet:  d87-jse@nada.kth.se
--
Technical Details
Message-ID: <1274@draken.nada.kth.se>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!kth!draken!d87-jse
References: <955@diemen.cc.utas.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!kth!draken!d87-jse
From: d87-jse@nada.kth.se (Joakim Sernbrant)
Newsgroups: comp.text
Subject: Re: Monospace in TeX/LaTeX
Message-ID: <1274@draken.nada.kth.se>
Date: 12 Jul 89 11:53:15 GMT
References: <955@diemen.cc.utas.oz>
Reply-To: d87-jse@nada.kth.se (Joakim Sernbrant)
Organization: Royal Institute of Technology, Stockholm, Sweden
Lines: 41