Skip to content

Commit

Permalink
add ability to add a second abstract with abstract-second; and to set…
Browse files Browse the repository at this point in the history
… abstract headings
  • Loading branch information
ulyngs committed Dec 27, 2021
1 parent 3190311 commit 1bb3bf6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
5 changes: 4 additions & 1 deletion index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ university-logo-width: 5cm
submitted-text: A thesis submitted for the degree of
degree: Doctor of Philosophy
degreedate: Michaelmas 2018
abstract-heading: "Abstract"
abstract: |
`r paste(readLines("front-and-back-matter/_abstract.Rmd"), collapse = '\n ')`
`r paste(readLines("front-and-back-matter/_abstract.Rmd"), collapse = "\n ")`
# add a second abstract with abstract-second-heading: "Resume", and abstract-second: | etc.

acknowledgements: |
`r paste(readLines("front-and-back-matter/_acknowledgements.Rmd"), collapse = '\n ')`
dedication: For Yihui Xie
Expand Down
12 changes: 11 additions & 1 deletion templates/ociamthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,23 @@
%the top of the page. The abstract itself appears in a quote environment,
%i.e. tabbed in at both sides, and on its own page.

\newcommand{\abstracttitle}{Abstract}
\renewenvironment{abstract}%
{ \begin{alwayssingle}\chapter*{Abstract}
{ \begin{alwayssingle}\chapter*{\abstracttitle}
\thispagestyle{empty}
\pagestyle{empty}
\setlength{\baselineskip}{\frontmatterbaselineskip}}
{\end{alwayssingle}}

\newcommand{\abstractsecondtitle}{Resumé}
\newenvironment{abstractsecond}
{ \begin{alwayssingle}\chapter*{\abstractsecondtitle}
\thispagestyle{empty}
\pagestyle{empty}
\setlength{\baselineskip}{\frontmatterbaselineskip}}
{\end{alwayssingle}}


%The abstractseparate environment is for running of a page with the abstract
%on including title and author etc as required to be handed in separately

Expand Down
9 changes: 8 additions & 1 deletion templates/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
\makeatother



%%%%%%% PAGE HEADERS AND FOOTERS %%%%%%%%%
\usepackage{fancyhdr}
\setlength{\headheight}{15pt}
Expand Down Expand Up @@ -337,11 +336,19 @@

%%%%% ABSTRACT -- Nothing to do here except comment out if you don't want it.
$if(abstract)$
\renewcommand{\abstracttitle}{$abstract-heading$}
\begin{abstract}
$abstract$
\end{abstract}
$endif$

$if(abstract-second)$
\renewcommand{\abstractsecondtitle}{$abstract-second-heading$}
\begin{abstractsecond}
$abstract-second$
\end{abstractsecond}
$endif$

%%%%% MINI TABLES
% This lays the groundwork for per-chapter, mini tables of contents. Comment the following line
% (and remove \minitoc from the chapter files) if you don't want this. Un-comment either of the
Expand Down

0 comments on commit 1bb3bf6

Please sign in to comment.