我在 ConTeXt 中创建了一个 MetaPost 图,如下所示:
\starttext
\startMPpage
draw textext("Foo") shifted (2cm,2cm) ;
draw textext("Bar") shifted (5cm,5cm) ;
% just to show my figure is supposed to span over all paper size:
draw unitsquare xyscaled (21cm,29.7cm) ; % A4 paper size
\stopMPpage
\stoptext
我想为“Foo”和“Bar”设置不同的字体。
我见过几个解释如何更改字体的维基页面/教程之间两个数字,但我不知道如何切换在一个数字内。
答案1
如果我跑
\starttext
\startMPpage
draw textext(btex \it Foo etex) shifted (2cm,2cm) ;
draw textext(btex \bf Bar etex) shifted (5cm,5cm) ;
% just to show my figure is supposed to span over all paper size:
draw unitsquare xyscaled (21cm,29.7cm) ; % A4 paper size
\stopMPpage
\stoptext
在在线 ConTeXt 引擎,我得到