Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!ames!orion.arc.nasa.gov!ogawa From: ogawa@orion.arc.nasa.gov (Arthur Ogawa) Newsgroups: comp.text.tex Subject: Re: Feynman slash -- question Message-ID: <1991Mar4.231207.25665@news.arc.nasa.gov> Date: 4 Mar 91 23:12:07 GMT References: <1960@ruunsa.fys.ruu.nl> <45048@ut-emx.uucp> Sender: usenet@news.arc.nasa.gov (USENET Administration) Organization: NASA Ames Research Center, Moffett Field, CA Lines: 39 Bcc: ogawa In article <45048@ut-emx.uucp> myers@ut-emx.uucp (Eric Myers) writes: |In article <1960@ruunsa.fys.ruu.nl> spit@ruunsa.fys.ruu.nl (Werenfried |Spit) writes: |> |>I know it has been asked before,but is there |>someone having a good solution for the so |>called Feynman slash: a '/' put through a symbol. | |To do it right you really should define each symbol with a slash |through it separately to make it look correct. In place of all |that work though here is \slashchar from TeXsis: | | |% \slashchar puts a slash through a character to represent contraction |% with Dirac matrices. Use \not instead for negation of relations, and use |% \hbar for hbar. | |\def\slashchar#1{\setbox0=\hbox{$#1$} % set a box for #1 | \dimen0=\wd0 % and get its size | \setbox1=\hbox{/} \dimen1=\wd1 % get size of / | \ifdim\dimen0>\dimen1 % #1 is bigger | \rlap{\hbox to \dimen0{\hfil/\hfil}} % so center / in box | #1 % and print #1 | \else % / is bigger | \rlap{\hbox to \dimen1{\hfil$#1$\hfil}} % so center #1 | / % and print / | \fi} % | Eric's implementation won't work well within super or supersuperscripts; a no-fuss implementation is to type, eg, \not\gamma This uses the cmsy character "34, the zero-width slash. It was invented for precisely this application. It works with Computer Modern math fonts, but not necessarily other math fonts, so be careful if you've pulled PostScript fonts into your macro package. It does work with script and scriptscript typesetting.