簡體   English   中英

LaTeX:指定默認的文檔范圍字體

[英]LaTeX: Specifying default document-wide font

對於某些字體,可以很容易地將默認字體替換為: \\renewcommand{\\rmdefault}{somefont}

但是,某些字體(例如BrushScriptX)希望您使用\\bsifamily這樣的特殊命令來使用該字體。 在里面

\\bsifamily在/usr/share/texmf-texlive/tex/latex/brushscr/pbsi.sty中定義:

\DeclareRobustCommand\bsifamily{\fontencoding{T1}\fontfamily{pbsi}%
  \fontseries{xl}\fontshape{n}\selectfont}

在這種情況下,我有一個使用正在編輯的cls樣式表的文檔。 我正在使用標准包含使用此字體:

\usepackage[T1]{fontenc}
\usepackage{pbsi}

如果我嘗試在文檔模板中使用\\renewcommand{\\rmdefault}{bpsi} ,它將失敗並顯示以下錯誤:字體形狀“ T1 / pbsi / m / n”未定義

\\renewcommand{\\rmdefault}{otherfont}這樣的模板中的BrushScriptX替換默認羅馬字體的最佳方法是什么?

如果您查看pbsi.sty您會發現

\DeclareRobustCommand\bsifamily{\fontencoding{T1}\fontfamily{pbsi}%
  \fontseries{xl}\fontshape{n}\selectfont}

因此,要將這種字體設置為默認字體– ugh :) -您需要編寫

\renewcommand\rmdefault{pbsi}
\renewcommand\mddefault{xl}

\\mddefault是運行文本中使用的默認“非粗體”系列。)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM