Page LayoutCatchwords

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
jpeyton
Posts: 9
Joined: Thu Aug 20, 2009 9:43 pm

Catchwords

Post by jpeyton »

Salutations to all.

I’ve been using LaTeX for quite a while now, and have been quite pleased with the results. I have a question that is not about getting something necessary to work, but rather about a particular feature that I’d like.

Before the eighteenth century printers placed a catchword at the foot of a page. This catchword—which would be the first word on the next page—was aligned right, set just below the last line on the page.

Catchwords were a printers’ convenience, because it would help them get the pages in the right order. However, it also helps the reader, and I would like a method of implenting them myself.

How would one create a package or macro that would automatically add catchwords? I imagine it wouldn’t be difficult, but I have no experience with creating my own macros.

Recommended reading 2024:

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

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

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Catchwords

Post by gmedina »

Hi, and welcome to the board!

This seems like a job for the fwlw package; take a look at the following simple example:

Code: Select all

Code, edit and compile here:
\documentclass{report}
\usepackage{fwlw}
\usepackage{lipsum}% just to generate automatically some text
\pagestyle{NextWordFoot}
\begin{document}
\lipsum[1-20]
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The package documentation can be found in the file fwlw.sty itself.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
jpeyton
Posts: 9
Joined: Thu Aug 20, 2009 9:43 pm

Catchwords

Post by jpeyton »

Thanks for that! Adding the following to the preamble helps with fancyfooter:

Code: Select all

Code, edit and compile here:
\usepackage{fwlw}
\fancyfoot[RO]{\vskip-24pt\hfill\copy\NextWordBox}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
By substituting ‘plain’ for ‘NextWordFoot’ in fwlw.sty, I made the plain page layout produce the catchword. How can I get the catchword 24 points higher, as with the fancy layout?

In addition, I’m getting a couple bugs. \thispagelayout{empty} is not taking effect, and the first chapter begins on page 2 with page 1 blank after the table of contents.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Catchwords

Post by gmedina »

jpeyton wrote:...By substituting ‘plain’ for ‘NextWordFoot’ in fwlw.sty, I made the plain page layout produce the catchword...
That's not a very good idea. It's better to do those modifications in your .tex file.
jpeyton wrote:...How can I get the catchword 24 points higher, as with the fancy layout?

In addition, I’m getting a couple bugs. \thispagelayout{empty} is not taking effect, and the first chapter begins on page 2 with page 1 blank after the table of contents.
What document class are you using? Please post here a reduced compilable version of your document and give us a more detailed explanation so that we can get an idea of what you are trying to achive.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
jpeyton
Posts: 9
Joined: Thu Aug 20, 2009 9:43 pm

Catchwords

Post by jpeyton »

gmedina wrote:
jpeyton wrote:...By substituting ‘plain’ for ‘NextWordFoot’ in fwlw.sty, I made the plain page layout produce the catchword...
That's not a very good idea. It's better to do those modifications in your .tex file.
I'm not quite sure how to do that. Could you help with that?
jpeyton wrote:...How can I get the catchword 24 points higher, as with the fancy layout?
Actually, this brings up the broader question that I would like to know the answer to: How can I get the footer to appear just one line below the text (so that if the footer took up a whole line it would look like another line of text)?
gmedina wrote:
jpeyton wrote: In addition, I’m getting a couple bugs. \thispagelayout{empty} is not taking effect, and the first chapter begins on page 2 with page 1 blank after the table of contents.
What document class are you using? Please post here a reduced compilable version of your document and give us a more detailed explanation so that we can get an idea of what you are trying to achive.
I'm using the book class. I'll send the file when I'm at my other computer, but for now I would like find the answers to the other questions.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Catchwords

Post by gmedina »

In the meantime, the code below could give you some ideas. I used a new custom length to place the footer as you required (the code contains explanatory comments). I also redefined the plain page style to behave as the fancy page style; of course, this modification will affect every page that internally used the plain style (first page of each chapter, ToC, LoF, LoT, etc.).

Finally, I didn't fully understand the problem with the first chapter and the table of contents; I used the openany class option, perhaps that's what you needed.

Code: Select all

