Can Greek Letters be Added to the Reply Menu in Online Forums?

  • Thread starter Thread starter chemisttree
  • Start date Start date
Click For Summary
The discussion centers on the proposal to add Greek letters to the reply menu in online forums, enhancing accessibility for users who need these symbols for equations or notation. Participants suggest a dropdown menu for easy insertion of Greek symbols, similar to existing features for other formatting options. Concerns are raised about server load, with some arguing that using Greek letters would be less burdensome than LaTeX. There is also interest in integrating MathJax for better mathematical typesetting, although some users express skepticism about its compatibility with the forum's current setup. Overall, the idea aims to streamline the process of including Greek symbols in forum posts.
  • #61
Fredrik said:
I expect that it will only be trivial if we can have several different delimiters mean the same thing.
Of course! That sounds simple enough to do.
 
Physics news on Phys.org
  • #62
It shouldn't be too hard. I read over the source a bit, and multiple delimiters could probably be done just by changing the regexp.

(Is it just my editor, or did the MathJax developers throw all the code into one line?)
 
Last edited:
  • #63
jhae2.718 said:
(Is it just my editor, or did the MathJax developers throw all the code into one line?)

The code is minified.
 
  • #64
Okay, just found the unpacked and commented source.

Just found this:
http://www.mathjax.org/docs/1.1/upgrade.html#change-in-default-tex-delimiters
Code:
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    jax: ["input/TeX","output/HTML-CSS"],
    extensions: ["tex2jax.js"],
    tex2jax: {
      inlineMath: [ ['$','$'], ['\\(','\\)'] ],
      processEscapes: true
    }
  });
</script>
<script type="text/javascript" src="/MathJax/MathJax.js"></script>

Also, in tex2jax.js:
Code:
MathJax.Extension.tex2jax = {
  version: "1.1",
  config: {
    element: null,             // The ID of the element to be processed
                               //   (defaults to full document)

    inlineMath: [              // The start/stop pairs for in-line math
//    ['$','$'],               //  (comment out any you don't want, or add your own, but
      ['\\(','\\)']            //  be sure that you don't have an extra comma at the end)
    ],

    displayMath: [             // The start/stop pairs for display math
      ['$$','$$'],             //  (comment out any you don't want, or add your own, but
      ['\\[','\\]']            //  be sure that you don't have an extra comma at the end)
    ],

    skipTags: ["script","noscript","style","textarea","pre","code"],
                               // The names of the tags whose contents will not be
                               // scanned for math delimiters

    ignoreClass: "tex2jax_ignore",    // the class name of elements whose contents should
                                      // NOT be processed by tex2jax.  Note that this
                                      // is a regular expression, so be sure to quote any
                                      // regexp special characters

    processClass: "tex2jax_process",  // the class name of elements whose contents SHOULD
                                      // be processed when they appear inside ones that
                                      // are ignored.  Note that this is a regular expression,
                                      // so be sure to quote any regexp special characters

    processEscapes: false,     // set to true to allow \$ to produce a dollar without
                               //   starting in-line math mode

    processEnvironments: true, // set to true to process \begin{xxx}...\end{xxx} outside
                               //   of math mode, false to prevent that

    preview: "TeX"             // set to "none" to not insert MathJax_Preview spans
                               //   or set to an array specifying an HTML snippet
                               //   to use the same preview for every equation.

  },
 
Last edited by a moderator:
  • #65
Cool. I don't know javascript, but it looks like it's trivial to configure whatever we want as math delimiters, and like they have made it trivial to have several different ones that mean the same thing. I'm a bit confused by the fact that you seem to be able to configure it in two different places, but I'm guessing that the tex2jax: {blah-blah} command essentially says, "use these definitions instead of the ones you find in that stupid file".

So it probably won't be a problem at all to use all of these:
[noparse]

\( \)
$ $


\[ \]
$$ $$
[/noparse]
No wait...I do see a problem: Old posts that include $ signs. Not sure how to deal with those. Maybe someone can run a script to replace them all with \$. Or maybe we should just stick with the old delimiters. They would be less annoying if we can configure say F8 and F9 to type a pair of them.
 
  • #66
It does appear trivial to modify delimiters. The first block with the configuration options seems to override the settings found in the actual source. I posted both code blocks as I wasn't sure which would be best to modify in the case of PF.
 

Similar threads

Replies
78
Views
2K
  • · Replies 183 ·
7
Replies
183
Views
79K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
62
Views
10K
  • · Replies 14 ·
Replies
14
Views
4K