General ⇒ Document layout (book of poems)
Document layout (book of poems)
Hello everyone!
I am currently working on a book of poems and I recently discovered the key features that LaTeX provides for this kind of documents. Until now, I only have used it for scientific articles.
I have a bit of a problem, due to my lack of knowledge and experience.
I want my book to contain several sections, but not in the common sense of the word. For example, I want to divide my poems into "Love poems" and "Heroic poems", with the following askings:
- The TOC to contain a title "Love poems", like a chapter name, and then all the poems underneath it, like usual sections
- I want a new page on which to write "Love poems" only (just like blank pages that sepparate chapters), and afterwards the poems. Then after I wrote all the love poems, when entering the second part, I want again an allmost blank page, on which I only want "Heroic poems", and then the poems on the following pages.
Until now managed to supress the chapter numbers, but I don't know how to obtain this layout. I thought about using "Love poems" as a chapter and then the poems as sections of it, but then how can I get only the chapter's name written on a new page?
Thank you for your attention and help,
Adrian
I am currently working on a book of poems and I recently discovered the key features that LaTeX provides for this kind of documents. Until now, I only have used it for scientific articles.
I have a bit of a problem, due to my lack of knowledge and experience.
I want my book to contain several sections, but not in the common sense of the word. For example, I want to divide my poems into "Love poems" and "Heroic poems", with the following askings:
- The TOC to contain a title "Love poems", like a chapter name, and then all the poems underneath it, like usual sections
- I want a new page on which to write "Love poems" only (just like blank pages that sepparate chapters), and afterwards the poems. Then after I wrote all the love poems, when entering the second part, I want again an allmost blank page, on which I only want "Heroic poems", and then the poems on the following pages.
Until now managed to supress the chapter numbers, but I don't know how to obtain this layout. I thought about using "Love poems" as a chapter and then the poems as sections of it, but then how can I get only the chapter's name written on a new page?
Thank you for your attention and help,
Adrian
NEW: TikZ book now 40% off at Amazon.com for a short time.

Document layout (book of poems)
If you're sure about chapter-section divisions, it's easy to achieve what you want with titlesec package. Here's an example:
You may also consider using memoir document class which provides some nice features regarding typesetting poetry (see memoir's documentation, chapter 14).
Code: Select all
Code, edit and compile here:
\documentclass{book}\usepackage{lipsum}% used for dummy text\setcounter{secnumdepth}{-1}% removes numbering of sectioning units\usepackage{titlesec}\begin{document}\tableofcontents%%% Chapter formatting\titleformat{\chapter}{\Huge\bfseries}% global formatting (title and number){\thechapter.\,}% number formatting; if empty, it removes the number (but not from TOC){0pt}% spacing between the number and the title{}% code/content between the number and the title[\clearpage]% code/content after the title; if you want sections to start on the next right page, use \cleardoublepage instead of \clearpage\titlespacing{\chapter}{0pt}% left margin{5cm}% vertical spacing before the title{0cm}% vertical spacing after the title%%%\chapter{Love poems}\section{First poem}\lipsum[1-4]% dummy text\chapter{Heroic poems}\section{First poem}\lipsum[1-4]% dummy text\end{document}
Re: Document layout (book of poems)
You might also consider using the \part command for your primary divisions; it sounds like what what you have in mind.
Document layout (book of poems)
I find the example that you kindly offered a bit complicated and also I am not used to the \part command. But I managed to make some adjustments to my document and the only question that remains is:
How can I get the chapter's name written on a blank page, only by itself and then the following pages to contain the (sub)sections?
I intend to make "Love poems" & "Heroic poems" to be chapters and then the poems belonging to them, the sections.
How can I get the chapter's name written on a blank page, only by itself and then the following pages to contain the (sub)sections?
I intend to make "Love poems" & "Heroic poems" to be chapters and then the poems belonging to them, the sections.
Document layout (book of poems)
Well, I don't know an easier way to manipulate sectioning units than by using titlesec package. However, if you don't want an automatic solution, and since there are only two chapters, you can simply clear the page after the chapter titles manually, e.g.:
Code: Select all
Code, edit and compile here:
\documentclass{book}\setcounter{secnumdepth}{-1}\begin{document}\tableofcontents\chapter{Love poems}\clearpage\section{First poem}Some text.\chapter{Heroic poems}\clearpage\section{First poem}Some text.\end{document}
Document layout (book of poems)
The starred version of \part* basically does what you want. However, like the other starred versions of sectioning commands (\chapter*, \section*) for creating unnumbered divisions, it doesn't add its contents to the table of contents, but you could do so manually using \addcontentsline. Another advantage of that you could then have it treat the parts as chapters in the TOC.
Still you'll need to change \thesection so it doesn't add chapter numbers to section numbers if you were going to treat the poems as sections. You'd also need to reset the chapter numbers with each part division.
Here's an example.
The lipsum stuff is just there for filler text. It's not part of the suggestion and can be removed.
If you want to do something more advanced, then definitely look at the documentation of the titlesec package. There isn't going to be another easy way.
Still you'll need to change \thesection so it doesn't add chapter numbers to section numbers if you were going to treat the poems as sections. You'd also need to reset the chapter numbers with each part division.
Here's an example.
Code: Select all
Code, edit and compile here:
\documentclass{book}\usepackage{lipsum}% for adding filler text\renewcommand{\thesection}{\arabic{section}}\begin{document}\tableofcontents\part*{Funny Poems}\addcontentsline{toc}{chapter}{Funny Poems}\section{Hungry Mungry}\lipsum[1]\section{The Old Man From Nantucket}\lipsum[2]\part*{Serious Poems}\setcounter{section}{0}\addcontentsline{toc}{chapter}{Serious Poems}\section{Ode to LaTeX}\lipsum[3]\end{document}
If you want to do something more advanced, then definitely look at the documentation of the titlesec package. There isn't going to be another easy way.
Document layout (book of poems)
Thank you very much, that did the trick that I wanted, simple and effective. I only have to lower the title of the chapter, i.e. in the middle of thee page, but I think I can do this by myself.meho_r wrote:Well, I don't know an easier way to manipulate sectioning units than by using titlesec package. However, if you don't want an automatic solution, and since there are only two chapters, you can simply clear the page after the chapter titles manually, e.g.:
Thanks again to all of you!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Document layout (book of poems)
Now that the problem seems to be solved, please be so kind and mark the topic (not the last post) accordingly as written in Section 3 of the Board Rules. Otherwise please tell us what is missing. Please keep that in mind for the future so that further reminders will not be necessary.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10