Open main menu

Changes

1,414 bytes added ,  19:43, 31 August 2017
Created page with "One can create a symbol set with a specific font by using the commands {{code|1=\startsymbolset}} --- {{code|1=\stopsymbolset}}. Here is an example which creates the « dangerous..."
One can create a symbol set with a specific font by using the commands {{code|1=\startsymbolset}} --- {{code|1=\stopsymbolset}}.
Here is an example which creates the « dangerous bend » used by Donald Kunth with his font {{code|1=manfnt}}.

Once a {{code|1=symbolset}} has been declared and set up, one can use the declared symbols (for instance here {{code|1=dbend}}) with the command {{code|1=\symbol{dbend}}}, or imbed it in other commands.

<texcode>
% First we declare the font where the symbols have to be found
\definefontsynonym[bends][file:manfnt.afm]

% Then we declare a proper set of symbols:
\startsymbolset [Dangerous Bends]
\definesymbol [dbend] [\resolvedglyphdirect{bends}{n:char_7e}]
\definesymbol [lhdbend] [\resolvedglyphdirect{bends}{n:char_7f}]
\stopsymbolset

% Here we say which symbolset is to be used:
\setupsymbolset [Dangerous Bends]

% One can use the symbols directly with the command \symbol
% or imbed it in other commands.
\define\dbend{\inmargin{\symbol{dbend}}}
\define\ddbend{\inmargin{\symbol{dbend}\symbol{dbend}}}
\define\dddbend{\inmargin{\symbol{dbend}\symbol{dbend}\symbol{dbend}}}

\starttext
Here we use the symbols directly: \symbol{dbend}\quad \symbol{lhdbend}.
\blank[big]
\dbend This result is difficult to prove.
\blank[big]
\ddbend This result is more difficult to prove.
\blank[big]
\dddbend This result is even more difficult to prove.
\stoptext

</texcode>
106

edits