hi, context in combination with luatex is quite the way to go for me, but i have one thing that i would love to see inside context: unicode-mathhttp://github.com/wspr/unicode-math! the guys there are making a good job of mapping tons of unicode sequences to latex commands, so we should really profit from this project. is it possible to integrate it into context or to create a package for this purpose? i would love to write $y = x² ± 2µ ⇒ y ≠ √{α ⁄ 5}$, while still being able to write $y = x^2 \pm 2\mu \Rightarrow y \neq \frac{α \over 5}$ or any combination of the two. i would too love to participate in a project making this possible, but i don’t know how to start coding (i could only write a preprocessor in python doing this, but that would be rather a workaround than the true thing.) thanks, phil PS: the ⁄ i used is a „fraction slash“, not a simple solidus, which of course would still be rendered as solidus.
Philipp A. wrote:
hi, context in combination with luatex is quite the way to go for me, but i have one thing that i would love to see inside context: unicode-mathhttp://github.com/wspr/unicode-math! the guys there are making a good job of mapping tons of unicode sequences to latex commands, so we should really profit from this project.
is it possible to integrate it into context or to create a package for this purpose? i would love to write $y = x² ± 2µ ⇒ y ≠ √{α ⁄ 5}$, while still being able to write $y = x^2 \pm 2\mu \Rightarrow y \neq \frac{α \over 5}$ or any combination of the two.
Most of the tedious work is already there: your test above actually renders something, because the unicode math characters in context mkiv are all (or at least almost all) defined to render themselves as math glyphs. What is missing is the mapping of the special constructs like √{a⁄b} -> \frac{a}{b} so if you can extract a list of those from the unicode-math project, it would be pretty straightforward to add support for this kind of input, I think. Best wishes, Taco
Hi Philipp
context in combination with luatex is quite the way to go for me, but i have one thing that i would love to see inside context: unicode-mathhttp://github.com/wspr/unicode-math! the guys there are making a good job of mapping tons of unicode sequences to latex commands, so we should really profit from this project.
i once took a look at the tables of stix and ams and then decided to follow another route - we collect all info in char-def, also math related info - we want to be able to support field specific setups (similar to what openmath does) and the machinery is mostly there already - we don't follow latex although we try to be ams math compatible - support like that is not that much related to \commands (and mapping them) as we already support direct mapping etc - we have a different way of organizing the math symbols and alphabets in context (mkii is more traditional)
is it possible to integrate it into context or to create a package for this purpose? i would love to write $y = x² ± 2µ ⇒ y ≠ √{α ⁄ 5}$, while still being able to write $y = x^2 \pm 2\mu \Rightarrow y \neq \frac{α \over 5}$ or any combination of the two.
sure, but it's unlikely to happen before there is an lmtypewriter font that has those shapes so that i can see it on my screen (lm/gyre math) .. it's simply too painful to debug and we also need to be able to use such symbols in documentation there are a few problems: (1) $y = x² ± 2$ -> we had some discussion about remapping the superiors and didn't reach a conclusion yet (as it is only a limited set); this is not going to happen at the input level but will be done by analysing the math list (just as is done with other things), so here it's mostly a matter of making a decision (2) √{α ⁄ 5}$ -> the / (or \over) is somewhat special ... if / is inline, then it's ok but do we want something for display as well (3) in the above the root is somewhat special as it is the text root symbols and if we support that we should also provide escapes to get that literal one (4) at microsoft they came up with an input method that makes sense as well so maybe i will implement that one some day (5) the { } still do grouping but maybe we want ( ) and some automated way (as in mathml) to omit them if possible so, for me math is part of a bigger picture: mathml, alternative input, not per se sticking to tex conventions etc
i would too love to participate in a project making this possible, but i don’t know how to start coding (i could only write a preprocessor in python doing this, but that would be rather a workaround than the true thing.)
the right way is adding missing info to char-def.lua and that happens under tight control (read stepwise as we need to test things); so, if you find missing mapping, just collect them and let us know (normally aditya does the checking of the math symbols) so there is not so much coding needed but mostly identification (the same is true for symbols that are someplace in fonts but not yet mapped in the virtual font mapper) so that's the place to start looking Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
i’m quite excited to find out that most of what i want is already in mkiv!
regarding the problems you mentioned:
1. the super/subscripts could be interpreted like x²³₄₅ → x^{23}_{45} or
couldn’t they? if you want to do more complex stuff (more than one level of
super/subscripting), the super/subscripts are only for the last level:
x^{2³}_{4₅} → x^{2^3}_{4_5}
2. maybe the use of unicode fractions and sfrac as a fallback would be
nice for inline math: 4 ⁄ 5 → ⅘, 8 ⁄ 9 → \sfrac89. for display it would
be {4 \over 5} and {8 \over 9} (maybe i don’t get your point: isn’t \over
context’s way of doing fractions?)
3. you mean “\√” yields “√”? of course! it’s like a “&” or a “\”, then.
4. you mean thishttp://www.unicode.org/notes/tn28/UTN28-PlainTextMath-v2.pdf.
nice thing, worth more than one look! maybe really the direction of the
future?
5. the parentheses like you suggested are in the above document, too.
thank you for the nice answer,
phil
PS: with the use of a compose key, the input of math symbols is quite
straightforward: <compose>45 → ⅘, <compose>/= → ≠, …
2010/2/11 Hans Hagen
Hi Philipp
context in combination with luatex is quite the way to go for me, but i
have one thing that i would love to see inside context: unicode-mathhttp://github.com/wspr/unicode-math!
the guys there are making a good job of mapping tons of unicode sequences to latex commands, so we should really profit from this project.
i once took a look at the tables of stix and ams and then decided to follow another route
- we collect all info in char-def, also math related info - we want to be able to support field specific setups (similar to what openmath does) and the machinery is mostly there already - we don't follow latex although we try to be ams math compatible - support like that is not that much related to \commands (and mapping them) as we already support direct mapping etc - we have a different way of organizing the math symbols and alphabets in context (mkii is more traditional)
is it possible to integrate it into context or to create a package for
this purpose? i would love to write $y = x² ± 2µ ⇒ y ≠ √{α ⁄ 5}$, while still being able to write $y = x^2 \pm 2\mu \Rightarrow y \neq \frac{α \over 5}$ or any combination of the two.
sure, but it's unlikely to happen before there is an lmtypewriter font that has those shapes so that i can see it on my screen (lm/gyre math) .. it's simply too painful to debug and we also need to be able to use such symbols in documentation
there are a few problems:
(1) $y = x² ± 2$ -> we had some discussion about remapping the superiors and didn't reach a conclusion yet (as it is only a limited set); this is not going to happen at the input level but will be done by analysing the math list (just as is done with other things), so here it's mostly a matter of making a decision
(2) √{α ⁄ 5}$ -> the / (or \over) is somewhat special ... if / is inline, then it's ok but do we want something for display as well
(3) in the above the root is somewhat special as it is the text root symbols and if we support that we should also provide escapes to get that literal one
(4) at microsoft they came up with an input method that makes sense as well so maybe i will implement that one some day
(5) the { } still do grouping but maybe we want ( ) and some automated way (as in mathml) to omit them if possible
so, for me math is part of a bigger picture: mathml, alternative input, not per se sticking to tex conventions etc
i would too love to participate in a project making this possible, but i
don’t know how to start coding (i could only write a preprocessor in python doing this, but that would be rather a workaround than the true thing.)
the right way is adding missing info to char-def.lua and that happens under tight control (read stepwise as we need to test things); so, if you find missing mapping, just collect them and let us know (normally aditya does the checking of the math symbols)
so there is not so much coding needed but mostly identification (the same is true for symbols that are someplace in fonts but not yet mapped in the virtual font mapper) so that's the place to start looking
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 11-2-2010 12:12, Philipp A. wrote:
i’m quite excited to find out that most of what i want is already in mkiv! regarding the problems you mentioned:
1. the super/subscripts could be interpreted like x²³₄₅ → x^{23}_{45} or couldn’t they? if you want to do more complex stuff (more than one level of super/subscripting), the super/subscripts are only for the last level: x^{2³}_{4₅} → x^{2^3}_{4_5}
i can look into it ... but it's up to you to provide some test files first so that we can determine to what extend we go
2. maybe the use of unicode fractions and sfrac as a fallback would be nice for inline math: 4 ⁄ 5 → ⅘, 8 ⁄ 9 → \sfrac89. for display it would be {4 \over 5} and {8 \over 9} (maybe i don’t get your point: isn’t \over context’s way of doing fractions?)
well, we could also support display but we might pose some restrictions 2a / b vs 2 a/b
3. you mean “\√” yields “√”? of course! it’s like a “&” or a “\”, then.
indeed, but introducing more commands like \√ might not be the way to go as we try to get rid of & etc being special (i've even be thinking os some special unicode char, maybe a private pair, for $ $ replacement
4. you mean thishttp://www.unicode.org/notes/tn28/UTN28-PlainTextMath-v2.pdf. nice thing, worth more than one look! maybe really the direction of the future?
indeed and as with cambria it's microsoft currently leading the way .. in my opinion the tex math community lost the lead long ago so we have to follow now (stix is a good example ... we could probably easily test those fonts in mkiv but no one cares) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
2010/2/11 Hans Hagen
On 11-2-2010 12:12, Philipp A. wrote:
i’m quite excited to find out that most of what i want is already in mkiv! regarding the problems you mentioned:
1. the super/subscripts could be interpreted like x²³₄₅ → x^{23}_{45} or couldn’t they? if you want to do more complex stuff (more than one level of super/subscripting), the super/subscripts are only for the last level: x^{2³}_{4₅} → x^{2^3}_{4_5}
i can look into it ... but it's up to you to provide some test files first so that we can determine to what extend we go
if you want me to provide test files, shall i simply think of complicated cases and put them togeter between \starttext and \stoptext in a tex(t)file?
2. maybe the use of unicode fractions and sfrac as a fallback would be
nice for inline math: 4 ⁄ 5 → ⅘, 8 ⁄ 9 → \sfrac89. for display it would be {4 \over 5} and {8 \over 9} (maybe i don’t get your point: isn’t \over context’s way of doing fractions?)
well, we could also support display but we might pose some restrictions
2a / b
vs
2 a/b
i have no idea how to do the grouping. openoffice avoids the stuff mostly, but i can’t wrap my mind about the rules. when writing stuff with openoffice (i seldomly do it), i just avoid braces and fix all display errors afterwards. 3. you mean “\√” yields “√”? of course! it’s like a “&” or a “\”, then.
indeed, but introducing more commands like \√ might not be the way to go as we try to get rid of & etc being special (i've even be thinking os some special unicode char, maybe a private pair, for $ $ replacement
ok, that’s an interesting direction to go. i didn’t try context too hard, because i write exams in a week and shouldn’t be writing this but rather learning biochemistry ;) 4. you mean this<
http://www.unicode.org/notes/tn28/UTN28-PlainTextMath-v2.pdf>.
nice thing, worth more than one look! maybe really the direction of the future?
indeed and as with cambria it's microsoft currently leading the way .. in my opinion the tex math community lost the lead long ago so we have to follow now (stix is a good example ... we could probably easily test those fonts in mkiv but no one cares)
Hans
what do you mean with “no one cares?” no one cares about context or about stix or about context testing stix? it’s sad that the inferior approach gained the lead, but we don’t lose our advantage: we don’t have to make compromises in the layout beause noone expects a document updating in real time when a word is inserted in the first paragraph. we are the ones with the fine-grained control over every aspect of our typesetting and so we won’t be obsoleted by word. microsoft doesn’t like open source, but everyone owning windows can use cambria math and since the microsoft document above shows no patented stuff, we can use that, too, if we like it. phil
On 11-2-2010 12:49, Philipp A. wrote:
2010/2/11 Hans Hagen
On 11-2-2010 12:12, Philipp A. wrote:
i’m quite excited to find out that most of what i want is already in mkiv! regarding the problems you mentioned:
1. the super/subscripts could be interpreted like x²³₄₅ → x^{23}_{45} or couldn’t they? if you want to do more complex stuff (more than one level of super/subscripting), the super/subscripts are only for the last level: x^{2³}_{4₅} → x^{2^3}_{4_5}
i can look into it ... but it's up to you to provide some test files first so that we can determine to what extend we go
if you want me to provide test files, shall i simply think of complicated cases and put them togeter between \starttext and \stoptext in a tex(t)file?
indeed, and name them umath-001.tex etc
i have no idea how to do the grouping. openoffice avoids the stuff mostly, but i can’t wrap my mind about the rules. when writing stuff with openoffice (i seldomly do it), i just avoid braces and fix all display errors afterwards.
the problem is always "if i put my cursor here, and insert something where am i" (just before or just after entering some mode) we should only implement robust cases
indeed, but introducing more commands like \√ might not be the way to go as we try to get rid of& etc being special (i've even be thinking os some special unicode char, maybe a private pair, for $ $ replacement
ok, that’s an interesting direction to go. i didn’t try context too hard, because i write exams in a week and shouldn’t be writing this but rather learning biochemistry ;)
well ... in that case ... imagine that you have to typeset Stryer -)
what do you mean with “no one cares?” no one cares about context or about stix or about context testing stix?
in general ... no beta fonts send out to texies who are operating in this fiels, no involvement of the gyre math folks, etc ok, supporting it is rather trivial i expect especially as they have to follow cambria
it’s sad that the inferior approach gained the lead, but we don’t lose our advantage: we don’t have to make compromises in the layout beause noone expects a document updating in real time when a word is inserted in the first paragraph. we are the ones with the fine-grained control over every aspect of our typesetting and so we won’t be obsoleted by word.
sure, and with tex we have full control over all aspects (and i definitely don't want context to stick to the frozen tex ways of doing math)
microsoft doesn’t like open source, but everyone owning windows can use cambria math and since the microsoft document above shows no patented stuff, we can use that, too, if we like it.
indeed ... for luatex (and the gyre math project) cambria is the benchmark Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
what do you mean with “no one cares?” no one cares about context or about stix or about context testing stix?
in general ... no beta fonts send out to texies who are operating in this fiels, no involvement of the gyre math folks, etc
ok, supporting it is rather trivial i expect especially as they have to follow cambria
Well, we should give them another decade for implementing that.
On 11-2-2010 15:35, Oliver Buerschaper wrote:
in general ... no beta fonts send out to texies who are operating in this fiels, no involvement of the gyre math folks, etc
But you did see the fonts at some point already, didn't you?
i only saw the list of type 1 files and organziation of fonts and decided not to waste time on that if eventually opentype would show up Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, Feb 11, 2010 at 01:37:12PM +0100, Hans Hagen wrote:
what do you mean with “no one cares?” no one cares about context or about stix or about context testing stix?
in general ... no beta fonts send out to texies who are operating in this fiels, no involvement of the gyre math folks, etc
ok, supporting it is rather trivial i expect especially as they have to follow cambria
Well, I'm (secretly) planning for a beta OpenType MATH, STIX based font the week they release the first version, assuming I'm still alive by then. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
indeed and as with cambria it's microsoft currently leading the way .. in my opinion the tex math community lost the lead long ago so we have to follow now (stix is a good example ... we could probably easily test those fonts in mkiv but no one cares)
Sad, but true. TeX needs to catch up. However, looking at Microsoft's math booklet I find a number of samples rather unsatisfactory. So if the booklet reflects the current state of the art then in my opinion there will still be ample room for improving the typographic quality of math. TeX could jump ahead and fill the innovation gap again. Oliver
participants (5)
-
Hans Hagen
-
Khaled Hosny
-
Oliver Buerschaper
-
Philipp A.
-
Taco Hoekwater