summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty')
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty14
1 files changed, 14 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
index 2ac69daec37..4b5940223b1 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
@@ -33,6 +33,20 @@
% 给自定义的宏后面自动加空白
% \RequirePackage{xspace}
+% 借用 ltxdoc 里面的几个命令。
+\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
+\def\cmd@to@cs#1#2{\char\number`#2\relax}
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+
+\newcommand*{\meta}[1]{{%
+ \ensuremath{\langle}\rmfamily\itshape#1\/\ensuremath{\rangle}}}
+\providecommand\marg[1]{%
+ {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+\providecommand\oarg[1]{%
+ {\ttfamily[}\meta{#1}{\ttfamily]}}
+\providecommand\parg[1]{%
+ {\ttfamily(}\meta{#1}{\ttfamily)}}
+\providecommand\pkg[1]{{\sffamily#1}}
% 定义自己常用的东西
\newcommand{\china}{中华人民共和国}