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

comma for "decimal point" not recognized in \hspace #856

Closed
davidfarmer opened this issue Jul 8, 2014 · 8 comments

Comments

Projects
None yet
4 participants
@davidfarmer
Copy link

commented Jul 8, 2014

I was processing a LaTeX file that contained
\hspace{0,5cm}
in an equation. This gave a MathJax error: Missing dimension or its units for \hspace.

The answer to issue #169 described a way to switch from US to European notation
for numbers. I couldn't tell if that would make a difference in my case, but what I would
really like is for either notation to work in all cases, because it is nontrivial for me to
detect which notation is used be a particular author (I am using MathJax to display the
math in papers written by other people).

@pkra

This comment has been minimized.

Copy link
Member

commented Jul 8, 2014

#169 is about content, not parameters, so it doesn't quite compare.

How does this work on the TeX side? Via the babel package?

Adding a configuration option for this wouldn't be hard (I'm guessing all it takes is modifying GetDimen but we might want to think about a more general internationalization extension along the lines of babel.

@davidcarlisle

This comment has been minimized.

Copy link

commented Jul 8, 2014

On 8 July 2014 08:05, Peter Krautzberger notifications@github.com wrote:

#169 #169 is about content,
not parameters, so it doesn't quite compare.

How does this work on the TeX side? Via the babel package?

No . and , are always part of the basic syntax of a as parsed by
tex-the program
even in classic 7bit tex with no internationalisation.

David

@pkra

This comment has been minimized.

Copy link
Member

commented Jul 8, 2014

Thanks, @davidcarlisle. Just to double check: you're saying that TeX accepts both . and , as decimal points? (In other words, this is an actual bug.)

@davidcarlisle

This comment has been minimized.

Copy link

commented Jul 8, 2014

On 8 July 2014 09:22, Peter Krautzberger notifications@github.com wrote:

Thanks, @davidcarlisle https://github.com/davidcarlisle. Just to double
check: you're saying that TeX accepts both . and , as decimal points? (In
other words, this is an actual bug.)

Well MathJax defines the limits on how far it emulates TeX syntax, so it's
not for me to say it is a bug or not but tex always accepts both , and .
when parsing for lengths see for example this plain TeX session where I set
a length using comma and it is reported using a full stop

This is TeX, Version 3.14159265 (TeX Live 2014) (preloaded format=tex)
**\dimen0=2,3pt

*\showthe\dimen0

2.3pt.
<*> \showthe\dimen0

? x
No pages of output.
Transcript written on texput.log.

http://dpcarlisle.blogspot.com/

@pkra

This comment has been minimized.

Copy link
Member

commented Jul 8, 2014

Thank, David. I think we will want to fix that.

@dpvc

This comment has been minimized.

Copy link
Member

commented Aug 18, 2014

The issue856 branch of my fork of MathJax includes a fix for this.

@dpvc dpvc added this to the Next Release milestone Aug 18, 2014

dpvc pushed a commit to dpvc/MathJax that referenced this issue Aug 19, 2014

@dpvc

This comment has been minimized.

Copy link
Member

commented Aug 19, 2014

==> Merged.

@dpvc dpvc closed this Aug 19, 2014

@dpvc dpvc added Merged and removed Ready for Review labels Aug 19, 2014

dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Jan 17, 2015

@dpvc dpvc added Test Available and removed Test Needed labels Jan 17, 2015

@dpvc

This comment has been minimized.

Copy link
Member

commented Jan 17, 2015

==> In Testsuite

LaTeXToMathML/issue856.html

@dpvc dpvc added Fixed v2.5 and removed Merged labels Jan 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.