Page Layout ⇒ Catchwords
Catchwords
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.
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
Catchwords
This seems like a job for the fwlw package; take a look at the following simple example:
Code: Select all
\documentclass{report}\usepackage{fwlw}\usepackage{lipsum}% just to generate automatically some text\pagestyle{NextWordFoot}\begin{document}\lipsum[1-20]\end{document}
Catchwords
Code: Select all
\usepackage{fwlw}\fancyfoot[RO]{\vskip-24pt\hfill\copy\NextWordBox}
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.
Catchwords
That's not a very good idea. It's better to do those modifications in your .tex file.jpeyton wrote:...By substituting ‘plain’ for ‘NextWordFoot’ in fwlw.sty, I made the plain page layout produce the catchword...
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.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.
Catchwords
I'm not quite sure how to do that. Could you help with that?gmedina wrote:That's not a very good idea. It's better to do those modifications in your .tex file.jpeyton wrote:...By substituting ‘plain’ for ‘NextWordFoot’ in fwlw.sty, I made the plain page layout produce the catchword...
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)?jpeyton wrote:...How can I get the catchword 24 points higher, as with the fancy layout?
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.gmedina wrote: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.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.
Catchwords
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
\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}
Re: Catchwords
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
Re: Catchwords
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?
Catchwords
1) No, I would like the chapter to “open any”; however, I do not want a blank odd page before a chapter begins.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?
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.)
Catchwords
Code: Select all
\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}