help with a latex -> context conversion
Hello: I am intending to write my masters thesis using context. My university publishes a style guide in addition to a latex cls file. I am trying to reproduce the titlepage. I have been using the wiki (specifically http://wiki.contextgarden.net/Document_Titles#In_ConTeXt:_A_more_ advanced_solution). But I have not been able to add addition fields beyond the present title, author, date. Here is the relevant portion on the latex file. %%---------------------define command in the titlepage-------------------- \newcommand{\submittext}{A THESIS SUBMITTED IN PARTIAL FULFILLMENT% OF THE REQUIREMENTS FOR THE DEGREE OF} \newcommand{\thesisnote}{by} \newcommand{\gaunote}{In the Graduate Academic Unit of } \newcommand{\acceptnote}{This thesis is accepted} \newcommand{\dean}{Dean of Graduate Studies} \newcommand{\school}{THE UNIVERSITY OF NEW BRUNSWICK} % % % DECLARATIONS % % These macros are used to declare arguments needed for the % construction of the title page and other preamble. % % candidate's previous degree \def\predegree#1{\gdef\@predegree{#1}} % % The full (unabbreviated) name of the degree \def\degree#1{\gdef\@degree{#1}} % % The name of your Graduate Academic Unit(eg. Computer Science, Maths, Physics) \def\gau#1{\gdef\@gau{#1}} % %your supervisor including name, degree department or field \def\supervisor#1{\gdef\@supervisor{#1}} % %examining board including name, degree department or field starting from Chair \def\examboard#1{\gdef\@examboard{#1}} % %external examiner including name, degree, department or field and Institution \def\externalexam#1{\gdef\@externalexam{#1}} % %copyright including name of candiate and year of graduation \def\copyrightyear#1{\gdef\@copyrightyear{#1}} %define title page layout % \newcommand{\unbtitlepage}{% \thispagestyle{empty}% \begin{center} \normalfont\Large\bfseries\@title\\ \vskip 1em \normalfont\normalsize\thesisnote\\ \vskip 1em \normalfont\normalsize\@author\\ \vskip 1em \normalfont\normalsize\bfseries\@predegree\\ \vskip 2em \normalfont\normalsize\bfseries\submittext\\ \vskip 2em \normalfont\normalsize\bfseries\@degree\\ \vskip 1em \normalfont\normalsize\gaunote \@gau \vskip 1em \end{center} \begin{table}[!h] \begin{tabular}{l l} Supervisor(s): & \@supervisor \\ Examining Board: & \@examboard \\ External Examiner: & \@externalexam %\@externalexam \end{tabular} \end{table} \begin{center} \normalfont\normalsize\acceptnote\\ \vskip 2em \normalfont\normalsize\dean\\ \vskip 1em \normalfont\normalsize\bfseries\school\\ \vskip 0.5em \normalfont\normalsize\bfseries\@date\\ \vskip 0.5em \normalfont\normalsize\copyright \@author, \@copyrightyear \end{center}} %-----------end of Title page-------------------- Any hints? Thank you for your time, Brent
On Wed, 10 Dec 2008, Zoho Vignochi wrote:
Hello:
I am intending to write my masters thesis using context. My university publishes a style guide in addition to a latex cls file. I am trying to reproduce the titlepage. I have been using the wiki (specifically http://wiki.contextgarden.net/Document_Titles#In_ConTeXt:_A_more_ advanced_solution). But I have not been able to add addition fields beyond the present title, author, date.
Here is the relevant portion on the latex file.
[latex code snipped]
Any hints?
Thank you for your time,
Here is how I would do it. Most of it is literal translation of latex commands, using a contextish style. % Put this in your environment file. \unprotect \def\setupthesis {\dosingleargument\dosetupthesis} \def\dosetupthesis[#1]% {\setvariables[thesis][#1]} \def\setupthesistext {\dosingleargument\dosetupthesistext} \def\dosetupthesistext[#1]% {\setvariables[thesis:text][#1]} \definefont[ThesisTitleFont][SerifBold sa 1.4] \setupthesistext [ submitted={A THESIS SUBMITTED IN PARTIAL FULFILLMENT% OF THE REQUIREMENTS FOR THE DEGREE OF}, note={by}, academicunit={In the Graduate Academic Unit of}, accepted={This thesis is accepted}, dean={Dean of Graduate Studies}, school={THE UNIVERSITY OF NEW BRUNSWICK}, copyright={Copyright}, ] \setupthesis [ title=, author=, prevdegree=, academicunit=, degree=, supervisor=, board=, external=, year=, ] \def\placethesistitle {\startstandardmakeup[top=,bottom=] \startalignment[middle,broad] {\ThesisTitleFont\setupinterlinespace \getvariable{thesis}{title}\endgraf} \blank[1em] \getvariable{thesis:text}{note} \blank[1em] \getvariable{thesis}{author} \blank[1em] \bold{\getvariable{thesis}{prevdegree}} \blank[2em] \bold{\getvariable{thesis:text}{submitted}} \blank[2em] \bold{\getvariable{thesis}{degree}} \blank[1em] \getvariable{thesis}{text:academicunit}\space \getvariable{thesis}{academicunit} \blank[1em] \stopalignment \starttabulate[|l|l|] \NC Supervisor(s): \NC \getvariable{thesis}{supervisor} \NC \NR \NC Examining Board: \NC \getvariable{thesis}{board} \NC \NR \NC External Examiner: \NC \getvariable{thesis}{external} \NC \NR \stoptabulate \startalignment[middle,broad] \getvariable{thesis:text}{accepted} \blank[2em] \getvariable{thesis:text}{dean} \blank[1em] \bold{\getvariable{thesis:text}{school}} \blank[0.5em] \bold{\getvariable{thesis}{date}} \blank[0.5em] \getvariable{thesis}{copyright}\space \getvariable{thesis}{author},\space\getvariable{thesis}{year} \stopalignment \stopstandardmakeup} \protect % The main file \starttext \setupthesis [ title={Thesis Title}, author={Joe Doe}, prevdegree={Previous degree}, academicunit={Academic Unit}, degree={Full name of degree}, supervisor={Name of supervisor}, board={Board}, external={External}, year={year}, ] \placethesistitle \dorecurse{10}{\input knuth \endgraf} \stoptext Aditya
participants (2)
-
Aditya Mahajan
-
Zoho Vignochi