From 3530983370f49ae2c7642b410ceb51766b42d12c Mon Sep 17 00:00:00 2001 From: nam Date: Sun, 7 Sep 2014 10:23:25 +0900 Subject: [PATCH] working, but still rough around the title page, date ... --- thesis2/chapters/frontmatter.tex | 18 ++- thesis2/mythesis.sty | 200 ++++++++++++++++++++++++++++++- thesis2/thesis.tex | 45 +++---- 3 files changed, 235 insertions(+), 28 deletions(-) diff --git a/thesis2/chapters/frontmatter.tex b/thesis2/chapters/frontmatter.tex index dcb0c94..ff7c89b 100644 --- a/thesis2/chapters/frontmatter.tex +++ b/thesis2/chapters/frontmatter.tex @@ -1,12 +1,15 @@ %% Title -\titlepage[\vspace{5mm}of Department of Physics,\\ -Graduate School of Science]% -{A dissertation submitted to the Osaka University\\ -for the degree of Doctor of Philosophy} +%\titlepage[\vspace{5mm}Department of Physics,\\ +%Graduate School of Science]% +%{A dissertation submitted to the Osaka University\\ +%for the degree of Doctor of Philosophy} +\titlepage[]{\vspace{5mm}Department of Physics, Graduate School of Science\\ +Osaka University} %% Abstract -\begin{abstract}%[\smaller \thetitle\\ \vspace*{1cm} \smaller {\theauthor}] - %\thispagestyle{empty} +\begin{abstract} + %[\smaller \thetitle\\ \vspace*{1cm} \smaller {\theauthor}] + \thispagestyle{empty} COMET [1] is an experiment that aims to search for a charged lepton flavor violation (CLFV) process, the muon-to-electron conversion in the presence of a nucleus, @@ -32,6 +35,7 @@ presented in this thesis. %% Declaration \begin{declaration} + \thispagestyle{empty} This dissertation is the result of my own work, except where explicit reference is made to the work of others, and has not been submitted for another qualification to this or any other university. @@ -44,6 +48,7 @@ presented in this thesis. % Acknowledgements %\begin{acknowledgements} + %\thispagestyle{empty} %Of the many people who deserve thanks, some are particularly prominent, %such as my supervisor Professor Yoshitaka Kuno. %\end{acknowledgements} @@ -51,6 +56,7 @@ presented in this thesis. %% Preface %\begin{preface} + %\thispagestyle{empty} %The thesis is about measurements of products of nuclear muon capture on an %aluminum target, which is important for optimization of a tracking detector %of a search for muon to electron conversion, the E21 experiment - so called diff --git a/thesis2/mythesis.sty b/thesis2/mythesis.sty index 9b9f834..951dd06 100644 --- a/thesis2/mythesis.sty +++ b/thesis2/mythesis.sty @@ -2,13 +2,15 @@ \ProvidesPackage{mythesis} %% ------------------------------------- -%% Standard packages +%% Packages %% ------------------------------------- +%$ Page layout \RequirePackage[top=1in, bottom=1in, %inner=1.25in, outer=1in]{geometry} inner=1.25in, outer=1in, twoside]{geometry} \RequirePackage{amsmath} +%$ Hyper-link .. \RequirePackage[% colorlinks=true,% color links instead of using boxes linkcolor=red,% color for internal (intra-document) links @@ -21,6 +23,18 @@ bookmarks ]{hyperref} \RequirePackage[all]{hypcap} +\AtBeginDocument{\thispagestyle{plain}} + +%% Custom header, no upper case, two sided +\RequirePackage{fancyhdr} +\pagestyle{fancy} +\fancyhf{} +\fancyhead[LE,RO]{\thepage} +\fancyhead[RE]{\nouppercase{\leftmark}} +\renewcommand{\chaptermark}[1]{\markboth{#1}{}} +\setlength{\headheight}{15pt} +\RequirePackage{emptypage} +%% Others \RequirePackage{booktabs} \RequirePackage{cite} %\RequirePackage{morefloats} @@ -48,3 +62,187 @@ bookmarks \RequirePackage{feynmp} \RequirePackage[]{afterpage} \RequirePackage[]{multirow} + +%% provide adjustwidth +\RequirePackage{changepage} +\RequirePackage{comment} + +%% ------------------------------------- +%% More settings ... +%% ------------------------------------- +%% Treat forced blank pages in the same way as chapter title pages +\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else% + \hbox{}% + \thispagestyle{empty}% + %\thispagestyle{plain}% + \newpage% + \if@twocolumn\hbox{}\newpage\fi\fi\fi}% + + +%% Provide mixed-case versions of the Table of contents, +%% List of tables, List of figures, Bibliography etc. header names +\DeclareRobustCommand{\contentsname}{Contents} +\DeclareRobustCommand{\bibname}{Bibliography} +\DeclareRobustCommand{\listfigurename}{List of figures} +\DeclareRobustCommand{\listtablename}{List of tables} + +%% ------------------------------------- +%% Extra environments, stole from hepthesis.cls +%% ------------------------------------- +%% Extra margins for various sections +\newlength{\@mainmatterextramargin}% +\setlength{\@mainmatterextramargin}{0cm}% +\newlength{\@backmatterextramargin}% +\setlength{\@backmatterextramargin}{0cm}% +\newlength{\@frontmatterextramargin}% +\setlength{\@frontmatterextramargin}{0cm}% +\newlength{\@appendixextramargin}% +\setlength{\@appendixextramargin}{0cm}% +\newlength{\@abstractextramargin}% +\setlength{\@abstractextramargin}{1.5cm}% +\newlength{\@declarationextramargin}% +\setlength{\@declarationextramargin}{1cm}% +\newlength{\@acknowledgementsextramargin}% +\setlength{\@acknowledgementsextramargin}{0cm}% +\newlength{\@prefaceextramargin}% +\setlength{\@prefaceextramargin}{0cm}% +\newlength{\@pagequoteextramargin}% +\setlength{\@pagequoteextramargin}{2cm}% +%% Top vertical spacing in the front matter +\newlength{\@frontmattertopskip}% +\newlength{\@frontmattertitletopskip}% +\newlength{\frontmattertitleskip}% +\addtolength{\frontmattertitleskip}{2cm}% +\addtolength{\@frontmattertitletopskip}{0cm}% +\setlength{\@frontmattertopskip}{\frontmattertitleskip}% +\addtolength{\@frontmattertopskip}{\@frontmattertitletopskip}% + +%% Figure widths +\newlength{\smallfigwidth} +\newlength{\mediumfigwidth} +\newlength{\largefigwidth} +\newlength{\hugefigwidth} +\setlength{\smallfigwidth}{0.45\textwidth} +\setlength{\mediumfigwidth}{0.6\textwidth} +\setlength{\largefigwidth}{0.75\textwidth} +\setlength{\hugefigwidth}{0.9\textwidth} +%% Environment for thesis abstract in frontmatter +%% (argument is the thesis title) + +\newenvironment{abstract}[1][Abstract]{% + \adjustwidth{\@abstractextramargin}{\@abstractextramargin}% + \cleardoublepage% + \vspace*{\@frontmattertopskip}% + \begin{center}% + \begingroup + \ifx\@sftitles\@empty\else\sf\fi + {\LARGE\textbf{#1}}% + \endgroup + \end{center}% + \vspace*{1cm}% +}{ \endadjustwidth \ignorespacesafterend } + +%% Environment for declaration rubrik page in frontmatter +\newenvironment{declaration}{% + \cleardoublepage% + \adjustwidth{\@declarationextramargin}{\@declarationextramargin}% + \vspace*{\@frontmattertopskip}% + \begin{center}% + \begingroup + \ifx\@sftitles\@empty\else\sf\fi + {\LARGE\textbf{Declaration}}% + \endgroup + \end{center}% + \vspace*{1cm}% +}{% + %\newline \newline \newline% + %\begin{flushright} + % \thesisauthor\newline + % \today\newline + %\end{flushright} + \endadjustwidth% + \ignorespacesafterend% +} + +%% Change the spacing of lines +\DeclareRobustCommand{\setspacing}[1]{% + \setfrontmatterspacing{#1}% + \setmainmatterspacing{#1}% + \setappendixspacing{#1}% + \setbackmatterspacing{#1}% +} +\DeclareRobustCommand{\setfrontmatterspacing}[1]{\def\@frontmatterspacing{#1spacing}} +\DeclareRobustCommand{\setmainmatterspacing}[1]{\def\@mainmatterspacing{#1spacing}} +\DeclareRobustCommand{\setappendixspacing}[1]{\def\@appendixspacing{#1spacing}} +\DeclareRobustCommand{\setbackmatterspacing}[1]{\def\@backmatterspacing{#1spacing}} + + +%% Change the extra margin size +\DeclareRobustCommand{\setextramargins}[1]{% + \setfrontmatterextramargins{#1}% + \setmainmatterextramargins{#1}% + \setappendixextramargins{#1}% + \setbackmatterextramargins{#1}% +} +\DeclareRobustCommand{\setfrontmatterextramarginsg}[1]{\setlength{\@frontmatterextramargin}{#1}} +\DeclareRobustCommand{\setmainmatterextramargins}[1]{\setlength{\@mainmatterextramargin}{#1}} +\DeclareRobustCommand{\setappendixextramargins}[1]{\setlength{\@appendixextramargin}{#1}} +\DeclareRobustCommand{\setbackmatterextramargins}[1]{\setlength{\@backmatterextramargin}{#1}} +\DeclareRobustCommand{\setabstractextramargins}[1]{\setlength{\@abstractextramargin}{#1}} +\DeclareRobustCommand{\setdeclarationextramargins}[1]{\setlength{\@declarationextramargin}{#1}} +\DeclareRobustCommand{\setacknowledgementsextramargins}[1]{\setlength{\@acknowledgementsextramargin}{#1}} +\DeclareRobustCommand{\setprefaceextramargins}[1]{\setlength{\@prefaceextramargin}{#1}} + +%% Part-wise spacing commands and definitions +\def\@frontmatterspacing{onehalfspacing} +\def\@mainmatterspacing{onehalfspacing} +\def\@appendixspacing{onehalfspacing} +\def\@backmatterspacing{onehalfspacing} +%% An environment for the rubbish at the front of a typical thesis +\let\@oldfrontmatter\frontmatter +\specialcomment{frontmatter}{% + \setcounter{tocdepth}{2}% show down to subsections in contents + \setcounter{secnumdepth}{2}% number down to subsections + %\newcounter{iterlist}% + \@oldfrontmatter% + \adjustwidth{\@frontmatterextramargin}{\@frontmatterextramargin}% + \begin{\@frontmatterspacing}% +}{% + \end{\@frontmatterspacing}% + \endadjustwidth% + \ignorespacesafterend% +} + + +%% Title page + +%% Use the \title and \author arguments to build the front page etc. +\ifx\@requiretitling\@empty% +%% Re-define \title and \author to store their args in \thetitle, \theauthor +%variables +\renewcommand*\title[1]{\gdef\@title{#1}\global\let\thetitle\@title}% +\renewcommand*\author[1]{\gdef\@author{#1}\global\let\theauthor\@author}% +\else% +\RequirePackage{titling}% +\fi +%% Makes a thesis title page +\let\@oldtitlepage\titlepage +\let\@oldendtitlepage\endtitlepage +\DeclareRobustCommand{\titlepage}[2][]{% + \thispagestyle{empty}% + \begingroup% + \ifx\@sftitles\@empty\else\sf\fi% + \begin{center}% + \vspace*{\frontmattertitleskip}% + \begin{doublespace}% + {\Huge\textbf{\thetitle}}\\% + \end{doublespace}% + \vspace*{3cm}% + %{\Large{{\theauthor} \\ {#1}}}\\% + {\Large{{\theauthor}\\}} + \vspace*{8cm}% + {#2}% + \end{center}% + \endgroup% +} +\renewcommand{\maketitle}[1]{\titlepage{}} diff --git a/thesis2/thesis.tex b/thesis2/thesis.tex index 11d34f3..cbf08fc 100644 --- a/thesis2/thesis.tex +++ b/thesis2/thesis.tex @@ -1,31 +1,34 @@ %\documentclass[11pt,a4paper, singlespace,oneside]{book} -\documentclass[11pt,a4paper, singlespace,openany]{book} -%\usepackage[]{uva-seas-thesis} +\documentclass[11pt,a4paper, openany]{book} \usepackage[]{mythesis} \input{custom_macro} -\usepackage{fancyhdr} -\pagestyle{fancy} -\fancyhf{} % clear all headers and footers -%\renewcommand{\headrulewidth}{0pt} % remove rule between header and text -\fancyhead[LE,RO]{\thepage} % put page number in left header on even pages, - % right header on odd pages -\fancyhead[RE]{\nouppercase{\leftmark}} % remove uppercase on chapter title -\renewcommand{\chaptermark}[1]{\markboth{#1}{}} % remove "Chapter N." prefix +\makeatletter +\@ifpackageloaded{hyperref}{ +\hypersetup{ + pdftitle = {A Study of Muon Capture for Muon to Electron Conversion + Experiments}, + pdfsubject = {NT's thesis}, + pdfkeywords = {muon capture, muon to electron conversion, COMET}, + pdfauthor = {\textcopyright\ Nam H. Tran} +} +}{} +\makeatother -\author{John Doe} -\title{Awesome title} - -%\degree{Phd} -%\documenttype{thesis} -%\program{Physics} -%\graduationmonth{9} -%\graduationyear{2014} +\title{A study of proton emission\\ + \vspace{-7mm} %%ad-hoc hack to get the spacing roughly right +following nuclear muon capture\\ +\vspace{2mm} +for the COMET experiment} +\author{Nam Hoai Tran} +\date{September, 2014} \begin{document} -\maketitle -%\include{chapters/chap2_mu_e_conv} -%\input{chapters/frontmatter} +\begin{frontmatter} + \input{chapters/frontmatter} +\end{frontmatter} + +\mainmatter \input{chapters/chap1_intro} \input{chapters/chap2_mu_e_conv} \lipsum[1-15]