[dev-context] \tochar problem with symbols

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Mon Mar 9 21:38:19 CET 2020


Hi Hans,

I encountered a nasty problem when I tried to make symbols for the 
Libertinus keyboard font.

Whenever I tried to make a table with all symbols in the font ConTeXt 
stops with a error message.


%%%% begin example
\definefontsynonym [LibertinusKeyboard] [file:libertinuskeyboardregular.otf]

\startsymbolset [libertinus-keyboard] [font=LibertinusKeyboard]
     % Libertinus Keyboard Regular
\stopsymbolset

\starttext
\showsymbolset [libertinus-keyboard]
\stoptext
%%%% end example


The error message is caused by two symbols in the font, the first is 
"bar" and the second is "dollar". The reason for this is that ConTeXt 
uses \tochar to auto create symbols in the font but \tochar set special 
catcodes for some letters.

As can be seen in the example below "dollar" has catcode 3 and "bar" has 
catcode "13".


%%%% begin example
\starttext

x\tochar{n:bar}|x

\tochar{n:dollar}x$

\stoptext
%%%% end example

Wolfgang



More information about the dev-context mailing list