Community Wishlist Survey 2019/Editing/Make the math tag support non-Latin languages
Make the math tag support non-Latin languages
- Problem: There should be a public plugin on web for putting LaTaX into Chinese, so it is not difficult to implement the content in zh supporting wikis modified by the <math> tag (that is, the "mathematical formula" function).
(网络上应该有公开的使LaTaX中文化的插件,所以私以为使<math>标签所修饰内容(也就是“数学公式”功能”)支持中文应该是不难实现的).)
- Who would benefit:
- Proposed solution:
- Phabricator tickets: T50032
- Proposer: 脂肪酸钠 (talk) 15:08, 4 November 2018 (UTC)
Discussion
This was posted in Chinese. I've translated it into English, but kept the original Chinese. --Omotecho (talk) 16:21, 6 November 2018 (UTC)
- @脂肪酸钠: Could you provide an example what "putting LaTeX into Chinese" means? Basically LaTeX is a file format, and Chinese are languages and scripts, so I am not sure I understand what is requested here and how these two are related. Thanks a lot! --AKlapper (WMF) (talk) 03:28, 7 November 2018 (UTC)
- I think it's supposed to be "put the Chinese into the math", not "put the math into the Chinese"? Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/meta.wikimedia.org/v1/":): {\displaystyle 标 = 签} <- doesn't work too well. --Izno (talk) 04:21, 7 November 2018 (UTC)
- @Izno:You are right. Thanks. 脂肪酸钠 (talk) 07:33, 7 November 2018 (UTC)
- Comment allow me to indent a few lines below so that discussion is better threaded. 10:50, 7 November 2018 (UTC) -->
- OK.脂肪酸钠 (talk) 11:16, 7 November 2018 (UTC)
- Example:
<chem>2H2{+}O2->[点燃]2H2O</chem>
- present output: Failed to parse (syntax error): {\displaystyle \ce{2H2{+}O2->[点燃] 2H_2O}}
- or,
- Comment expected output: in zh as: 2H2+O2—点燃—>2H2O
- Over here, TeX does not support Chinese. 脂肪酸钠 (talk) 07:33, 7 November 2018 (UTC)
- Comment @脂肪酸钠: kindly check if my edit above is correct. I am trying to support you convey your idea in en as a translator.this proposal might benefit local languages, if LaTex shows in local language. Thank you to post your idea. Omotecho (talk) 10:50, 7 November 2018 (UTC)
- It's perfect.脂肪酸钠 (talk) 11:16, 7 November 2018 (UTC)
- Comment @脂肪酸钠: kindly check if my edit above is correct. I am trying to support you convey your idea in en as a translator.this proposal might benefit local languages, if LaTex shows in local language. Thank you to post your idea. Omotecho (talk) 10:50, 7 November 2018 (UTC)
- or,
- As a note, this isn't just Chinese--there are a number of languages with this problem. I've added the Phabricator task. --Izno (talk) 13:08, 7 November 2018 (UTC)
- For Chinese, it would be nice if Chinese styling commands can be supported. C933103 (talk) 16:01, 13 November 2018 (UTC)
@脂肪酸钠: Thank you for all your input. We are kind of working on this, but unfortunately it takes very long and it would be awesome if we could get some support from WMF (see phab:T195861 and Community Wishlist Survey 2019/Reading/Functional and beautiful math for everyone). If you just want to avoid the error, you can use <chem>2H2{} + O2 ->[\text{点燃}] 2H2O</chem>
:
However in most browsers, the rendering of 点燃 is very bad which is due to our current math extension setup. This means for a proper solution of the issue, we do not only need to remove the texvcjs which is responsible for the error, but we also need a better rendering that is equivalent to the client-side html rendering other websites use.
Side remark: Please do not use the old workaround with curly brackets around the plus anymore. Apart from removing the normal spacing this can render completely different in some cases. We are planning to make it work according to the specifications without workarounds, i.e. <chem>2H2 + O2 ->[点燃] 2H2O</chem>
[1] (you can test the normal behavior at the bottom with \ce{2H2 + O2 ->[点燃] 2H2O})
and for this currently replacing those kind of workarounds with the workaround I used above, because that is a workaround which renders the same without texvcjs (the culprit for falsely removing necessary spaces) and up-to-date mhchem (without bug in {} implementation).
Please also do not try to fix the bad text rendering with workarounds like <chem>2H2{} + O2 ->[\mbox{点}\;\,\mbox{燃}] 2H2O</chem>
:
because that will probably look bad for other people and look even worse if one day those rendering problems are fixed.
I would be very happy if you want to support us in phab:T195861, (testing different rendering solutions/devices, give some feedback, replacement work, investigating strange errors, code-review, translation and information for editors...).--Debenben (talk) 13:25, 15 November 2018 (UTC)
- @Debenben: Your first style of "点燃" makes the ~10% right part of "点" and ~10% left part of "燃" overlapped-rendered (which by using that on zhwiki locally, you will trigger an AbuseFilter and so you can't publish your edits). Please, use your second example instead. --Liuxinyu970226 (talk) 04:32, 17 November 2018 (UTC)
- "Make LaTeX use UTF-8, properly, natively"... what a wonderful idea. Apart from anything else, sometimes one wishes to cite people whose names are not straight ASCII characters! But as I recall this has a long history... there are kludges, but LaTeX3 has been in the works for over a quarter-century.[2] I'm not sure why, but something must be difficult. HLHJ (talk) 06:42, 18 November 2018 (UTC)
- Well, it works on math.stackexchange.com and 70000 other websites [3] so I would say it is feasible. We just have to use MathJax the right way and for this we might need some help to integrate it properly into the resource loader.--Debenben (talk) 20:57, 19 November 2018 (UTC)
Voting
- Support Debenben (talk) 18:28, 16 November 2018 (UTC)
- Support Boehm (talk) 18:57, 16 November 2018 (UTC)
- Support Please add support for Arabic script 4nn1l2 (talk) 02:01, 17 November 2018 (UTC)
- Support Cohaf (talk) 02:03, 17 November 2018 (UTC)
- Support Liuxinyu970226 (talk) 04:29, 17 November 2018 (UTC)
- Support Leiem (talk) 05:47, 17 November 2018 (UTC)
- Support JAn Dudík (talk) 20:15, 17 November 2018 (UTC)
- Support, but only if reasonably technically feasible. HLHJ (talk) 06:42, 18 November 2018 (UTC)
- Support NMaia (talk) 10:24, 18 November 2018 (UTC)
- Support Shizhao (talk) 02:46, 19 November 2018 (UTC)
- Support Zeromonk (talk) 08:22, 19 November 2018 (UTC)
- Support Emptyfear (talk) 15:42, 19 November 2018 (UTC)
- Support Paweł Ziemian (talk) 21:11, 19 November 2018 (UTC)
- Support BugWarp (talk) 01:11, 20 November 2018 (UTC)
- Support For Cyrillic this also will be very useful. Shmurak (talk) 08:50, 20 November 2018 (UTC)
- Support → «« Man77 »» [de] 13:05, 20 November 2018 (UTC)
- Support Novak Watchmen (talk) 01:10, 21 November 2018 (UTC)
- Support Vulphere 05:56, 21 November 2018 (UTC)
- Support Conny (talk) 15:18, 21 November 2018 (UTC)
- Support Ji.rodriguezmarin (talk) 20:24, 21 November 2018 (UTC)
- Support Sannita - not just another it.wiki sysop 00:43, 24 November 2018 (UTC)
- Support Hmxhmx 11:03, 24 November 2018 (UTC)
- Support Uanfala (talk) 19:57, 24 November 2018 (UTC)
- Support Alexei Kopylov (talk) 20:06, 24 November 2018 (UTC)
- Support WhatamIdoing (talk) 18:15, 26 November 2018 (UTC)
- Support Amir E. Aharoni (talk) 09:26, 27 November 2018 (UTC)
- Support APh (talk) 11:37, 28 November 2018 (UTC)
- Support Saederup92 (talk) 12:14, 28 November 2018 (UTC)
- Support Tacsipacsi (talk) 17:22, 30 November 2018 (UTC)