Skip to content

Commit

Permalink
Made Berkeley Work
Browse files Browse the repository at this point in the history
  • Loading branch information
mpacer committed Dec 31, 2014
1 parent 759a037 commit db9587b
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 57 deletions.
48 changes: 26 additions & 22 deletions Dissertate.cls
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,36 @@
\ProvidesClass{Dissertate}[2014/01/24 v1.0 Dissertate Class]
\LoadClass[12pt, oneside, letterpaper]{book}


%\RequirePackage{packages/\Dissertate@School/parameterList}
% some definitions

\def\degreeyear#1{\gdef\@degreeyear{#1}}
\def\degreemonth#1{\gdef\@degreemonth{#1}}
\def\degree#1{\gdef\@degree{#1}}
\def\advisor#1{\gdef\@advisor{#1}}
\def\department#1{\gdef\@department{#1}}
\def\field#1{\gdef\@field{#1}}
\def\university#1{\gdef\@university{#1}}
\def\universitycity#1{\gdef\@universitycity{#1}}
\def\universitystate#1{\gdef\@universitystate{#1}}
\def\programname#1{\gdef\@programname{#1}}
\def\pdOneName#1{\gdef\@pdOneName{#1}}
\def\pdOneSchool#1{\gdef\@pdOneSchool{#1}}
\def\pdOneYear#1{\gdef\@pdOneYear{#1}}
\def\pdTwoName#1{\gdef\@pdTwoName{#1}}
\def\pdTwoSchool#1{\gdef\@pdTwoSchool{#1}}
\def\pdTwoYear#1{\gdef\@pdTwoYear{#1}}
%\def\degreeyear#1{\gdef\@degreeyear{#1}}
%\def\degreemonth#1{\gdef\@degreemonth{#1}}
%\def\degree#1{\gdef\@degree{#1}}
%\def\advisor#1{\gdef\@advisor{#1}}
%\def\department#1{\gdef\@department{#1}}
%\def\field#1{\gdef\@field{#1}}
%\def\university#1{\gdef\@university{#1}}
%\def\universitycity#1{\gdef\@universitycity{#1}}
%\def\universitystate#1{\gdef\@universitystate{#1}}
%\def\programname#1{\gdef\@programname{#1}}
%\def\pdOneName#1{\gdef\@pdOneName{#1}}
%\def\pdOneSchool#1{\gdef\@pdOneSchool{#1}}
%\def\pdOneYear#1{\gdef\@pdOneYear{#1}}
%\def\pdTwoName#1{\gdef\@pdTwoName{#1}}
%\def\pdTwoSchool#1{\gdef\@pdTwoSchool{#1}}
%\def\pdTwoYear#1{\gdef\@pdTwoYear{#1}}

\RequirePackage{color}
\RequirePackage{xcolor}
\usepackage{hyperref}
\RequirePackage[tiny, md, sc]{titlesec}
\setlength{\headheight}{15pt}
\pagestyle{plain}
\RequirePackage{titling}
\RequirePackage[palatino]{quotchap}

\RequirePackage{kvoptions}
\DeclareStringOption{School}[]
\ProcessKeyvalOptions*
\RequirePackage{packages/\Dissertate@School/style}
\RequirePackage{packages/\Dissertate@School/parameterList}

\RequirePackage{graphicx}
\RequirePackage{amssymb}
\RequirePackage{lettrine}
Expand Down Expand Up @@ -79,6 +76,13 @@
\setmathsfont(Digits,Latin,Greek)[Numbers={Proportional}]{EB Garamond}
\setmathrm{EB Garamond}

\RequirePackage{kvoptions}
\DeclareStringOption{School}[]
\ProcessKeyvalOptions*
\input{packages/\Dissertate@School/parameterList.txt}
\RequirePackage{packages/\Dissertate@School/style}


