2

I added drop caps to my document using the lettrine package, but would like to change their font to eurb10, because my koma rebuild of the classicthesis style uses euler chapter numbers, but cannot get it to work.

As sanity check, I tried to set the font to calligra, which works (please ignore the ugly alignment of the slanted drop cap), but needs to import the calligra package. In a desperate wild-guessing attempt, I've tried importing the eulervm package, guessing that it might contain the font, but this just "breaks" my math fonts (expected).

I'm suprised that I can define the chapternumber font following the solution here without loading any font package ...

What am I missing? Also, any solution should not break the palatino math font ...

\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}
4

You are looking for

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

to access a font at in a specified encoding and style

  • 1
    Undefined control sequence. \LettrineFontHook ->\UseFont?? – Steven B. Segletes Jan 11 '17 at 18:33
  • @StevenB.Segletes who wrote that:-) – David Carlisle Jan 11 '17 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.