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

Getting \vphantom to work

  1. Jan 17, 2017 #1

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I found (nitpicking, I agree -- but that's what ##\TeX## does to you :smile:)$$
    {dr\over dt} = {dr\over d\phi}{d\phi\over dt}$$ looking ugly and want to lift the two dr . However,

    {dr\over dt} = {\vphantom {\phi} dr\over d\phi}{d\phi\over dt} didn't deliver as I expect:
    $$
    {\vphantom {\phi dr } dr\over dt} = {\vphantom {\phi} dr\over d\phi}{d\phi\over dt}$$ where omitting the \vphantom does take care of the lifting :
    $$
    { dr\over dt} = {{\phi} \ dr\over d\phi}{d\phi\over dt}$$ (but I of course don't want the ##\phi##)
    anyone have a tip how to get this done ?

    PS the ordinary \phantom does work as I expect -- vertically as well as horizontally:
    $$
    {\phantom {\phi } dr\over dt} = {\phantom {\phi} dr\over d\phi}{d\phi\over dt}$$
     
  2. jcsd
  3. Jan 17, 2017 #2

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    try \frac{}{} as opposed to \over
     
  4. Jan 17, 2017 #3

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Excellent ! Thanks doc !

    \frac {\vphantom {\phi} dr} {dt} = \frac {\vphantom {\phi} dr} {d\phi} \frac {d\phi} {dt} does the trick

    $$\frac {\vphantom {\phi} dr} {dt} = \frac {\vphantom {\phi} dr} {d\phi} \frac {d\phi} {dt}$$
    and leaves me wondering why \over doesn't behave like that ...
     
  5. Jan 17, 2017 #4

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    why \vphantom?? shouldn't need it.
     
  6. Jan 17, 2017 #5

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Have to recant: also with \frac the d from ##dr## is sitting lower than the d from ##d\phi## which I find ugly.
    Equally below the line: ##dt## is below ##d\phi##

    It's not much but annoying. See post #1.
     
  7. Jan 17, 2017 #6

    DrClaude

    User Avatar

    Staff: Mentor

    Are you talking on screen? Then it must be a problem in MathJax. LaTeX renders the equation correctly without vphantom.
     
  8. Jan 17, 2017 #7

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    I agree, I just did both in TeXnicenter and they are identical in the pdf file......
     
  9. Jan 17, 2017 #8

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes, on screen. Both Chrome and IE11.
    Haven't explored these other environments yet.
     
  10. Jan 17, 2017 #9

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    MathJax issue, not LaTeX issue.....
     
  11. Jan 18, 2017 #10

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I see your point: wrong forum o0)
    I'll have to get used to it -- an imperfect world :rolleyes:
     
    Last edited: Jan 19, 2017
  12. Jan 19, 2017 #11

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Have tried http://beta.mathjax.org/mathjax/latest/test/sample-dynamic-2.html -- doesn't show the problem I see on PF. No need to juggle with \vphantom indeed.
    Is that link using MathJaX or is it faithful to ##\LaTeX## ?

    Anyone know where to find a legible summary of MathJaX limitations ?

    Could it be this isn't a MathJaX issue but a MathJaX implementation issue ? @jtbell, @Greg Bernhardt ?

    \vphantom itself works alright: with \vphantom\int I can lift the d (more than I need for alignment with ##d\phi##), but with \vphantom\phi it doesn't lift it enough to come to the same height as ##d\phi##
     
  13. Jan 19, 2017 #12

    jtbell

    User Avatar

    Staff: Mentor

    Sorry, I'm not familiar with the detailed ins/outs of LaTeX and MathJax. I'm basically at the "Primer" level. :frown:
     
  14. Jan 19, 2017 #13
  15. Jan 20, 2017 #14
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Getting \vphantom to work
  1. Matlab not working (Replies: 2)

  2. Should I get Sage? (Replies: 9)

Loading...