我觉得自己很蠢。Iwona 套餐似乎加载 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 时才需要该选项。