根据12pt
\setupbodyfont
语境花园。
我们可以绕过这个内容上的限制,这样效果会很好:
\starttext
\startbuffer[line]
The quick brown fox jumps over the lazy dog
\stopbuffer
\switchtobodyfont[chorus, 12pt] chorus 12pt: \getbuffer[line] \\
\switchtobodyfont[chorus, 13pt] chorus 13pt: \getbuffer[line] \\
\switchtobodyfont[chorus, 14pt] chorus 14pt: \getbuffer[line] \\
\switchtobodyfont[chorus, 15pt] chorus 15pt: \getbuffer[line] \\
\switchtobodyfont[chorus, 20pt] chorus 20pt: \getbuffer[line] \\
\switchtobodyfont[chorus, 32pt] chorus 32pt: \getbuffer[line]
\stoptext
不幸的是,它似乎不能很好地工作,无论textcommand
是textstyle
在\setuphead
:
\setuphead[chapter][textcommand={\switchtobodyfont[chorus,12pt]}]
\starttext
\chapter{The quick brown fox jumps over the lazy dog}
\stoptext
\setuphead[chapter][textcommand={\switchtobodyfont[chorus,13pt]}]
\starttext
\chapter{The quick brown fox jumps over the lazy dog}
\stoptext
我怎样才能让它工作?
答案1
使用textstyle
。据我所知,最好也定义适当的bodyfontenvironment
\definebodyfontenvironment [20pt]
\setuphead [chapter] [textstyle={\switchtobodyfont[chorus,20pt]}]
\starttext
\startchapter[title={The quick brown fox jumps over the lazy dog}]
\stopchapter
\stoptext