1

I'm tryng to write an entire chapter vertically aligned. I found the following solution:

\begingroup%
\makeatletter%
\let\clearpage\relax% 
\vspace*{\fill}%
\vspace*{\dimexpr-50\p@-\baselineskip}
\chapter*{\centering\normalsize{Abstract}}
\noindent
\begin{quote}
text 1
\end{quote}
\vspace*{\fill}%
\endgroup

The solution worked fine for me until I start a \newpage and try to write another vertically aligned chapter. In this case, the second chapter is not vertically aligned. Could someone help me?

Here, the full code

\documentclass[a4paper,12pt,twoside,openright]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[lighttt]{lmodern}
\usepackage[a4paper,top=2.50cm,bottom=2.50cm,left=2.50cm,right=2.50cm]{geometry}

\usepackage{textcomp}
\usepackage{setspace}
    \onehalfspacing

\usepackage{fancyhdr}
    \setlength{\headheight}{18pt}%
    \fancypagestyle{main}{%
      \renewcommand{\headrulewidth}{.4pt}% Header rule
      \renewcommand{\footrulewidth}{0pt}% No Footer rule
      \fancyhf{}% Clear header/footer
      \fancyhead[LE]{\itshape\nouppercase\leftmark}
      \fancyhead[RO]{\itshape\nouppercase\rightmark}
      \fancyhead[RE,LO]{\thepage}% 
    }
    \fancypagestyle{plain}{%
        \fancyhf{} % clear all header and footer fields
        \fancyfoot[R]{\thepage}
        \fancyhead{} 
        \renewcommand{\headrulewidth}{0pt}
        \renewcommand{\footrulewidth}{0pt}
    }
    \raggedbottom
    
\usepackage{titlesec}
    \titleformat{name=\chapter}[display]
        {\Large\ttfamily}
        {{\chaptertitlename} \thechapter}
        {2ex}
        {\bfseries\filcenter\Huge 
    }
    \titleformat{\section}[block]
        {\ttfamily\bfseries\boldmath\Large}
        {\thesection}{1em}{}
    \titleformat{\subsection}[block]
        {\ttfamily\bfseries\large}
        {\thesubsection}{1em}{}
    \titlespacing{\chapter}{0pt}{-10pt}{40pt}

\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\topsep}{0pt}%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
\setlength{\listparindent}{\parindent}%
\setlength{\itemindent}{\parindent}%
\setlength{\parsep}{\parskip}%
}%
\item[]}{\end{list}}

\begin{document}

\begingroup%
\makeatletter%
\let\clearpage\relax% 
\vspace*{\fill}%
\vspace*{\dimexpr-50\p@-\baselineskip}
\chapter*{\centering\normalsize{Abstract}}
\noindent
\begin{quote}
           A problem of non-relativistic quantum mechanics treated using regularization and renormalization is presented. The main aim of this thesis is to study regularization and renormalization techniques in general and applying them first to a classical electromagnetism problem and then to compute the bound state energy of a single quantum particle subjected to a two-dimensional $\delta$-function potential, which results to be divergent if computed naively. The naive computation is performed both solving directly the Schr\"odinger equation and using the theory of propagators, that is briefly studied in the central part of the thesis. The regularization techniques used are the cutoff regularization and the dimensional one. An effective field theory approach, where the potential is regularized through the real space scheme, is also presented. After regularization has been performed, the potential is renormalized re-defining the coupling constant and the running of the renormalized coupling constant, i.e. the renormalization group equation, is found.
\end{quote}
\vspace*{\fill}%
\endgroup

\newpage


\begingroup%
\makeatletter%
\let\clearpage\relax% 
\vspace*{\fill}%
\vspace*{\dimexpr-50\p@-\baselineskip}
\chapter*{\centering\normalsize{Sommario}}
\noindent
\begin{quote}
               A problem of non-relativistic quantum mechanics treated using regularization and renormalization is presented. The main aim of this thesis is to study regularization and renormalization techniques in general and applying them first to a classical electromagnetism problem and then to compute the bound state energy of a single quantum particle subjected to a two-dimensional $\delta$-function potential, which results to be divergent if computed naively. The naive computation is performed both solving directly the Schr\"odinger equation and using the theory of propagators, that is briefly studied in the central part of the thesis. The regularization techniques used are the cutoff regularization and the dimensional one. An effective field theory approach, where the potential is regularized through the real space scheme, is also presented. After regularization has been performed, the potential is renormalized re-defining the coupling constant and the running of the renormalized coupling constant, i.e. the renormalization group equation, is found.
