LyXinsert a quote on a "part" side

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
MrLownoise
Posts: 1
Joined: Sat Nov 21, 2015 11:05 pm

insert a quote on a "part" side

Post by MrLownoise »

Hi @ all,
I'm quite new to Lyx/Latex and I'm currently doing a report which is split in 4 parts. Each time when I create a part (report class) a new page is generated.

What I would like to do is, to insert a quote below the part headline.
It should look like this:
part-quote.png
part-quote.png (27.98 KiB) Viewed 2082 times
How can I do this? Hope you can help.
Cheers!

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

insert a quote on a "part" side

Post by Johannes_B »

You can do something like the following:

Code: Select all

\documentclass{book}
\usepackage{etoolbox}
\usepackage{blindtext}
\makeatletter
\pretocmd{\@endpart}{\vspace{5em}\hfill{\large\@quote}\def\@quote{}}{}{}
\newcommand{\quoteline}[1]{\def\@quote{#1}}
\makeatother
\begin{document}
\quoteline{They are absolutely marvelous}
\part{Walzing Wombats}
\blinddocument
%\quoteline{They are fantastic}
\part{Dixie-dancing Ducks}
\blinddocument
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply