Put the dollar sign in the basket... I mean Italic

Discussion in 'Site Feedback' started by Plazma Inferno!, Jul 8, 2016.

  1. Plazma Inferno! Ding Ding Ding Ding Administrator

    Messages:
    4,609
    Hi everyone.

    As you probably know, XenForo (the engine SciForums is based on) uses dollar sign for formatting purposes, so text following it becomes wonky.
    The simple hack to fix this to this is to place dollar sign (with or without amount) in Italic.

    Example:

    I got $1 but I wish it was $2.

    I got $1 but I wish it was $2.
     
    joepistole likes this.
  2. Guest Guest Advertisement



    to hide all adverts.
  3. Bowser Life is Fatal. Valued Senior Member

    Messages:
    7,507
    Thanks. I had that problem on several posts.
     
  4. Guest Guest Advertisement



    to hide all adverts.
  5. James R Just this guy, you know? Staff Member

    Messages:
    31,445
    Is it because the dollar sign is used as a delimiter for TeX code?

    Test:

    Dollar signs: $ code $:
    $E=mc^2, i\hbar \frac{\partial \psi}{\partial dt} = -\frac{\hbar^2}{2m}\nabla \psi + V\psi$

    \( code \):
    \(E=mc^2, i\hbar \frac{\partial \psi}{\partial dt} = -\frac{\hbar^2}{2m}\nabla \psi + V\psi\)

    [tex]code[/tex]:
    \(E=mc^2, i\hbar \frac{\partial \psi}{\partial dt} = -\frac{\hbar^2}{2m}\nabla \psi + V\psi\)

    Seems all give the same result. Useful trick with the italics, though.
     
    Last edited: Jul 11, 2016
  6. Guest Guest Advertisement



    to hide all adverts.
  7. Plazma Inferno! Ding Ding Ding Ding Administrator

    Messages:
    4,609
    I think so. Of all signs, they picked one of the most used... But well, at least I figured out this little trick.

    Please Register or Log in to view the hidden image!

     
  8. Stryder Keeper of "good" ideas. Valued Senior Member

    Messages:
    13,101
    You'd need to change:
    Code:
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
    </script>
    
    to:
    Code:
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true}});
    </script>
    
    You can then \$ in any mathematic equations so they don't have that problem.

    More information can be found at:
    http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-math-delimiters
    (the documentation is worth a read as there is a lot of settings that haven't be tightened here)
     

Share This Page