Hello everyone,
i am using Memoir to write my thesis. I divide it in 2 parts.
I would like to add a citation in the same Part page, but by default a clear-double-page is created after the Part section.
Do you know how can I trick lyx to let me add some free text in the same Part page?
Thanks in advance!
Federico
LyX ⇒ add citation in Part page
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
add citation in Part page
No need to trick LyX, you just have to change the original LaTeX defintion of
You can click on Open in Overleaf to see the compiled result of the example below.
\part
, or rather the underlying commands, to what you need.You can click on Open in Overleaf to see the compiled result of the example below.
Code: Select all
\documentclass{memoir}
\usepackage{blindtext}
\newcommand{\partcite}{}
\newcommand{\partcitation}[1]{\renewcommand\partcite{#1}}
\renewcommand{\afterpartskip}{\vfill\begingroup\partcite\par\endgroup\vfill\newpage}
\begin{document}
\partcitation{\raggedleft Coolest animal of the world \par
\itshape Not Einstein}
\part{Wombat}
\chapter{Wombats are cuddly}
\blindtext[9]
\partcitation{\raggedleft Cuddliest animal of the world \par
\itshape Not Einstein}
\part{Capybara }
\chapter{Capybaras are cuddly}
\blindtext[9]
\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.
add citation in Part page
Thanks Johannes_B!
It worked!
One more detail though. I guess that the vfill in command line
push the Part title way up to the top of the page (it looks also like this in the example you sent me).
I would like to have the "Part 1: PartTitle" a bit more vertically centered.
I tried to add some vertical space before the PartTitle (both protected and not) in lyx, but it looks like this spacing is ignored and so the Part Title stays in the top of the page.
Any idea how to fix this?
Thanks again
It worked!
One more detail though. I guess that the vfill in command line
Code: Select all
\renewcommand{\afterpartskip}{\vfill\begingroup\partcite\par\endgroup\vfill\newpage}
I would like to have the "Part 1: PartTitle" a bit more vertically centered.
I tried to add some vertical space before the PartTitle (both protected and not) in lyx, but it looks like this spacing is ignored and so the Part Title stays in the top of the page.
Any idea how to fix this?
Thanks again

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
add citation in Part page
Try the following. You can also try
In this example, the citation is cleared so no accidental duplication happens. A non-existing cite is much easier to spot than a duplicate.
Using fil/fill, LaTeX stretches the spacing depending on the content, so very different (lengthwise) citations will lead to very different spacing, so i am in favour of handling the spaces by hand. On the other hand, having a really spacy part title, will now destry stuff. So you have to consider what might happen more often and adjust by hand from case to case.
\vfil[\latex] (just one ell), or use [latex]\vspace
everywhere to do the spacing completely by hand. In this example, the citation is cleared so no accidental duplication happens. A non-existing cite is much easier to spot than a duplicate.
Using fil/fill, LaTeX stretches the spacing depending on the content, so very different (lengthwise) citations will lead to very different spacing, so i am in favour of handling the spaces by hand. On the other hand, having a really spacy part title, will now destry stuff. So you have to consider what might happen more often and adjust by hand from case to case.
Code: Select all
\documentclass{memoir}
\usepackage{blindtext}
\newcommand{\partcite}{}
\newcommand{\partcitation}[1]{\renewcommand\partcite{#1}}
\renewcommand{\beforepartskip}{\null\vfill}
\renewcommand{\afterpartskip}{\vspace{4cm}\begingroup\partcite\par\endgroup\renewcommand{\partcite}{}\vfill\newpage}
\begin{document}
\partcitation{\raggedleft Coolest animal of the world \par
\itshape Not Einstein}
\part{Wombat}
\chapter{Wombats are cuddly}
\blindtext[9]
\partcitation{\raggedleft Cuddliest animal of the world \par
\itshape Not Einstein}
\part{Capybara}
\chapter{Capybaras are cuddly}
\blindtext[9]
\part{No citation given}
\chapter{There was none}
\blindtext[9]
\partcitation{\raggedleft quote here
\itshape Not Einstein}
\part{\mdseries% bold would just be insane even in this example
There once was a man from Nantucket\endgraf
Who kept all his cash in a bucket.\endgraf
But his daughter, named Nan,\endgraf
Ran away with a man\endgraf
And as for the bucket, Nantucket. \endgraf}
%Now spacing by hand
\renewcommand{\beforepartskip}{\vspace*{.3\textheight}}
\part{No citation given, spacing by hand}
\chapter{There was none}
\partcitation{\raggedleft Dunkel war’s, der Mond schien helle,\par
schneebedeckt die gr\"une Flur,\par
als ein Wagen blitzesschnelle,\par
langsam um die Ecke fuhr.\par
\itshape Unknown Author}
\part{No citation given, spacing by hand}
\chapter{There was none}
\partcitation{\raggedleft Dunkel war’s, der Mond schien helle,\par
schneebedeckt die gr\"une Flur,\par
als ein Wagen blitzesschnelle,\par
langsam um die Ecke fuhr.\par
\itshape Unknown Author}
\part{\mdseries
There once was a man from Nantucket\endgraf
Who kept all his cash in a bucket.\endgraf
But his daughter, named Nan,\endgraf
Ran away with a man\endgraf
And as for the bucket, Nantucket. \endgraf}
\chapter{There was none}
\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.
add citation in Part page
Perfect! Thanks a lot!