🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #1850

Re: need help with a LaTeX macro

#1850
From: David Kastrup
Date: Sat, 29 Aug 1992 13:02
23 lines
1352 bytes
iwsbarke@acs.ucalgary.ca (Scott Barker) writes:

>Sorry if this shows up more than once - it didn't seem to work the first time
>------------------------------------------------------------------------------

>Hi, I'm having problems with a macro, and I was wondering if anyone could
>help. I started with a command:

>\verb"some text"\\

>Which I wanted to change into a macro:

>\type{some text}

>So I defined the macro as:

>\newcommand{\type}[1]{\verb"#1"\\}
Well, \verb works by removing all special meaning to all characters,
then reading its argument. If you define a macro like the above,
the characters already have a fixed meaning, and \verb can only change
the meaning of characters not already read in.
So the trick would be to try to let \verb see a closing brace instead
of the opening one.
Technical Details
Message-ID: <dak.715093340@tabaqui>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!tabaqui!dak
References: <9208282143.AA24890@acs1.acs.ucalgary.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!tabaqui!dak
From: dak@tabaqui.informatik.rwth-aachen.de (David Kastrup)
Subject: Re: need help with a LaTeX macro
Message-ID: <dak.715093340@tabaqui>
Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
Nntp-Posting-Host: tabaqui
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
References: <9208282143.AA24890@acs1.acs.ucalgary.ca>
Date: 29 Aug 92 13:02:20 GMT
Lines: 23