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

Closed
opened this issue Jul 8, 2014 · 8 comments

Projects
None yet
4 participants

### davidfarmer 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).
Member

### pkra 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 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
Member

### pkra 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 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/
Member

### pkra commented Jul 8, 2014

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

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

 Allow commas in place of decimals in TeX dimensions. Resolves issue m… 
…athjax#856.
 4fb5c5e 

Member

### dpvc commented Aug 18, 2014

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

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

 Merge branch 'issue856' into develop. Issue mathjax#856. 
 6ba49d6 
Member

### dpvc commented Aug 19, 2014

 ==> Merged.

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

 Test for allowing comma as decimal in dimensions. (mathjax/MathJax#856) 
 0ccabea 

Member

### dpvc commented Jan 17, 2015

 ==> In Testsuite LaTeXToMathML/issue856.html