ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* help with a latex -> context conversion
@ 2008-12-10  0:51 Zoho Vignochi
  2008-12-12  5:00 ` Aditya Mahajan
  0 siblings, 1 reply; 2+ messages in thread
From: Zoho Vignochi @ 2008-12-10  0:51 UTC (permalink / raw)
  To: ntg-context

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


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: help with a latex -> context conversion
  2008-12-10  0:51 help with a latex -> context conversion Zoho Vignochi
@ 2008-12-12  5:00 ` Aditya Mahajan
  0 siblings, 0 replies; 2+ messages in thread
From: Aditya Mahajan @ 2008-12-12  5:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-12  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-10  0:51 help with a latex -> context conversion Zoho Vignochi
2008-12-12  5:00 ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).