More Related Content Similar to How to write LaTeX package Similar to How to write LaTeX package (20) How to write LaTeX package1. L TEX
A
LittleLeo@newsmth
2007.9.27 7. ♣
author{ }
♣
title{ } 8. ♣
author{ }
♣
title{ }
♣
defchapter#1{cleardoublepageheisanhao #1} 10. The TEXbook, The L TEX Companion, TEX for the Impatient
A
L TEX2ε for class and package writers
A 11. The TEXbook, The L TEX Companion, TEX for the Impatient
A
L TEX2ε for class and package writers
A
L TEX
A 12. The TEXbook, The L TEX Companion, TEX for the Impatient
A
L TEX2ε for class and package writers
A
L TEX
A
TEX L TEX
A 13. The TEXbook, The L TEX Companion, TEX for the Impatient
A
L TEX2ε for class and package writers
A
L TEX
A
TEX L TEX
A 14. The TEXbook, The L TEX Companion, TEX for the Impatient
A
L TEX2ε for class and package writers
A
L TEX
A
TEX L TEX
A
comp.text.tex 15. The TEXbook, The L TEX Companion, TEX for the Impatient
A
L TEX2ε for class and package writers
A
L TEX
A
TEX L TEX
A
comp.text.tex
Google 16. The TEXbook, The L TEX Companion, TEX for the Impatient
A
L TEX2ε for class and package writers
A
L TEX
A
TEX L TEX
A
comp.text.tex
Google 17. TEX L TEX
A
♣
♣
♣ aux/bbl
♣ latex 18. TEX L TEX
A
♣
♣
♣ aux/bbl
♣ latex
newif, ifcondition, show, par, csname, endcsname, hbox,
hskip, vbox, vskip, hrule, vrule, hspace, parbox,
minipage, fontsize, clearpage, cleardoublepage, pagestyle,
setlength, addtolength, AtBeginDocument, AtEndDocument,
...... 19. (2)
♣ def def, let, newcommand, renewcommand
♣ if ifx, ifnum, @ifnextchar
♣ expand expandafter, noexpand
♣ relax, empty 20. (2)
♣ def def, let, newcommand, renewcommand
♣ if ifx, ifnum, @ifnextchar
♣ expand expandafter, noexpand
♣ relax, empty
L TEX
A
♣ m@ne, z@, @ne, @tempa
♣ hb@x, hb@xt@, @namedef, @nameuse
♣ fnum@type, ext@type, l@type
♣ ps@type, c@counter 21. L TEX
A
author
defauthor#1{def@author{#1}} 22. L TEX
A
author
defauthor#1{def@author{#1}}
@ifnextchar
defchapter{
@ifnextchar * {@chapter[]}{@chapter}}
def@chapter[#1]#2{%
ifopenrightcleardoublepageelseclearpagefi
begingroup
heisan #2
endgroupvskip20pt
addcontentsline{toc}{#1}} 23. L TEX
A (2)
letoldcmd=cmd
defcmd#1{precmdoldcmd#1postcmd} 24. L TEX
A (2)
letoldcmd=cmd
defcmd#1{precmdoldcmd#1postcmd}
newenvironment{envname}
{begin code}
{end code}
defenvname{begin code} % begin{envname}
defendenvname{end code} % end{envname}
defbegin#1{csname #1endcsname}
defend#1{csname end#1endcsname} 26. (2)
defps@thu@headings{%
def@oddhead{vbox toheadheight{%
hb@xt@textwidth{%
hfillwuhaosongleftmarkifthu@bachelorrelaxelsehfillfi}
vskip2pthbox{vrule widthtextwidth height0.4pt depth0pt}}}
def@evenhead{vbox toheadheight{%
hb@xt@textwidth{wuhaosong%
ifthu@bachelorthu@schoolenamethu@bachelor@subtitle%
elsehfillleftmarkfihfill}%
vskip2pthbox{vrule widthtextwidth height0.4pt depth0pt}}}
def@oddfoot{hfilwuhaothepagehfil}
let@evenfoot=@oddfoot}
pagestyle{thu@headings} 29. (5)
defthu@parse@keywords#1{
expandaftergdefcsname thu@#1endcsname{} % todo: need or not?
expandaftergdefcsname #1endcsname##1{
@forreserved@a:=##1do{
expandafterifxcsname thu@#1endcsname@emptyelse
expandafterg@addto@macrocsname thu@#1endcsname{%
ignorespacescsname thu@#1@separatorendcsname}
fi
expandafterexpandafterexpandafterg@addto@macro%
expandaftercsname thu@#1expandafterendcsname%
expandafter{reserved@a}}}}
thu@parse@keywords{ckeywords}
thu@parse@keywords{ekeywords}
% ekeywords{LaTeX, thesis, fault tolerance} 30. (6)
newenvironment{denotation}[1][2.5cm]{
thu@chapter*[]{thu@denotation@name} % no tocline
noindentbegin{list}{}%
{vskip-30bpxiaosi[1.6]
renewcommandmakelabel[1]{##1hfil}
setlength{labelwidth}{#1} % label box width
setlength{labelsep}{0.5cm} % label to text
setlength{itemindent}{0cm} % label indent
setlength{leftmargin}{labelwidth+labelsep} % left margin
setlength{rightmargin}{0cm}
setlength{parsep}{0cm} %
setlength{itemsep}{0cm} % label vspace
setlength{listparindent}{0cm} % parindent from the second par
setlength{topsep}{0pt} % vskip to top text
}}{end{list}} 32. L TEX
A
class: documentclass{thuthesis}
style: usepackage{thutils} 33. [ ]
NeedsTeXFormat{LaTeX2e}[1999/12/01]
ProvidesClass{thuthesis}
[2007/05/13 3.0 Tsinghua University Thesis Template]
%ProvidesPackage{thutils}
% [2007/05/13 3.0 Tsinghua University Thesis Template]
% code body
endinput 34. L TEX
A
%%
%% Minimal LaTeX class file.
%%
NeedsTeXFormat{LaTeX2e}
ProvidesClass{minimal}[2001/05/25 Standard LaTeX minimal class]
renewcommandnormalsize{fontsize{10pt}{12pt}selectfont}
setlength{textwidth}{6.5in}
setlength{textheight}{8in}
pagenumbering{arabic} % but no page numbers are printed because:
pagestyle{empty} % this is actually already in the kernel 35. ♣ How to Package Your L TEX Package
A
♣ The Docstrip Program
♣ The doc and shortvrb Packages
♣ 36. ♣
♣
♣
Emacs+AucTEX+RefTEX+CDLTX 38. CJK
Doc
http://thuthesis.sf.net 40. 1 1 5.3 . . . . . . . . . . . . 20
5.4 . . . . . . . . . . . 22
2 1
5.4.1 Three matters . . . . . . 22
2.1 . . . . . . . . . . . . . . . 1
5.4.2 . . . . . . . . . . 23
2.2 . . . . . . . . 2
5.4.3 . . . . . . . . 25
2.3 . . . . . . . . . . . . 3
5.4.4 . . . . . . . . 26
2.4 . . . . . . . . . . . . 3
5.4.5 . . . . . . . . . . 27
2.4.1 dvi→ps→pdf . . . . . . 4
5.4.6 . . . . . . . . . . 28
2.4.2 dvipdfm(x) . . . . . . . 4
5.4.7 . . . . . . . . 29
2.4.3 pdflatex . . . . . . . . . 4
5.4.8 . . 31
2.4.4 . . . . . . 5
5.4.9 . . . . . 32
2.5 . . . . . . . . . . . . . . . 6
5.4.10 . . . . . . . . 33
3 6 5.4.11 . . . . . . . . 36
3.1 . . . . . . . . . . . . 6 5.4.12 . . . . . . 37
3.2 TT . . . . . . 6 5.4.13 . . . . . . . . 44
3.3 TT . . . . . . 7 5.4.14 . . . . . . 45
3.4 . . . . . . . . . . . . . . . 8 5.4.15 . . . . . 46
3.5 . . . . . . . . . . . . . . . 9 5.4.16 . . . . . . . . 47
3.5.1 . . . . . 10 5.4.17 . . . . . . . . 48
3.5.2 . . . . . . . . 12 5.4.18 . . . . . . . . . . 49
3.5.3 . . . . . . . . 14 5.4.19 . . . . . . . . 49
3.6 . . . . . . . . . . . . 16 5.4.20 . . . . . . . . . . 50
3.7 . . . . . . . . 17 5.4.21 . . . . . . . . . . 51
5.4.22 . . 51
4 17
5.4.23 . . . . . . . . . . 52
5 19
53
5.1 . . . . . . . . . . . . 19
5.2 . . . . . . . . . . . . 19 57 44. L TEX
A (1)
begin{document}
vspace*{0.5cm}
vspace
begin{center}
begin
{zihao heiti {huge bf LaSalle} 定理及其在稳定性分析中的应用{huge $^*$}}[0.7cm]
zihao
zihao{2}heiti huge huge ^
zihao{4} 无名氏qquad {large $^dagger
zihao
{zihao ^dagger
qquad large ^dagger$}}[0.2cm]
{zihao ( 山 东 大 学 控 制 科 学 与 工 程 学 院 ~~~ 山 东 济 南 quad 邮 编 :~{footnotesize tt
zihao
zihao{6} footnotesize
250061})}[0.1cm]
end{center}
end
begin
begin{table}[b]
begin{tabular}{l}
begin
rule[0.2ex]{5cm}{0.1mm}
rule
textwidth
parbox[t]{0.95textwidth
parbox textwidth}{
baselineskip
setlength{baselineskip baselineskip zihao
setlength baselineskip}{0.8baselineskip {zihao
baselineskip}} zihao{6}
hspace{-2mm}{small $^*$}本研究得到国家自然科学基金资助(批准号:~{{
hspace small ^
footnotesize }})和山东省科技发展计划资助(批准号:~{{ footnotesize }}).}[-1.5mm]
zihao
{zihao hspace
zihao{6},,,,hspace small ^dagger$}联系人:~heiti }: 山东大学, 控制科学与
^dagger
hspace{-2mm}{{small $^dagger heiti
工程学院(邮编: {footnotesize
footnotesize
footnotesize250061},~电话:~{ footnotesize {tt 0111-1234?678}},
tt
电子邮箱:~{footnotesize {tt lygfr@sdu.edu.cn}}).}[-1.5mm] {,,,zihao
footnotesize tt zihao{6}{heiti 无名氏}的
zihao heiti
电子邮箱:~footnotesize {tt wumingshi@126.com.}}
footnotesize tt
end
end{tabular}
end{table}
end 45. L TEX
A (2)
Large
{Large zihao
Large1~~~zihao
zihao{4}引~~言}
vskip
vskip3mm
系统理论中最基本的问题是动态系统的稳定性.对非线性动态系统的稳定性分析有最大
贡献的应属Lyapunov[ ].Lyapunov定理及Barbashin-Krasovskii-LaSalle
不变集原理
[5mm]
Large
{Large zihao{4}LaSalle 定理}
zihao
Large2~~~zihao
vskip3mm
vskip
首先给出如下两个定义.
{heitibf 定义,1}~{kaishu 如果系统,dref
heiti
heitibf kaishu dref
dref{eq.sys},的解,$x(t)$,起始于,$ M$,并始终在
dref
,$M$,内,~那么称,$M$,为系统,dref
dref{eq.sys},的不变集.}
[5mm]
Large
{Large zihao{4}LaSalle 定理的推广}
zihao
Large3~~~zihao
vskip3mm
vskip 48. —
Word Word
TEX Word TEX
Word TEX 49. Thank you!
Institute of Structural Mechanics, CAEP, P.O.Box
Address: 919-414, Mianyang, Sichuan, China, 621900
E_mail: qlx1205@263.net & qian_lixin@sohu.com
08162485474(O), 08162482055(H),
Tel: 13981148905(M)
Fax: 08162281485
Ruini Xue