🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #468

Re: help with TeX \@... definitions, please.

#468
From: Hartmut Frommert
Date: Mon, 27 Jul 1992 16:31
60 lines
2209 bytes
In article <rjl.712218343@fawlty6.eng.monash.edu.au> rjl@fawlty6.eng.monash.edu.au (Russell Lang) writes:

>I am trying to redefine \@oddpage and \@evenpage in LaTeX.
[..]
>Could someone please tell my why?

Because the AT sign char ("@") is not a normal letter char in LaTeX after
the \documentstyle command (i.e. after reading the *.sty files). It has
another \catcode, and the meaning "\spacefactor", i.e. leaving an 
end(sentence)- space after ".", "!",...

>How do I make the others work?

\makeatletter % MAKE AT (the "@" char) a normal LETTER

>\def\defone{first definition}
>\def\@oddhead{right head text}
>\def\@evenhead{left head text}
>\def\@anotherhead{another head text}
>\def\deftwo{seconf definition}

>\@oddhead

>\@evenhead

>\@anotherhead

\makeatother % MAKE AT ("@") OTHER (i.e. a special char)

>\defone

>\deftwo

>\bye

If you use that in some text, i.e.#

  \documentstyle[OPTIONS]{MAINSTYLE}
  ..
  \makeatletter
  \def\my@@c@mm@nd{BlahBlah}
  \makeatother
  ..
  \begin{document}
  .. MANY TEXT
  \makeatletter 
  \my@@c@mm@nd
  \makeatother  
Don't forget the "\makeatother" after each use of char "@", before continuing
in your normal text.
  .. MANY FURTHER TEXT
  \end{document}

Hope this helps.
--
 Hartmut Frommert, LS Dehnen, Physics, | E-Mail: <phfrom@dknkurz1.bitnet>
 Univ of Constance, P.O.Box 55 60,     |     or  <phfrom@nyx.uni-konstanz.de>
 D-W-7750 Konstanz, Germany   | + SAVE THE WHALES ! BOYCOTT NORWAY !        +
 Phone: +49-(0)7531-88-3747   | + Whales R intelligent. Whale killers not.  +
+ Whale killing is murder. Eating whales is cannibalism. Eat whale killers. +
Technical Details
Message-ID: <phfrom.224@nyx.uni-konstanz.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!wupost!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!news.belwue.de!eratu.rz.uni-konstanz.de!nyx.uni-konstanz.de!phfrom
References: <rjl.712218343@fawlty6.eng.monash.edu.au>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!wupost!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!news.belwue.de!eratu.rz.uni-konstanz.de!nyx.uni-konstanz.de!phfrom
From: phfrom@nyx.uni-konstanz.de (Hartmut Frommert)
Subject: Re: help with TeX \@... definitions, please.
Message-ID: <phfrom.224@nyx.uni-konstanz.de>
Sender: usenet@eratu.rz.uni-konstanz.de
Organization: Dept. of Physics, University of Constance
References: <rjl.712218343@fawlty6.eng.monash.edu.au>
Date: Mon, 27 Jul 1992 16:31:08 GMT
Lines: 60