Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

D slash in latex

  1. Dec 29, 2008 #1
    does anyone knw the code for how to produce the d slash notation in the integration measure for momentum space? Where (d slash)^n X=(d^n)X/((2pi)^n).
    Basically all i want to do is replace the h:
    [tex]\hslash[/tex]
    with a d.
     
  2. jcsd
  3. Dec 29, 2008 #2

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    not!

    Hi the1ceman! :smile:
    hmm … interesting :rolleyes:

    i did a google search, and found this …
    He did it by typing \displaystyle{\not} …

    but you can also do it with just {\not} …

    (presumably because LaTeX regards a letter with a slash through it as "not" that letter :biggrin:)

    [tex]{\not} \partial = \gamma_i \partial^i[/tex]
    [tex]{\not} p = \gamma_i p^i[/tex]
    [tex]{\not}A = \gamma _i A^i[/tex]
     
  4. Dec 29, 2008 #3
    thanks for the reply tim but im not after the feynman slash notation! Basically in the latex command \hslash i just want to replace the 'h' by a 'd', so that the top end of the 'd' has a diagonal line through it, not the whole letter (as in the feynman slash notation).
    Im almost there, basically i have to create a macro, but i need to find the code for the 'slash' in \hslash.
     
  5. Dec 29, 2008 #4

    robphy

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Try this
    [tex]
    \newcommand{\dslash}{d \hspace{-0.8ex}\rule[1.2ex]{0.8ex}{.1ex}}
    \dslash \hbar
    [/tex]
    (using a horizontal bar).
     
  6. Dec 30, 2008 #5

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    negative space!

    oh, robphy, that's great! :tongue2: …

    you've invented negative space! :biggrin:

    you've inserted a negative space "after" the d (using \hspace{-0.8ex}), and put a horizontal bar in it. :approve:

    (btw, you can leave out "\newcommand" at the start, and "\dslash " at the end: [tex]
    {d \hspace{-0.8ex}\rule[1.2ex]{0.8ex}{.1ex}}
    [/tex] :wink:)


    Does CERN know about this? :smile:
     
  7. Dec 30, 2008 #6
    thanks for the reply, i have actually done this already, but with a different command, is it possible to get the 'slash' slightly horizontal? Sorry for being so pedantic!!!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: D slash in latex
  1. D slash in latex (Replies: 2)

  2. Latex Help (Replies: 9)

  3. LaTeX help (Replies: 2)

Loading...