[英]LaTeX: Specifying default document-wide font
For some fonts, it's easy to replace the default font with something like: \\renewcommand{\\rmdefault}{somefont}
. 对于某些字体,可以很容易地将默认字体替换为:
\\renewcommand{\\rmdefault}{somefont}
。
However, some fonts, like BrushScriptX want you to use a special command like \\bsifamily
to use the font. 但是,某些字体(例如BrushScriptX)希望您使用
\\bsifamily
这样的特殊命令来使用该字体。 In the 在里面
\\bsifamily
is defined in /usr/share/texmf-texlive/tex/latex/brushscr/pbsi.sty: \\bsifamily
在/usr/share/texmf-texlive/tex/latex/brushscr/pbsi.sty中定义:
\DeclareRobustCommand\bsifamily{\fontencoding{T1}\fontfamily{pbsi}%
\fontseries{xl}\fontshape{n}\selectfont}
In this case, I have a document that uses a cls stylesheet that I am editing. 在这种情况下,我有一个使用正在编辑的cls样式表的文档。 I'm using the standard includes to use this font:
我正在使用标准包含使用此字体:
\usepackage[T1]{fontenc}
\usepackage{pbsi}
If I try to use \\renewcommand{\\rmdefault}{bpsi}
in my document's template, it fails with the error: Font shape `T1/pbsi/m/n' undefined 如果我尝试在文档模板中使用
\\renewcommand{\\rmdefault}{bpsi}
,它将失败并显示以下错误:字体形状“ T1 / pbsi / m / n”未定义
What might be the best way to replace the default roman font with BrushScriptX in a template, like \\renewcommand{\\rmdefault}{otherfont}
would? 用
\\renewcommand{\\rmdefault}{otherfont}
这样的模板中的BrushScriptX替换默认罗马字体的最佳方法是什么?
If you look inside pbsi.sty
you'll find 如果您查看
pbsi.sty
您会发现
\DeclareRobustCommand\bsifamily{\fontencoding{T1}\fontfamily{pbsi}% \fontseries{xl}\fontshape{n}\selectfont}
Therefore, to set this font as the default — ugh :)
— you'll need to write 因此,要将这种字体设置为默认字体– ugh
:)
-您需要编写
\renewcommand\rmdefault{pbsi} \renewcommand\mddefault{xl}
( \\mddefault
is the default "non-bold" series used in running text.) (
\\mddefault
是运行文本中使用的默认“非粗体”系列。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.