Code, edit and compile here:
\documentclass[openany]{book}
\usepackage{fwlw}
\usepackage{fancyhdr}
\usepackage{lipsum}% just to automatically generate some text
% a new length used to place the catchword
\newlength\mylen
% assign to the new length the value \baselineskip-\topsep-\footsep
\addtolength\mylen{-\footskip}
\addtolength\mylen{-\topsep}
\addtolength\mylen{\baselineskip}
% definitions for the fancy page style
\fancyhf{}
\fancyfoot[RO]{\vskip\the\mylen\hfill\copy\NextWordBox}
\renewcommand\headrulewidth{0pt}
\pagestyle{fancy}
% the plain page style will behave exactly as the fancy page style
\makeatletter
\let\ps@plain\ps@fancy
\makeatother
\begin{document}
\tableofcontents
\clearpage
\chapter{Test chapter}
\lipsum[1-20]
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1,1,2,3,5,8,13,21,34,55,89,144,233,...
jpeyton
Posts: 9
Joined: Thu Aug 20, 2009 9:43 pm

Re: Catchwords

Post by jpeyton »

All right, I did the suggestions. Here's my trimmed-down file (still a bit long, but the details may be necessary).

Here are my remaining questions:

(1) How can I get the first page of each chapter to have no header, and the footer number centred directly below the last line?

(2) Similarly, how can I get the footer (catchword) of a fancy page directly below the last line, even with an underfull vbox?

(3) What is with the blank on page 1? I can understand a blank verso so the book begins on an odd page, but I don't get why the right page would be blank.

(4) Why does \thispagestyle{empty} not work with the two book-specific titles?
Attachments
sample.tex
(19.15 KiB) Downloaded 304 times
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Catchwords

Post by gmedina »

Some questions:

1) Your chapters must always start on an odd-numbered page?

2) The first part of a chapter should also contain a catchword if it occurs in an odd-numbered page?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
jpeyton
Posts: 9
Joined: Thu Aug 20, 2009 9:43 pm

Catchwords

Post by jpeyton »

gmedina wrote:Some questions:

1) Your chapters must always start on an odd-numbered page?

2) The first part of a chapter should also contain a catchword if it occurs in an odd-numbered page?
1) No, I would like the chapter to “open any”; however, I do not want a blank odd page before a chapter begins.

2) Yes, my intention is to have catchwords on all odd-numbered pages, regardless of whether the odd-numbered page begins a chapter. (Of course, if the even-numbered page following begins a chapter, there would be no catchword.)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Catchwords

Post by gmedina »

The code below includes the modifications needed. Basically all I did was to replace some \newpage commands with \clearpage or some of its variation, to redefine the plain page style and to redefine the \mainmatter command to suppress that problematic blank page.

Code: Select all

Code, edit and compile here:
\documentclass[titlepage,openany,11pt]{book}
\usepackage[papersize={5.5in,8.5in},top=66pt,bottom=60pt,left=51pt,right=51pt,bindingoffset=0pt]{geometry}
\linespread{1.15} % Leading to ease reading
\raggedbottom % Looks better with underfull vboxes
\newlength\catchword % Sets a new length for positioning the catchword
\addtolength\catchword{-\footskip}
\addtolength\catchword{-5pt}
% Customizing the header and catchword
\usepackage{fancyhdr, fwlw}
\fancyhf{} % Clears default header and footer
\pagestyle{fancy}
\setlength{\headheight}{18pt}
\fancyhfoffset[LE,LO,RE,RO]{0pt}
\renewcommand{\headrule}{\smallskip \hrule width\headwidth height\headrulewidth}
% Adds the catchword to the bottom right corder of fancy style
\fancyfoot[RO]{\vskip\the\catchword\hfill\copy\NextWordBox}
\fancyhead[LE,RO]{\thepage} % Makes page number appear in top corner of each page
\fancyhead[CE]{Harvey Newcomb} % Displays author on left page
\renewcommand{\chaptermark}[1]{\markboth{#1}{}} % Sets the chapter mark for marking the right page
\fancyhead[CO]{\itshape\lowercase{\leftmark}} % Displays chapter on right page
% Redefinition of the plain style (first page of chapters, of ToC, etc.)
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[C]{\thepage}
\fancyfoot[RO]{\vskip\the\catchword\hfill\copy\NextWordBox}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
% The following command is for making titles,
% with parameters for title, subtitle, author and other
\newcommand{\titlo}[4]{
\clearpage{\thispagestyle{empty}\cleardoublepage}
\begin{center}
~
\vskip 60pt
{\bfseries\Huge #1}
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply