Drop caps in pdfLaTeX
Thank you very much for quick responces! Actually, both comments by hop and Charlie Martin were useful. lettrine.sty
is a fantastic package, and it works if scaleable fonts are used.
So, the solution was to force Type 1 CM fonts instead of default CM and use lettrine.sty
. lettrine.sty
documentation suggests to \usepackage{type1cm}
.
This works:
\documentclass[12pt]{article}
% works with pdfLaTeX
\usepackage{type1cm} % scalable fonts
\usepackage{lettrine}
\usepackage[papersize={12cm,4cm},
left=0.5cm,right=0.5cm,
top=0.5cm,bottom=0.5cm]{geometry}
\begin{document}
\lettrine[lines=3,slope=-4pt,nindent=-4pt]{W}{ith} a drop cap, the initial sits
within the margins and runs several lines deep into the paragraph, pushing some
normal-sized text off these lines. This keeps the left and top margins of the
paragraph flush. In~modern browsers, this can be done with a combination of
HTML and CSS by~using the float: left; setting.
\end{document}
And this is the result:
Thank you!
PS. dropping
does not work correctly even with type1cm
.
UPD. This example also works with xelatex
.
Try another font, one with scaling; this looks like the PDF isn't finding a big enough font for the cap-W and is substituting. The other option is to use a dvi-to-PDF translation.