Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\middle preceded by primed symbol gives an error. #1023

Closed
nberth opened this issue Jan 27, 2015 · 5 comments
Closed

\middle preceded by primed symbol gives an error. #1023

nberth opened this issue Jan 27, 2015 · 5 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7

Comments

@nberth
Copy link

nberth commented Jan 27, 2015

The following code gives me an error "\middle must be within \left and \right" when I render it in my browser (Firefox 21.0, MathJax v2.4.0):

  • \left\{q\in Q \middle| P(q)\right\} works;
  • \left\{q\in Q' \middle| P(q)\right\} doesn't, nor \left\{q\in Q'' \middle| P(q)\right\} incidentally.
    This also happens when Q' is the result of macro expansion:
  • \newcommand{\Q}{Q} \left\{q\in \Q \middle| P(q)\right\} works;
  • \newcommand{\Q}{Q'} \left\{q\in \Q \middle| P(q)\right\} doesn't.

The error is reproducible (though no error message is displayed) on the dynamic rendering page [1], yet I did not try it on the development branch for lack of time to install it (can anyone try?).

[1] http://cdn.mathjax.org/mathjax/latest/test/sample-dynamic.html

@pkra
Copy link
Contributor

pkra commented Jan 27, 2015

Thank you for reporting the issue! (I've modified your posting to escape the TeX). We'll look into it.

@pkra pkra added Accepted Issue has been reproduced by MathJax team Investigate labels Jan 27, 2015
@dpvc
Copy link
Member

dpvc commented Jan 27, 2015

For now you can use

\left\{q\in {Q'} \middle| P(q)\right\}

to get the result you are looking for. There is a problem with how \middle detects whether it is within \left...\right (obviously).

@pkra pkra removed the Investigate label Apr 15, 2015
@pkra pkra added this to the A future release milestone Apr 15, 2015
@dpvc dpvc modified the milestones: MathJax v2.x.x, A future release May 4, 2016
dpvc added a commit to dpvc/MathJax that referenced this issue Jun 7, 2016
…ll be consistent with TeX's version (e.g., \mathrel{}\middle|\mathrel{} will produce the right spacing). As a side effect, this resolves the problem with the quotes, sot this resolves issue mathjax#1023.
@dpvc
Copy link
Member

dpvc commented Jun 7, 2016

The issue1023 branch of my fork of MathJax resolves this issue (as well as a potential spacing problem with \middle).

dpvc added a commit that referenced this issue Jun 8, 2016
@dpvc
Copy link
Member

dpvc commented Jun 8, 2016

==> Merged.

@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Jun 8, 2016
@dpvc dpvc closed this as completed Jun 8, 2016
dpvc added a commit to mathjax/MathJax-test that referenced this issue Aug 5, 2016
@dpvc
Copy link
Member

dpvc commented Aug 5, 2016

==> In testsuite

LaTeXToMathML/delimiters/issue1023.html

@dpvc dpvc added v2.7 Fixed and removed Merged Merged into develop branch labels Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7
Projects
None yet
Development

No branches or pull requests

3 participants