我在 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”設定不同的字體。
我遇到過幾個解釋如何更改字體的 wiki 頁面/教程之間兩個數字,但我還沒找到如何切換在一個數字內。
答案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
於線上上下文引擎,我得到