我覺得我好笨。這伊沃納套餐似乎將 Iwona 加載為\rmfamily
字體,但我想將其用作無襯線字體,畢竟它是無襯線字體...我如何將其作為字體\sffamily
?
澄清範例:
\documentclass{article}
\usepackage{iwona}
\begin{document}
This should be Computer Modern but is Iwona
\sffamily
This should be Iwona but is Computer Modern Sans Serif
\end{document}
答案1
準備一份文件sansiwona.sty
\ProvidesPackage{sansiwona}
\DeclareOption{regular}{\renewcommand{\sfdefault}{iwona}}
\DeclareOption{light}{\renewcommand{\sfdefault}{iwonal}}
\DeclareOption{condensed}{\edef\sfdefault{\sfdefault c}}
%\DeclareOption{mathnoalias}{\let\define@iwona@mathversions\relax}
\DeclareOption{math}{%
\let\define@iwona@mathversions a%
\PassOptionsToPackage{mathnoalias}{iwona}%
}
\ExecuteOptions{regular}
\ProcessOptions
\let\sansiwona@saved@rmdefault\rmdefault
\let\sansiwona@saved@bfdefault\bfdefault
\RequirePackage[mathnoalias]{iwona}
\let\rmdefault\sansiwona@saved@rmdefault
\let\bfdefault\sansiwona@saved@bfdefault
\mathversion{normal}
\endinput
然後是文檔
\documentclass{article}
\usepackage[math]{sansiwona}
\begin{document}
What font will this be?
{\sffamily And this? \bfseries And this?}
$a+b=\sum$
\mathversion{iwona}
$a+b=\sum$
\end{document}
會做正確的事情,因為所做的「錯誤」設定iwona.sty
會被恢復。
把sansiwona.sty
它放在 TeX 能找到的地方,參見新增樣式文件
math
僅當您需要 Iwona Math 時才需要該選項。