\end{quote}
\vspace*{\fill}%
\endgroup
\end{document}

Here a picturepicture of the output wanted (only the first part works)

3
  • 2
    What do you mean by "vertically aligned"? Do you want that the baseline of the chapter title is at a fixed position in the page? The code you use is ...strange.
    – Rmano
    Commented Jun 24, 2020 at 20:38
  • I don't understand either what you want to do, Maybe use the kantlipsum package to better explain it Commented Jun 24, 2020 at 20:40
  • I want that the chapter is vertically centered., that is all the text has the same space above and below. Now, I Modify the question to insert an image of what I want.
    – mcp
    Commented Jun 24, 2020 at 20:52

1 Answer 1

1

There is no need to use \chapter* just to undo whatever it does.

Using a special environment ensures you get uniform output. You can also easily choose a page style, issue \addcontentsline and so on. Or, maybe, change your mind and just change the definition of the environment; hardcoding everything in the document is error prone.

\documentclass[a4paper,12pt,twoside,openright]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[italian,english]{babel}
\usepackage[lighttt]{lmodern}
\usepackage[a4paper,top=2.50cm,bottom=2.50cm,left=2.50cm,right=2.50cm]{geometry}

\usepackage{textcomp}
\usepackage{setspace}
\usepackage{fancyhdr}
\usepackage{titlesec}

\usepackage{lipsum}

%% package settings
% fancyhdr
\setlength{\headheight}{18pt}
\fancypagestyle{main}{%
  \renewcommand{\headrulewidth}{.4pt}% Header rule
  \renewcommand{\footrulewidth}{0pt}% No Footer rule
  \fancyhf{}% Clear header/footer
  \fancyhead[LE]{\itshape\nouppercase\leftmark}
  \fancyhead[RO]{\itshape\nouppercase\rightmark}
  \fancyhead[RE,LO]{\thepage}% 
}
\fancypagestyle{plain}{%
  \fancyhf{} % clear all header and footer fields
  \fancyfoot[R]{\thepage}
  \fancyhead{}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
}
% titlesec
\titleformat{name=\chapter}[display]
  {\Large\ttfamily}
  {{\chaptertitlename} \thechapter}
  {2ex}
  {\bfseries\filcenter\Huge}
\titleformat{\section}[block]
  {\ttfamily\bfseries\boldmath\Large}
  {\thesection}
  {1em}
  {}
\titleformat{\subsection}[block]
  {\ttfamily\bfseries\large}
  {\thesubsection}
  {1em}
  {}
\titlespacing{\chapter}{0pt}{-10pt}{40pt}

%% personal commands and environments
\newenvironment{changemargin}[2]{%
  \begin{list}{}{%
    \setlength{\topsep}{0pt}%
    \setlength{\leftmargin}{#1}%
    \setlength{\rightmargin}{#2}%
    \setlength{\listparindent}{\parindent}%
    \setlength{\itemindent}{\parindent}%
    \setlength{\parsep}{\parskip}%
  }%
  \item[]
}{\end{list}}

\newenvironment{specialchapter}[2][english]{%
  \cleardoublepage
  \thispagestyle{plain}
  \vspace*{\fill}
  \begin{otherlanguage}{#1}
  {\centering\normalsize\bfseries #2\par}
  \begin{quotation}
}{%
  \end{quotation}
  \end{otherlanguage}
  \vspace*{\fill}
  \clearpage
}

%%% final document settings
\raggedbottom
\onehalfspacing

\begin{document}

\begin{specialchapter}{\abstractname}
text 1
\end{specialchapter}

\begin{specialchapter}[italian]{\abstractname}
text2
\end{specialchapter}

\end{document}

I used quotation rather than quote, because the former is less demanding in vertical spacing (you already have \onehalfspacing).

enter image description here

On the other hand, I'd just use a standard \chapter command under \frontmatter, so it doesn't get numbered.

Where was your problem, by the way? You didn't do \clearpage after the second special chapter.

I also changed the order of parts of the preamble. I find it much better to first load packages and then specify settings.

1
  • Oh wow. Thank you so much! You helped me a lot even with the package loading order. So, if I put a \clearpage after the second special chapter the code used would be fine? However, I will use your solution which is much better. Thank you!!!
    – mcp
    Commented Jun 24, 2020 at 21:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.