Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!myers From: myers@ut-emx.uucp (Eric Myers) Newsgroups: comp.text.tex Subject: Re: Feynman slash -- question Message-ID: <45048@ut-emx.uucp> Date: 4 Mar 91 19:19:17 GMT References: <1960@ruunsa.fys.ruu.nl> Organization: Center for Relativity, University of Texas Lines: 32 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 Myers "Frankie say '\relax'" Center for Relativity, Department of Physics, University of Texas at Austin myers@emx.utexas.edu | myers@utaphy.bitnet | myers@ut-emx.UUCP