Dear all, The \blacktriangle and \blacktriangledown symbol seem to be missing, though \blacktriangleright and \...-left are defined. Is there a quick way to add missing symbols by myself from the knowledge of Unicode / XML identifier (http://www-sop.inria.fr/marelle/tralics/doc-b.html)? Cheers, Andreas
On Tue, 17 Jul 2012, Andreas Mang wrote:
Dear all,
The \blacktriangle and \blacktriangledown symbol seem to be missing, though \blacktriangleright and \...-left are defined. Is there a quick way to add missing symbols by myself from the knowledge of Unicode / XML identifier (http://www-sop.inria.fr/marelle/tralics/doc-b.html)?
For opentype math fonts, have a look at char-def.lua. To add missing symbols, you need to add appropriate fields in the lua table. The hard part is verifying the symbol to unicode slot mapping (the list at tralics is not always consistent with the ams list that is used by unicode-math package). If you know the right mappings, add a patch to char-def.lua and send it to the list (or the dev-context list); otherwise, just send the mappings and I can add them to the lua table. Aditya
Hi Aditya, Thanks for the advice. As I am a newby, I'd decided to respond to the list: I had a look at "char-def.lua" and I think the only thing that needs to be done is to add mathname="blacktriangle", to [0x25B4]={ adobename="blackuppointingsmalltriangle", category="so", description="BLACK UP-POINTING SMALL TRIANGLE", direction="on", linebreak="al", unicodeslot=0x25B4, }, The unicodeslot is consistent to what I've found in the famous WWW http://www.fileformat.info/info/unicode/char/25b4/index.htm Same goes for [0x25BE]={ category="so", description="BLACK DOWN-POINTING SMALL TRIANGLE", direction="on", linebreak="al", unicodeslot=0x25BE, }, with mathname="blacktriangledown" under the assumption you'd like to be consistent with the naming convention of latex. Right? Cheers, Andreas On Jul 17, 2012, at 7:39 PM, Aditya Mahajan wrote:
On Tue, 17 Jul 2012, Andreas Mang wrote:
Dear all,
The \blacktriangle and \blacktriangledown symbol seem to be missing, though \blacktriangleright and \...-left are defined. Is there a quick way to add missing symbols by myself from the knowledge of Unicode / XML identifier (http://www-sop.inria.fr/marelle/tralics/doc-b.html)?
For opentype math fonts, have a look at char-def.lua. To add missing symbols, you need to add appropriate fields in the lua table.
The hard part is verifying the symbol to unicode slot mapping (the list at tralics is not always consistent with the ams list that is used by unicode-math package). If you know the right mappings, add a patch to char-def.lua and send it to the list (or the dev-context list); otherwise, just send the mappings and I can add them to the lua table.
Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- Andreas Mang, MSc Research Associate UNIVERSITY OF LUEBECK INSTITUTE OF MEDICAL ENGINEERING Division of Computer Science, Engineering and Natural Sciences Ratzeburger Allee 160, Building 64 23562 Luebeck, Germany Phone: +49 (0) 451 500 5416 Fax: +49 (0) 451 500 5403 mang@imt.uni-luebeck.de http://www.imt.uni-luebeck.de
On 17-7-2012 20:41, Andreas Mang wrote:
Hi Aditya,
Thanks for the advice. As I am a newby, I'd decided to respond to the list:
I had a look at "char-def.lua" and I think the only thing that needs to be done is to add
mathname="blacktriangle",
to
[0x25B4]={ adobename="blackuppointingsmalltriangle", category="so", description="BLACK UP-POINTING SMALL TRIANGLE", direction="on", linebreak="al", unicodeslot=0x25B4, },
why not 25B2 (the bigger one)
The unicodeslot is consistent to what I've found in the famous WWW
http://www.fileformat.info/info/unicode/char/25b4/index.htm
Same goes for
[0x25BE]={ category="so", description="BLACK DOWN-POINTING SMALL TRIANGLE", direction="on", linebreak="al", unicodeslot=0x25BE, },
with mathname="blacktriangledown" under the assumption you'd like to be consistent with the naming convention of latex.
or 25BC (the bigger one) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans,
On 17-7-2012 20:41, Andreas Mang wrote:
mathname="blacktriangle",
to
[0x25B4]={ adobename="blackuppointingsmalltriangle", category="so", description="BLACK UP-POINTING SMALL TRIANGLE", direction="on", linebreak="al", unicodeslot=0x25B4, },
why not 25B2 (the bigger one)
[0x25BE]={ category="so", description="BLACK DOWN-POINTING SMALL TRIANGLE", direction="on", linebreak="al", unicodeslot=0x25BE, },
with mathname="blacktriangledown" under the assumption you'd like to be consistent with the naming convention of latex.
or 25BC (the bigger one)
To make it short: I think Hans is correct. From my perspective there is an error in char-def.lua for "blacktriangleleft" and secondly the internet page I have looked this up is not consistent with what is implemented in ConTeXt, both facts of which lead me into the wrong direction (see below (P.S.), if you are interested). Both, http://www.unicodemap.org/details/0x25B2/index.html and http://www.unicodemap.org/details/0x25BC/index.html look consistent to "\blacktriangleright" (which I am already using in my document): http://www.unicodemap.org/details/0x25B6/index.html Cheers, Andreas P.S.: When I started to look into this I thought it might be possilble to define some command in the preamble of my document that uses unicode. From searching the internet I found http://www-sop.inria.fr/marelle/tralics/doc-b.html which says "The \blacktriangle command is valid only in math mode. Its translation is <mo>▴</mo> (Unicode U+25B4, ▴)". However, there indeed is a problem (which I have not spotted in the first place). I had a look at char-def.lua which at first confirmed my impression on using small triangels: [0x25B8]={ category="so", description="BLACK RIGHT-POINTING SMALL TRIANGLE", direction="on", linebreak="al", mathclass="bin", mathname="blacktriangleleft", unicodeslot=0x25B8, }, However, this is not consistent with what you can find on the internetpage from above, since it "0x25B8" should be "blacktriangleright" "The \blacktriangleright command is valid only in math mode. Its translation is <mo>▸</mo> (Unicode U+25B8, ▸)." Secondly, the \triangleleft, which I have not used before, does not work (at least for me ConTeXt ver: 2012.07.10 09:52 MKIV fmt: 2012.7.15 int: english/english): simple example: %%%%%%%%%%%% \starttext $\blacktriangleleft$ % does not appear $\blacktriangleright$ % works \stoptext %%%%%%%%%%%% For the blacktriangleright we have: [0x25B6]={ adobename="blackrightpointingtriangle", category="so", cjkwd="a", description="BLACK RIGHT-POINTING TRIANGLE", direction="on", linebreak="ai", mathclass="bin", mathname="blacktriangleright", unicodeslot=0x25B6, }, which is _not_ consistent with "The \blacktriangleright command is valid only in math mode. Its translation is <mo>▸</mo> (Unicode U+25B8, ▸)." However, looking at http://www.unicodemap.org/details/0x25B6/index.html and given the fact that "blacktriangleright" works nicely, I'd assume that Hans is correct and it indeed is not the small ones but the big tirangles.
Hi, I uploaded a new beta .. still not ok I guess: \setuplayout[header=0pt,footer=0pt,height=middle,width=middle] \setupbodyfont[dejavu,10pt] \startbuffer \starttabulate[|||pT|] \HL \NC \type{\blacktriangle } \NC \blacktriangle \NC \meaning\blacktriangle \NC \NR \NC \type{\blacktriangledown } \NC \blacktriangledown \NC \meaning\blacktriangledown \NC \NR \NC \type{\blacktriangleleft } \NC \blacktriangleleft \NC \meaning\blacktriangleleft \NC \NR \NC \type{\blacktriangleright} \NC \blacktriangleright \NC \meaning\blacktriangleright \NC \NR \HL \NC \type{\triangle } \NC \triangle \NC \meaning\triangle \NC \NR \NC \type{\bigtriangleup} \NC \bigtriangleup \NC \meaning\bigtriangleup \NC \NR \NC \type{\triangledown } \NC \triangledown \NC \meaning\triangledown \NC \NR \NC \type{\bigtriangledown} \NC \bigtriangledown \NC \meaning\bigtriangledown \NC \NR \NC \type{\triangleleft } \NC \triangleleft \NC \meaning\triangleleft \NC \NR \NC \type{\triangleright} \NC \triangleright \NC \meaning\triangleright \NC \NR \HL \stoptabulate \stopbuffer \starttext \switchtobodyfont[modern-designsize] \subject{modern-designsize} \getbuffer \blank \switchtobodyfont[modern] \subject{modern} \getbuffer \blank \switchtobodyfont[xits] \subject{xits} \getbuffer \blank \switchtobodyfont[pagella] \subject{pagella} \getbuffer \blank \stoptext I tend to taking xits as reference. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi, Thanks Hans. It works for me :) Relating the output (\blacktriangleright and \blacktriangle) to some figure I have created with latex + tikz I do not see any difference. Cheers, Andreas Am Jul 18, 2012 um 10:37 AM schrieb Hans Hagen:
Hi,
I uploaded a new beta .. still not ok I guess:
\setuplayout[header=0pt,footer=0pt,height=middle,width=middle] \setupbodyfont[dejavu,10pt]
\startbuffer \starttabulate[|||pT|] \HL \NC \type{\blacktriangle } \NC \blacktriangle \NC \meaning\blacktriangle \NC \NR \NC \type{\blacktriangledown } \NC \blacktriangledown \NC \meaning\blacktriangledown \NC \NR \NC \type{\blacktriangleleft } \NC \blacktriangleleft \NC \meaning\blacktriangleleft \NC \NR \NC \type{\blacktriangleright} \NC \blacktriangleright \NC \meaning\blacktriangleright \NC \NR \HL \NC \type{\triangle } \NC \triangle \NC \meaning\triangle \NC \NR \NC \type{\bigtriangleup} \NC \bigtriangleup \NC \meaning\bigtriangleup \NC \NR \NC \type{\triangledown } \NC \triangledown \NC \meaning\triangledown \NC \NR \NC \type{\bigtriangledown} \NC \bigtriangledown \NC \meaning\bigtriangledown \NC \NR \NC \type{\triangleleft } \NC \triangleleft \NC \meaning\triangleleft \NC \NR \NC \type{\triangleright} \NC \triangleright \NC \meaning\triangleright \NC \NR \HL \stoptabulate \stopbuffer
\starttext
\switchtobodyfont[modern-designsize] \subject{modern-designsize} \getbuffer \blank \switchtobodyfont[modern] \subject{modern} \getbuffer \blank \switchtobodyfont[xits] \subject{xits} \getbuffer \blank \switchtobodyfont[pagella] \subject{pagella} \getbuffer \blank
\stoptext
I tend to taking xits as reference.
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
-- Andreas Mang, MSc Research Associate UNIVERSITY OF LUEBECK INSTITUTE OF MEDICAL ENGINEERING Division of Computer Science, Engineering and Natural Sciences Ratzeburger Allee 160, Building 64 23562 Luebeck, Germany Phone: +49 (0) 451 500 5416 Fax: +49 (0) 451 500 5403 mang@imt.uni-luebeck.de http://www.imt.uni-luebeck.de
On Wed, 18 Jul 2012, Hans Hagen wrote:
Hi,
I uploaded a new beta .. still not ok I guess:
I haven't checked the new beta, but FWIW, these are the slots that unicode-math package uses (I usually treat that as a reference): \UnicodeMathSymbol{"025B2}{\bigblacktriangleup }{\mathord}{black up-pointing triangle}% \UnicodeMathSymbol{"025B3}{\bigtriangleup }{\mathbin}{big up triangle, open}% \UnicodeMathSymbol{"025B4}{\blacktriangle }{\mathord}{up triangle, filled}% \UnicodeMathSymbol{"025B5}{\vartriangle }{\mathrel}{/triangle - up triangle, open}% \UnicodeMathSymbol{"025B6}{\blacktriangleright }{\mathord}{(large) right triangle, filled}% \UnicodeMathSymbol{"025B7}{\triangleright }{\mathbin}{(large) right triangle, open; z notation range restriction}% \UnicodeMathSymbol{"025B8}{\smallblacktriangleright }{\mathord}{right triangle, filled}% \UnicodeMathSymbol{"025B9}{\smalltriangleright }{\mathord}{right triangle, open}% \UnicodeMathSymbol{"025BA}{\blackpointerright }{\mathord}{black right-pointing pointer}% \UnicodeMathSymbol{"025BB}{\whitepointerright }{\mathord}{white right-pointing pointer}% \UnicodeMathSymbol{"025BC}{\bigblacktriangledown }{\mathord}{big down triangle, filled}% \UnicodeMathSymbol{"025BD}{\bigtriangledown }{\mathord}{big down triangle, open}% \UnicodeMathSymbol{"025BE}{\blacktriangledown }{\mathord}{down triangle, filled}% \UnicodeMathSymbol{"025BF}{\triangledown }{\mathord}{down triangle, open}% \UnicodeMathSymbol{"025C0}{\blacktriangleleft }{\mathord}{(large) left triangle, filled}% \UnicodeMathSymbol{"025C1}{\triangleleft }{\mathbin}{(large) left triangle, open; z notation domain restriction}% \UnicodeMathSymbol{"025C2}{\smallblacktriangleleft }{\mathord}{left triangle, filled}% \UnicodeMathSymbol{"025C3}{\smalltriangleleft }{\mathord}{left triangle, open}% Aditya
\setuplayout[header=0pt,footer=0pt,height=middle,width=middle] \setupbodyfont[dejavu,10pt]
\startbuffer \starttabulate[|||pT|] \HL \NC \type{\blacktriangle } \NC \blacktriangle \NC \meaning\blacktriangle \NC \NR \NC \type{\blacktriangledown } \NC \blacktriangledown \NC \meaning\blacktriangledown \NC \NR \NC \type{\blacktriangleleft } \NC \blacktriangleleft \NC \meaning\blacktriangleleft \NC \NR \NC \type{\blacktriangleright} \NC \blacktriangleright \NC \meaning\blacktriangleright \NC \NR \HL \NC \type{\triangle } \NC \triangle \NC \meaning\triangle \NC \NR \NC \type{\bigtriangleup} \NC \bigtriangleup \NC \meaning\bigtriangleup \NC \NR \NC \type{\triangledown } \NC \triangledown \NC \meaning\triangledown \NC \NR \NC \type{\bigtriangledown} \NC \bigtriangledown \NC \meaning\bigtriangledown \NC \NR \NC \type{\triangleleft } \NC \triangleleft \NC \meaning\triangleleft \NC \NR \NC \type{\triangleright} \NC \triangleright \NC \meaning\triangleright \NC \NR \HL \stoptabulate \stopbuffer
\starttext
\switchtobodyfont[modern-designsize] \subject{modern-designsize} \getbuffer \blank \switchtobodyfont[modern] \subject{modern} \getbuffer \blank \switchtobodyfont[xits] \subject{xits} \getbuffer \blank \switchtobodyfont[pagella] \subject{pagella} \getbuffer \blank
\stoptext
I tend to taking xits as reference.
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 17-7-2012 19:39, Aditya Mahajan wrote:
On Tue, 17 Jul 2012, Andreas Mang wrote:
Dear all,
The \blacktriangle and \blacktriangledown symbol seem to be missing, though \blacktriangleright and \...-left are defined. Is there a quick way to add missing symbols by myself from the knowledge of Unicode / XML identifier (http://www-sop.inria.fr/marelle/tralics/doc-b.html)?
For opentype math fonts, have a look at char-def.lua. To add missing symbols, you need to add appropriate fields in the lua table.
The hard part is verifying the symbol to unicode slot mapping (the list at tralics is not always consistent with the ams list that is used by unicode-math package). If you know the right mappings, add a patch to char-def.lua and send it to the list (or the dev-context list); otherwise, just send the mappings and I can add them to the lua table.
keep in mind that not all those black triangles in ams math ended up in unicode (future lm/gyre fonts might have some of these symbols) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, Jul 17, 2012 at 09:40:15PM +0200, Hans Hagen wrote:
On 17-7-2012 19:39, Aditya Mahajan wrote:
On Tue, 17 Jul 2012, Andreas Mang wrote:
Dear all,
The \blacktriangle and \blacktriangledown symbol seem to be missing, though \blacktriangleright and \...-left are defined. Is there a quick way to add missing symbols by myself from the knowledge of Unicode / XML identifier (http://www-sop.inria.fr/marelle/tralics/doc-b.html)?
For opentype math fonts, have a look at char-def.lua. To add missing symbols, you need to add appropriate fields in the lua table.
The hard part is verifying the symbol to unicode slot mapping (the list at tralics is not always consistent with the ams list that is used by unicode-math package). If you know the right mappings, add a patch to char-def.lua and send it to the list (or the dev-context list); otherwise, just send the mappings and I can add them to the lua table.
keep in mind that not all those black triangles in ams math ended up in unicode
AFAIK all ams symbols are in Unicode now (I know because the STIX LaTeX support covers them all from STIX Unicode fonts). Regards, Khaled
On 17-7-2012 22:36, Khaled Hosny wrote:
On Tue, Jul 17, 2012 at 09:40:15PM +0200, Hans Hagen wrote:
On 17-7-2012 19:39, Aditya Mahajan wrote:
On Tue, 17 Jul 2012, Andreas Mang wrote:
Dear all,
The \blacktriangle and \blacktriangledown symbol seem to be missing, though \blacktriangleright and \...-left are defined. Is there a quick way to add missing symbols by myself from the knowledge of Unicode / XML identifier (http://www-sop.inria.fr/marelle/tralics/doc-b.html)?
For opentype math fonts, have a look at char-def.lua. To add missing symbols, you need to add appropriate fields in the lua table.
The hard part is verifying the symbol to unicode slot mapping (the list at tralics is not always consistent with the ams list that is used by unicode-math package). If you know the right mappings, add a patch to char-def.lua and send it to the list (or the dev-context list); otherwise, just send the mappings and I can add them to the lua table.
keep in mind that not all those black triangles in ams math ended up in unicode
AFAIK all ams symbols are in Unicode now (I know because the STIX LaTeX support covers them all from STIX Unicode fonts).
Also the black triangles left and right (in ams compatible font sizes)? (Last time I messed with it I had to get them from the navigational symbol font). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, Jul 18, 2012 at 12:29:52AM +0200, Hans Hagen wrote:
On 17-7-2012 22:36, Khaled Hosny wrote:
On Tue, Jul 17, 2012 at 09:40:15PM +0200, Hans Hagen wrote:
On 17-7-2012 19:39, Aditya Mahajan wrote:
On Tue, 17 Jul 2012, Andreas Mang wrote:
Dear all,
The \blacktriangle and \blacktriangledown symbol seem to be missing, though \blacktriangleright and \...-left are defined. Is there a quick way to add missing symbols by myself from the knowledge of Unicode / XML identifier (http://www-sop.inria.fr/marelle/tralics/doc-b.html)?
For opentype math fonts, have a look at char-def.lua. To add missing symbols, you need to add appropriate fields in the lua table.
The hard part is verifying the symbol to unicode slot mapping (the list at tralics is not always consistent with the ams list that is used by unicode-math package). If you know the right mappings, add a patch to char-def.lua and send it to the list (or the dev-context list); otherwise, just send the mappings and I can add them to the lua table.
keep in mind that not all those black triangles in ams math ended up in unicode
AFAIK all ams symbols are in Unicode now (I know because the STIX LaTeX support covers them all from STIX Unicode fonts).
Also the black triangles left and right (in ams compatible font sizes)?
(Last time I messed with it I had to get them from the navigational symbol font).
I don't know about the sizes, but every csname defined by amsfonts and amssymb is covered. Regards, Khaled
participants (4)
-
Aditya Mahajan
-
Andreas Mang
-
Hans Hagen
-
Khaled Hosny