Enforce \sideset behavior compatible with LaTeX
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
From amsmath documentation
Note: this command is not designed to be applied to anything other than sum-class symbols.
So,
$ cat example.tex
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\sideset{_*^*}{_*^*}\prod
\end{equation}
\end{document}
$ latexmk -pdf example.tex
works.

But
$ cat bug.tex
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\sideset{_*^*}{_*^*}X
\end{equation}
\end{document}
$ latexmk -pdf bug.tex
Latexmk: This is Latexmk, John Collins, 5 February 2015, version: 4.43a.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': Rules & subrules not known to be previously run:
pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -recorder "bug.tex"'
------------
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./bug.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 21 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty)) (./bug.aux)
! Limit controls must follow a math operator.
<argument> X\nolimits
_*^*
l.5 \sideset{_*^*}{_*^*}X
?
Unfortunately, MathJax isn't compatible with this behavior of LaTeX.

This creates problems when users have to create a PDF using LaTeX from a webpage that uses MathJax. Can MathJax be more compatible with LaTeX?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two [4m\sideset[0m examples from the issue in MathJax and compare their behavior with the shown LaTeX output. Trace the \sideset handling and determine how non-sum symbols are treated; done means the behavior matches LaTeX while preserving the working sum-symbol case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, latex
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100