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

LaTeX PopUps

  1. Jul 14, 2007 #1
    The LaTex pop-up that results from clicking on a LaTeX block sometimes has syntax different from the original post for example,

    [tex] \psi(x,t) = \int{U(x,t;xsingle-quote,tsingle-quote)\psi(xsingle-quote,tsingle-quote)dxsingle-quote}[/tex] is from recent post of mine.

    It would be nice if all of those LaTex pop-ups were copy-and-pastable :)
     
  2. jcsd
  3. Jul 14, 2007 #2

    VietDao29

    User Avatar
    Homework Helper

    What do you mean by different? To me, they look axactly the same. Your syntax in the post, and the pop-up (you can quote ur self, or edit the post to see the syntax) are identical.

    I'm not very sure if I understand you correctly. =.="
     
  4. Jul 15, 2007 #3
    Yes I probably explained that a bit unclearly. I went to the following page
    https://www.physicsforums.com/showthread.php?t=177059 and copied a Latex block from that post and pasted it here in order to show how copying and pasting can mess up you're LaTeX. However, to see how the syntax in a pop-up can give you a different result than the original compare my first latex block in this thread to my first latex block in the linked thread and see that the pop-up gives the same result. I think it is just the " ' "s that are different.
     
  5. Jul 15, 2007 #4

    VietDao29

    User Avatar
    Homework Helper

    Ah, yes, I got it. :biggrin:

    Well, I noticed that a while ago. Whenever, you type in 's in your LaTeX, it'll be shown as single-quote when you try to see the syntax by clicking on it. However, when you quote it, it'll show you exactly how it was written, i.e the 's. So instead of clicking, and pasting. You can try quoting instead. :smile:
     
  6. Jul 15, 2007 #5

    -Job-

    User Avatar
    Science Advisor

    I believe the reason for this is a security issue we had a while back.
    We should be replacing single quote characters with & #39; (no space after the &) which renders as ' and is safe.
     
  7. Jul 15, 2007 #6

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    Wasn't there a \prime ([itex]\prime[/itex]) command in LaTeX?
     
  8. Jul 15, 2007 #7
    Not related, but I haven't got my head around spacing in latex, how do you introduce a space, I can see how to align text but not to introduce a blank.
     
  9. Jul 15, 2007 #8

    ranger

    User Avatar
    Gold Member

    Just use a "\" between each word as in This\ is\ how\ to\ add a\ whitespace\ in\ Latex
    [tex]This\ is\ how\ to\ add\ a\ whitespace\ in\ Latex[/tex]
     
  10. Jul 15, 2007 #9
    Ah [tex]thank\ you[/tex] very helpful. :smile:

    test

    [tex]\int {x^2}\ dx\rightarrow \frac{1}{3}\ x^3\ +\ c[/tex]
     
    Last edited: Jul 15, 2007
  11. Jul 15, 2007 #10

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    here is how to add spaces in LaTex....

    small \,

    medium \:

    large\;

    quad \quad

    double quad \qquad
     
  12. Jul 15, 2007 #11

    robphy

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I think we're in math mode, by default:

    ab
    [tex]ab [/tex]

    a b
    [tex]a b[/tex]

    a\ b
    [tex]a\ b[/tex]

    a\!b
    [tex]a\!b[/tex] a negative thin space

    a\hspace{1in}b
    [tex]a\hspace{1in}b[/tex]

    a\hspace{1in}b\hspace{-.5in}c
    [tex]a\hspace{1in}b\hspace{-.5in}c[/tex]
     
  13. Jul 16, 2007 #12

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    don't forget, you can use the \text command if you [tex]\text{just want to make text, which looks better} than\ text\ with\ manual\ spacing\ in\ \mu\forall\theta\,\mathcal{M}\circ\mathrm{d}\epsilon[/tex].
     
  14. Jul 16, 2007 #13
    Nice. Thanks. :smile: I think we can now make all posts look like textbooks.:biggrin:
     
  15. Jul 16, 2007 #14

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    This is not an option without rewriting part of the vB code so that HTML escapes are preserved as escapes in quotes.

    - Warren
     
  16. Jul 16, 2007 #15

    -Job-

    User Avatar
    Science Advisor

    I think that won't be an issue if you do the replacement when displaying a post, rather than when posting.
     
  17. Jul 16, 2007 #16

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    That won't work either, because JavaScript will actually interpet HTML escapes in statements being executed, too. They may be a way to turn that "feature" off, but, if there is, I don't know it.

    - Warren
     
  18. Jul 17, 2007 #17
    Indeed thanks a lot for all the answers. Now my latex will look polished :smile:
     
  19. Jul 19, 2007 #18
    Check here: [tex]f"[/tex], this replaces " with &quote; you could also simply replace ' with \' just before writing whatever is there after document.write(', or even change it to document.write(" since " are already escaped (that is, if there are no " in tags).

    If you are willing to show us relevant parts of code, I might be able to suggest the most transparent fix.
     
    Last edited: Jul 19, 2007
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: LaTeX PopUps
  1. Site survey popup (Replies: 9)

  2. Moveable editing popup (Replies: 1)

Loading...