10
$\begingroup$

Here is an example output of the citation helper in the case where the citation's title contains $\rm\LaTeX$ code (random paper found by searching for L^\infty)

Grząślewicz, Ryszard; Schaefer, Helmut H., [**Surjective isometries of (L^ 1 \cap L^ \infty [0, \infty )) and (L^ 1 + L^ \infty 0, \infty ))**, Indag. Math., New Ser. 3, No. 2, 173-178 (1992). ZBL0758.46031.

It would be better IMO if the mathematics was typeset with Mathjax:

Grząślewicz, Ryszard; Schaefer, Helmut H., Surjective isometries of $L^ 1 \cap L^ \infty [0, \infty )$ and $L^ 1 + L^ \infty [0, \infty )$, Indag. Math., New Ser. 3, No. 2, 173-178 (1992). ZBL0758.46031.

The only thing I did was change \(s and \)s into $s, which also made the hyperlink work correctly. I do not expect it to be hard to automate simple text replacement in the title. Can the script be modified to do this?

Or would this be a bad idea? (e.g. not worth the effort, makes the script inefficient, eat more of a generous someone's resources, mess up some otherwise readable titles)

(I am asking here rather than on math.meta.SE as the citation helper seems to have originated here)

$\endgroup$
6
  • 4
    $\begingroup$ I think that at this point the code is maintained by SE, but I will get in touch with them about making this fix. I noticed some other minor issues recently, so that's a good reason. $\endgroup$
    – Asaf Karagila Mod
    Commented Jun 8, 2021 at 8:56
  • 1
    $\begingroup$ @Asaf that would be great thanks! Hopefully then it would also be updated on other sites that use it like Math.SE $\endgroup$ Commented Jun 8, 2021 at 13:38
  • 2
    $\begingroup$ Well, if it's updated it will be done so across the network. $\endgroup$
    – Asaf Karagila Mod
    Commented Jun 8, 2021 at 13:39
  • 2
    $\begingroup$ Maybe an even better solution would be allowing the default Mathjax delimiters \(...\) so that they work properly and can be used without other issues. Note that these math delimiters appear, for instance, on the Bibtex files produced by Zbmath. $\endgroup$ Commented Jun 17, 2021 at 21:07
  • 1
    $\begingroup$ @FedericoPoloni I agree. That what you suggest is possible can be seen in the first example in this page of the Mathjax docs. Does someone know why it is not currently enabled on MO/SE sites? perhaps it conflicts with some other syntax? (can't think of any) Though it is probably easier for SE to change the citation helper than to verify that \(...\) does not break older posts $\endgroup$ Commented Jun 18, 2021 at 4:14
  • 2
    $\begingroup$ It just occurred to me that, as SE is redoing their post editor (the thing which switches between rich text and markdown), the citation helper might go away with the old post editor? And/or they may not want to bother with this $\endgroup$ Commented Jul 5, 2021 at 4:35

1 Answer 1

5
$\begingroup$

I think the problem has something to do with the MathJax Configuration at mathoverflow:

<script type="text/x-mathjax-config">
                MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50) },
                    tex2jax: { inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], processEscapes: true, ignoreClass: "tex2jax_ignore|dno" },
                    TeX: {
                        extensions: ["begingroup.js"],
                        noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } },
                        Macros: { href: "{}" }
                    },
                    messageStyle: "none",
                    styles: { ".MathJax_Display, .MathJax_Preview, .MathJax_Preview > *": { "background": "inherit" } },
                    SEEditor: "mathjaxEditing"
            });

In particular the deliminators for inline math are defined to be

[ ["$", "$"], ["\\\\(","\\\\)"]

E.g. when using

\\\\(L^ 1 \cap L^ \infty [0, \infty )\\\\)

one gets the correct mathjax rendering

\\(L^ 1 \cap L^ \infty [0, \infty )\\)

So, one should replace

[ ["$", "$"], ["\\\\(","\\\\)"] ]

by

[ ["$", "$"], ["\\(","\\)"] ]
$\endgroup$
2
  • 1
    $\begingroup$ So shouldn’t it be [ ["$", "$"], ["\(","\)"] ] instead? $\endgroup$ Commented May 4, 2023 at 11:34
  • 1
    $\begingroup$ Awesome find! I've always wondered about this. It seems to me like it's worth promoting to a bug report of its own. $\endgroup$
    – LSpice
    Commented May 10, 2023 at 1:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .