有人能告诉我如何在这个模板中将字段“Chair”更改为两个字段“Cochair”吗?提前感谢您的帮助!
答案1
asudis.sty
这很简单,您只需要用文本编辑器编辑文件。
在文件中查找“chair”并进行相应修改
\newcommand{\chair}[1]{\renewcommand{\@chair}{#1}} \newcommand{\cochair}[1]{\renewcommand{\@cochair}{#1}} \newcommand{\@chair}{\tt$\backslash$\string chair} \newcommand{\@cochair}{\tt$\backslash$\string cochair}
在文件中向下滚动并修改
\maketitle
以下内容:\begin{center} \singlespace Approved \@defensemonth\ \@defenseyear\ by the\\ Graduate Supervisory Committee:\\ \ \\ \@chair, Chair\\ \@cochair, Cochair\\ \@memberOne\\ \@memberTwo\\ \@memberThree\\ \@memberFour \end{center}
在文件中定义共同主席
dis.tex
。
答案2
无需更改模板,您可以修补\maketitle
宏以插入相关的共同主席内容:
\documentclass{report}
\usepackage{etoolbox}
\usepackage{geometry} % Just to make asudis work
\usepackage[titles]{tocloft} % Just to make asudis work
\usepackage{fancyhdr} % Just to make asudis work
\newcommand{\bibsection}{} % Just to make asudis work
\usepackage{asudis} % https://github.com/shumway/asudis
\makeatletter
\newcommand{\cochair}[1]{\def\@cochair{#1}} % New \cochair{<cochair>} macro
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\maketitle}{Chair}{Cochair}{}{} % Change Chair > Cochair
\patchcmd{\maketitle}{\@memberOne}{\@cochair, Cochair \\ \@memberOne}{}{} % Add another Cochair
\makeatother
\begin{document}
%-----------------------front matter
\pagenumbering{roman}
\title{Your Title Goes Here}
\author{Your name}
\degreeName{Doctor of Philosophy}
\paperType{Dissertation}
\defensemonth{Some month}
\defenseyear{Some year}
\gradmonth{Graduation month}
\gradyear{Graduation year}
\chair{Your chair}
\cochair{Your cochair}
\memberOne{Your first member}
\memberTwo{Your second member}
\memberThree{Your third member}
\memberFour{Your fourth member}
\maketitle
\end{document}
这使得使用成为\cochair{<cochair>}
强制性的。