我怎麼製作一本書,其中每個部分的第一個字母都比其他部分大?我嘗試製作以下書籍格式,但文字看起來像 Summer 而不是 Summer:
\documentclass[10pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[finnish]{babel}
\usepackage{blindtext}
\usepackage[a5paper]{geometry}
%\usepackage[a5paper, top=2in, bottom=1.5in, left=1in, right=1in]{geometry}
\usepackage{scrextend}
\changefontsizes{10.0pt} % Change base font size
\usepackage{lettrine}
\usepackage{fancyhdr}
\fancyhead[LE,RO]{\thepage}
\fancyfoot{}
\fancyhead[RO,LE]{\thepage}
\fancyhead[LO]{\leftmark}
\fancyhead[RE]{\rightmark}
\cfoot{} % get rid of the page number
\begin{document}
\tableofcontents
\newpage
\section*{Summer 1972}
\addcontentsline{toc}{section}{Summer72}
\lettrine[loversize=-0.4, lines=1, nindent=0em, slope=0em]{S}ummer 1972 was hot.
\newpage
\section*{Summer 1973}
\addcontentsline{toc}{section}{Summer73}
\lettrine[loversize=-0.4, lines=1, nindent=0em, slope=0em]{S}ummer 1973 was hot.
\end{document}
答案1
請注意,您可以在序言或設定檔中配置 lettrine 的預設值,這樣您就無需在每個部分的開頭重新指定它們。
我已經最小化了你的例子,因為它與你問題的關鍵無關:
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{lettrine}
\setcounter{DefaultLines}{1}
\renewcommand{\DefaultLoversize}{0.4}
\setlength{\DefaultNindent}{0em}
\input MorrisIn.fd% only required for the typographical nightmare mentioned below
\begin{document}
\section*{Summer 1972}
\lettrine{S}{ummer} 1972 was hot.
\renewcommand{\LettrineFontHook}{% if you like typographical nightmares, you could even reconfigure midway through your document...
\fontencoding{U}%
\fontseries{xl}%
\fontshape{n}%
\fontfamily{MorrisIn}}
\section*{The Winter of Our Discontent}
\lettrine{N}{ow} is the Winter of our Discontent\\
Made glorious summer by this son of York\dots
\end{document}
如果您不希望第一個單字的其餘部分為小寫字母,您可以這樣做:
\renewcommand{\LettrineTextFont}{\upshape}% or whatever
答案2
代替
\lettrine[loversize=-0.4, lines=1, nindent=0em, slope=0em]{S}ummer
經過
\lettrine[loversize=-0.4, lines=1, nindent=0em, slope=0em]{S}{}ummer