\widowpenalty=300
\clubpenalty=300

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dissertate: a LaTeX dissertation template [![Build Status](https://travis-ci.org/suchow/Dissertate.svg?branch=master)](https://travis-ci.org/suchow/Dissertate)


This package provides all the files needed to support the production and typesetting of a PhD dissertation at Harvard, Princeton, and NYU, though it can easily be adapted to meet the requirements of other schools. The format and styling is based closely on the requirements published by each university's registrar.
This package provides all the files needed to support the production and typesetting of a PhD dissertation at Harvard, Princeton, NYU, and Berkeley, though it can easily be adapted to meet the requirements of other schools. The format and styling is based closely on the requirements published by each university's registrar.


## Getting started
Expand Down
2 changes: 1 addition & 1 deletion dissertation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

% Modify the following line to match your school
% Available options include `Harvard`, `Princeton`, and `NYU`.
\documentclass[School=Harvard]{Dissertate}
\documentclass[School=Berkeley]{Dissertate}

\begin{document}

Expand Down
6 changes: 4 additions & 2 deletions frontmatter/personalize.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
\author{Firstname M. Lastname}
\advisor{Bigname Scientist}
\coadvisorOne{Delightful Researcher}
%\coadvisorTwo{Equally D. Researcher}
\coadvisorTwo{Equally D. Researcher}
\committeeInternal{Person Inside}
\committeeExternal{Person Outside}

% ... about the degree.
\degree{Doctor of Philosophy}
\field{Psychology}
\degreeyear{2024}
%\degreeterm{Spring}
\degreeterm{Spring}
\degreemonth{May}
\department{Psychology}

Expand Down
1 change: 1 addition & 0 deletions packages/Berkeley/reformatParaList.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def reformatParaList(text, num_arg):
os.path.basename(os.getcwd()) +
r"/filename}" + "\n\n"
)

for line in json_input_loaded:
json_output1.write(reformatParaList(line, json_input_loaded[line]))
json_output2.write(reformatParaList(line, json_input_loaded[line]))
Expand Down
67 changes: 36 additions & 31 deletions packages/Berkeley/style.sty
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


\renewcommand{\maketitle}{
\thispagestyle{empty}
%\thispagestyle{empty}
\vspace*{\fill}
\vspace{100pt}
\begin{center}
Expand All @@ -48,6 +48,7 @@
\@university\\
\vspace{50pt}
Committee in charge:\\
\vspace{20pt}
Professor \@coadvisorOne, Co-chair\\
Professor \@coadvisorTwo, Co-chair\\
Professor \@committeeInternal\\
Expand All @@ -70,36 +71,38 @@

% The following conditional definition is derived from http://tex.stackexchange.com/questions/131726/conditional-content. This allows the inclusion of the co-advisor consideration.

\documentclass{article}
%\documentclass{article}

% Display the argument if \cond is True/False
\newcommand{\IfCond}[2]{%
\ifnum\pdfstrcmp{\cond}{True}=0
\ifnum\pdfstrcmp{}{#1}=0\unskip\else#1\fi%
\else
\ifnum\pdfstrcmp{}{#2}=0\unskip\else#2\fi%
\fi\ignorespaces}

% Display the argument if \cond is False
\newcommand{\IfCondFalse}[1]{%
\ifnum\pdfstrcmp{\cond}{True}=0 \unskip\else #1\fi\ignorespaces}
\begin{document}
\def\cond{True}% Version control
This is fake \IfCond{text}{hooplah}. \par
This is fake \IfCond{}{hooplah}.

\def\cond{False}% Version control
This is fake \IfCond{text}{hooplah}. \par
This is fake \IfCond{text}{}.
\end{document}
%\newcommand{\IfCond}[2]{%
% \ifnum\pdfstrcmp{\cond}{True}=0
% \ifnum\pdfstrcmp{}{#1}=0\unskip\else#1\fi%
% \else
% \ifnum\pdfstrcmp{}{#2}=0\unskip\else#2\fi%
% \fi\ignorespaces}
%
%% Display the argument if \cond is False
%\newcommand{\IfCondFalse}[1]{%
% \ifnum\pdfstrcmp{\cond}{True}=0 \unskip\else #1\fi\ignorespaces}
%\begin{document}
%\def\cond{True}% Version control
%This is fake \IfCond{text}{hooplah}. \par
%This is fake \IfCond{}{hooplah}.
%
%\def\cond{False}% Version control
%This is fake \IfCond{text}{hooplah}. \par
%This is fake \IfCond{text}{}.
%\end{document}



\newcommand{\abstractpage}{
\newpage
\pagenumbering{roman}
\setcounter{page}{3}
\pagenumbering{arabic}
\setcounter{page}{1}
\pagestyle{fancy}
\lhead{Thesis advisor: Professor \@advisor} \rhead{\@author}
\lhead{Co-advisors: Professors \@coadvisorOne {\textit \&} \@coadvisorTwo}
\rhead{\@author}
\renewcommand{\headrulewidth}{0.0pt}
\vspace*{35pt}
\begin{center}
Expand All @@ -113,17 +116,19 @@ This is fake \IfCond{text}{}.
\cfoot{\thepage}
}

\newcommand{\dedicationpage}{
\newpage \thispagestyle{fancy} \vspace*{\fill}
\scshape \noindent \input{frontmatter/dedication}
\vspace*{\fill} \newpage \rm
}

\newcommand{\acknowledgments}{
\chapter*{Acknowledgments}
\noindent
\input{frontmatter/thanks}
\vspace*{\fill} \newpage
\setcounter{page}{1}
\pagenumbering{arabic}
\pagenumbering{roman}
}

\newcommand{\dedicationpage}{
\newpage \thispagestyle{fancy} \vspace*{\fill}
\scshape \noindent \input{frontmatter/dedication}
\vspace*{\fill} \newpage \rm
}


14 changes: 14 additions & 0 deletions scripts/breakdown.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
BASEDIR=$(dirname $0)
cd $BASEDIR
cd ..

# Build the dissertation.
xelatex dissertation
bibtex dissertation
xelatex dissertation
xelatex dissertation

# Hide the log.
mv "dissertation.log" ".logged"

0 comments on commit db9587b

Please sign in to comment.