Current location - Education and Training Encyclopedia - Graduation thesis - How to write Latex macro package
How to write Latex macro package
[2007/ 10/ 19]

\ProvidesClass{thesis}

[2011/04/05v0.1doctoral thesis template]

\LoadClass[cs4size,a4paper,fancyhdr,fntef,UTF8]{ ctex book }[2007/ 10/ 19]

\RequirePackage{amsmath,amsthm,amsfonts,amssymb,bm}

\RequirePackage{apjfonts,epigraph,titlesec,textcomp}

\RequirePackage{natbib}

\ renew command \ title[ 1]{ \ def \ IHEP @ value @ title { # 1 } }

\ renew command \ author[ 1]{ \ def \ IHEP @ value @ author { # 1 } }

\renewcommand\maketitle{%

\clearpage

\thispagestyle{empty}

\vspace*{50pt}

\begin{center}

\ bf \ ì Zi Hao {- 1} Doctoral Dissertation of Graduate School of China Academy of Sciences \ \

\ vskip 50pt lb.

\ BF \ heiti \ zihao { 3 } \ underline { ~ \ IHEP @ value @ title ~ }

\ vskip 20pt lbs

\ BF \ kaishu \ zihao { 4 } \ underline { ~ \ IHEP @ value @ author ~ }

\end{center}

}

\ makeattletter

\ def \ ihep @ value @ title { ~ ~ ~(on ~ text ~ topic ~ item)~ ~ ~ ~

\ def \ ihep @ value @ author {~ ~ ~ (author ~ last name ~ first name) ~ ~ ~

\makeatother

\endinput

Write the test file test.tex, the contents are as follows

\documentclass{thesis}

\ begin {document}

\title{ manuscript paper template}

\ Author {Liyropt}

\ Make a title