如何编写Latex宏包
\ProvidesClass{thesis}
[2011/04/05v 0.1博士论文模板]
\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 \宋体\子豪{-1}中国科学院研究生院博士学位论文\ \
\ vskip 50pt磅
\ BF \ heiti \ zihao { 3 } \ underline { ~ \ IHEP @ value @ title ~ }
\ vskip 20pt磅
\ BF \ kaishu \ zihao { 4 } \ underline { ~ \ IHEP @ value @ author ~ }
\end{center}
}
\ makeattletter
\ def \ ihep @ value @ title { ~ ~ ~(on ~ text ~ topic ~ item)~ ~ ~ ~
\ def \ ihep @ value @ author {~ ~ ~(作者~姓氏~名字)~ ~ ~ ~
\makeatother
\endinput
编写测试文件test.tex,内容如下
\documentclass{thesis}
\ begin {文档}
\title{稿纸模板}
\作者{Liyropt}
\制作标题