如何编写乳液宏包

乳胶宏包就是模板,分为类别(以。cls为后缀,在documentclass命令中使用)和风格(以。猪圈为后缀,在使用包命令中使用),如常见的书,文章类;以及图形,标题包等乳胶。提供了专门的工具文档/文档条来编写宏包p 简单的包完全可以自己动手写,先看一个简单的例子,我们的目的是最终写出一个完整的毕业论文模板论文. cls .

编写论文. cls内容如下:

\ needs tex format { latex 2e }[27/1/19]

\ provides class { Thesis }

[211/4/5v .1博士论文模板]

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

\ require package { AMS math,amsthm,amsfonts,amssymb中国科学院研究生院\\博士学位论文\ vskip 5pt

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

\ vskip 2pt

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

\ end { center }

}

\ makeat letter

\ def \ IHEP @ value @ title { ~ ~ ~(论~文~题~目)~ ~ ~ ~ ~ }

\ def \ IHEP @ value @ author { ~ ~ ~ ~(作~者~姓~名)~ ~ ~ ~ ~ }

\ makeatother

\ endinput

写测试文件test.tex,内容如下\ document class { thesis } \ begin { document }

\ title {编写论文模板}

\ author { Li ropt }

\ make title

\ end { document }

将论文. cls和测试. tex放在同一目录下,用乳液编译

转载