带有欧拉字体的 lettrine

带有欧拉字体的 lettrine

我使用该软件包在文档中添加了首字下沉字体lettrine,但想将其字体更改为eurb10,因为我koma重建的classicthesis样式使用了euler章节编号,但无法使其工作。

作为理智检查,我尝试将字体设置为 calligra,它可以工作(请忽略倾斜首字下沉的丑陋对齐),但需要导入包calligra。在绝望的猜测中,我尝试导入包eulervm,猜测它可能包含字体,但这只会“破坏”我的数学字体(预期)。

我很惊讶我可以定义章节编号字体按照这里的解决方案无需加载任何字体包...

我遗漏了什么?此外,任何解决方案都不应破坏 palatino 数学字体...

\documentclass[a4paper, 11pt, numbers=noenddot, twoside,openright, parskip=half]{scrbook}
\usepackage[ngerman, english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[dvipsnames, table]{xcolor}
\definecolor{halfgray}{gray}{0.55}

\usepackage{lettrine}
%\usepackage{eulervm} % doesn't help and math is not nice 
%\renewcommand{\LettrineFontHook}{\eurb10} % <====== doesn't work
%\renewcommand{\LettrineFontHook}{\pplr9d} % <====== doesn't work

\usepackage{calligra}
\renewcommand{\LettrineFontHook}{\calligra} % <====== works
\newcommand{\collettr}[3][lines=3]{\lettrine[#1]{\textcolor{halfgray}{#2}}{#3}}

\usepackage[osf,sc]{mathpazo} % nice bookish font Palatino with real small caps and old style figures
\addtokomafont{disposition}{\rmfamily}  % koma with roman headings

\usepackage[tracking=true]{microtype}
\usepackage{textcase} % needed to make entries from the personal info upper/lower case
\microtypesetup{expansion=false}
\DeclareRobustCommand{\spacedallcaps}[1]{\textls[160]{\MakeTextUppercase{#1}}}%
\DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textls[80]{\scshape\MakeTextLowercase{#1}}}%

% chapter format
\newcommand\titlerule[1][1pt]{\rule{\linewidth}{#1}}
\makeatletter
\renewcommand\chapterlinesformat[3]{%
    \@hangfrom{#2}{#3}%
    \color{halfgray}\par\nobreak\titlerule%
}
\makeatother
\DeclareFixedFont{\chapterNumber}{U}{eur}{b}{n}{60}
\renewcommand*{\chapterformat}{%
    \rlap{\makebox[\linewidth][r]{} 
    \color{halfgray}\enskip\chapterNumber\thechapter\autodot}
}
\setkomafont{chapter}{\mdseries\scshape\lsstyle\Large}

\usepackage{lipsum}

\begin{document}
    \chapter{Chapter title}
    \collettr{F}{irst} sentence of the chapter followed by \lipsum[8]
    \begin{equation}
    \omega(x) = \omega_0 \sqrt{1+\left(\frac{x}{x_0}\right)^2}
    \end{equation}
\end{document}

答案1

您正在寻找

\renewcommand{\LettrineFontHook}{\usefont{U}{eur}{b}{n}\fontsize{10}{12}\selectfont} 

访问指定编码和样式的字体

相关内容