Page LayoutSmall poems in a Chapter's first page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Small poems in a Chapter's first page

Post by Cham »

I would like to add a small poem or citation on the first page of each chapter, just above the chapter's title, on the upper-right side of the page. Of course, the poem is different for all chapters ! The Poem should be stylized with some "hand-looking" script font.

Many large books are doing this kind of stuff.

Here's a working code to start the idea :

Code: Select all

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{lipsum}

\begin{document}

\tableofcontents

\chapter{Test chapter one}
\lipsum[1-7]
\clearpage

\chapter{Test chapter two}
\lipsum[1-30]

\end{document}
How should I do this ? Any suggestion ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Small poems in a Chapter's first page

Post by localghost »

You are probably looking for epigraph. Regarding the font you should choose one from »The LaTeX Font Catalogue« (perhaps calligraphical or handwritten).


Thorsten
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Small poems in a Chapter's first page

Post by Cham »

Hmm, thanks for the package ! (there are so much of them !).

Currently, the default implementation places the epigraph below the chapter's title, which make a huge space between the title and the content.

I would like to put the epigraph above the chapter title (there's much unused space up there !), without changing any spacing.

EDIT : Ah ! The fun begins ! Epigraph is now above the chapter's title. I need to remove that pesky bar, and change the text font.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Small poems in a Chapter's first page

Post by Cham »

Sorry if I sound dumb, but I can't find an option to remove the rule in the documentation.

What command (or package option) should I add to remove the horizontal bar ?

EDIT : I've found this command to give the rule a thickness of 0pt :

\setlength{\epigraphrule}{0pt}

However, I find it pretty strange that there isn't a simple package option to turn the rule ON/OFF.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Small poems in a Chapter's first page

Post by Cham »

Now, I'm having problems with the font. The whole document is using standard font, like lmodern. But then, how can I use another font just for the epigraphs (Vicentino, for example) ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Small poems in a Chapter's first page

Post by localghost »

I can't provide an example with "Vicentino", because I don't have the corresponding files on my system and I don't know where to get them at the moment. But "Lukas Swatba" from aurical looks nice.

Code: Select all

\documentclass[12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{epigraph}
\usepackage{lmodern}
\usepackage{aurical}
\usepackage{microtype}

\setlength{\epigraphrule}{0pt}
\setlength{\epigraphwidth}{0.5\textwidth}

\begin{document}
  \chapter{Foo}
  \epigraphhead[30]{\epigraph{\Fontlukas We cannot solve our problems with the same thinking we used when we created them.}{\medskip Albert Einstein}}
\end{document}
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Small poems in a Chapter's first page

Post by Cham »

Hahaa ! It's working great !

Now a last question (AFAIK ! ;) ) : where can I find a list of the standard (default) fonts in LaTeX ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Small poems in a Chapter's first page

Post by localghost »

Cham wrote:[…] where can I find a list of the standard (default) fonts in LaTeX ?
You should read what people write here and follow given links. In my very first response you can find a link to the available fonts for PDFLaTeX. If you want to use other fonts (OTF and TTF), you may take a look at another typesetting engine like XeLaTeX or LuaLaTeX.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Small poems in a Chapter's first page

Post by Cham »

Ok, thanks a lot for your invaluable help !

My first query was answered.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Small poems in a Chapter's first page

Post by Cham »

Well, there's something I don't understand with fonts. Here's a working example, from the suggestions above :

Code: Select all

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{lipsum}

% For the epigraph :
\usepackage{aurical}
\usepackage{epigraph}
%\renewcommand{\sourceflush}{flushleft}
\renewcommand{\textflush}{flushleft}
\setlength{\epigraphrule}{0pt}

\begin{document}

\tableofcontents

\chapter{Test chapter one}
\epigraphhead[70]{\epigraph{\Fontlukas\textsl{Bla bla bla bla bla bla.}}{\textit{Someone}}}

\lipsum[1-7]
\clearpage

\chapter{Test chapter two}
\lipsum[1-30]

\end{document}
But then, how can I use the TEX Gyre Chorus or Zapf Chancery fonts, instead of aurical and without changing the whole document ?
Post Reply