symbolset

From Wiki
Revision as of 19:43, 31 August 2017 by Otared (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

One can create a symbol set with a specific font by using the commands \startsymbolset --- \stopsymbolset. Here is an example which creates the « dangerous bend » used by Donald Kunth with his font manfnt.

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

% 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