summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/montex/mtdocmac.tex
blob: a45605cd0a9331f0ff8fde7738ec713b8c5a2a7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
%%
%% The following commands and command groups are only used
%% for abbreviating the typing work of the documentation.
%%
%% Special thanks to Dan Luecking who suggested to add a \kern0pt
%% after \exa and \exb; without these, pdfelatex and elatex would
%% result in a different page layout!
%%
\newcommand\exa{\nopagebreak \begin{flushleft}\smallskip \nopagebreak
                \begin{minipage}[t]{6cm}\sloppy\kern0pt}%
\newcommand\exb{\end{minipage}\kern 1cm\begin{minipage}[t]{8cm}\sloppy\kern0pt}%
\newcommand\exc{\end{minipage}\kern -3cm \smallskip\end{flushleft}}%
%
%\renewcommand{\MonTeX}{Mon\TeX\ \textsf{Mongolian for \LaTeX}}
%
% The commands \cmd and \cmda take one argument, check whether
% they've seen it before, and if not, create a label with the
% argument's name. Otherwise, they confine themselves to putting the
% argument in the margin and making it stand out \texttt-like, which
% is the default behaviour even if a label is defined.
%
% The difference between \cmd and \cmda is simple. \cmd accepts a
% command name _without_ the leading backslash and prints it with
% backslash. \cmda takes _arguments_ to other commands, environments
% etc.
%
% The code was inspired by the acronym package.
%
\newcommand{\cmd}[1]{%
	\expandafter\ifx\csname cmd@#1\endcsname\relax
		\expandafter\gdef\csname cmd@#1\endcsname{#1}%
		\label{cmd:#1}
		% (new label: #1)
	\else
		% (label #1 already defined, do nothing!)
	\fi
	\texttt{\char92 #1}%
	\marginpar{\texttt{\char92 #1}}%
}
%
\newcommand{\cmda}[1]{%
	\expandafter\ifx\csname cmda@#1\endcsname\relax
		\expandafter\gdef\csname cmda@#1\endcsname{#1}%
		\label{a:#1}
		% (new label: a:#1)
	\else
		% (label #1 already defined, do nothing!)
	\fi
	\texttt{#1}%
	\marginpar{\texttt{#1}}%
}
%
\newcommand{\refcmd}[1]{%
	\texttt{\char92 #1}
	(see section~\ref{cmd:#1}, page~\pageref{cmd:#1})
}
%
\newcommand{\refcmda}[1]{%
	\texttt{#1}
	(see section~\ref{a:#1}, page~\pageref{a:#1})
}
%
\ifthenelse{\value{GreekGammaAvailable}=1}{%
	\def\IfG#1{#1}%
	}
	{\def\IfG#1{}%
	}
%
\newcommand{\Soyombo}{\textsc{Soyombo}}
\newcommand{\Zanabazar}{\textsc{Zanabazar}}
\newcommand{\XD}{\textsc{X\"awt\"a\"a D\"orw\"oljin}}
\newcommand{\LMA}{\textsf{LMA}}
\newcommand{\LMC}{\textsf{LMC}}
\newcommand{\LMO}{\textsf{LMO}}
\newcommand{\LMS}{\textsf{LMS}}
\newcommand{\LMT}{\textsf{LMT}}
\newcommand{\LMU}{\textsf{LMU}}
\newcommand{\LMX}{\textsf{LMX}}
\newcommand{\Tone}{\textsf{T1}}
\newcommand{\Ttwo}{\textsf{T2}}
\newcommand{\TW}{{\mnr S\"UXBAT}}
\newcommand{\WT}{{\rnm S\"UXBAT}}
\newcommand{\Tw}{{\mnr S\"uxbat}}
\newcommand{\Wt}{{\rnm S\"uxbat}}
\newcommand{\WtSh}{{\rnm S\"uxbat \IfG{\Sh a\g dur}}}

\newcommand{\ff}[1]{\fontfamily{#1}}
\newcommand{\fs}[1]{\fontseries{#1}}
\newcommand{\fsh}[1]{\fontshape{#1}}

\newcommand{\tttt}[1]{\texttt{\char92#1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% The Captions List is helpful for presenting the captions in
% various languages.
%
\newcommand{\CaptionsList}[1]{%
	\begin{center}
	\begin{tabular}{l|l|l}
	 Command			& English	& #1 \\
	 \hline
	 \tttt{prefacename}	& Preface	& \prefacename\\
	 \tttt{refname}		& References	& \refname\\
	 \tttt{abstractname}	& Abstract	& \abstractname\\
	 \tttt{bibname}		& Bibliography	& \bibname\\
	 \tttt{chaptername}	& Chapter	& \chaptername\\
	 \tttt{appendixname}	& Appendix	& \appendixname\\
	 \tttt{contentsname}	& Contents	& \contentsname\\
	 \tttt{listfigurename}	& List of Figures& \listfigurename\\
	 \tttt{listtablename}	& List of Tables& \listtablename\\
	 \tttt{indexname}	& Index		& \indexname\\
	 \tttt{figurename}	& Figure	& \figurename\\
	 \tttt{tablename}	& Table		& \tablename\\
	 \tttt{partname}	& Part		& \partname\\
	 \tttt{enclname}	& encl		& \enclname\\
	 \tttt{ccname}		& cc		& \ccname\\
	 \tttt{headtoname}	& To		& \headtoname\\
	 \tttt{pagename}	& Page		& \pagename\\
	 \tttt{seename}		& see		& \seename\\
	 \tttt{alsoname}	& see also	& \alsoname\\
	 \end{tabular}
	\captionsenglish
	\caption{Captions in #1%
		\label{#1captions}}
	\end{center}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% The following command creates the structure of each entry in the
% Command Reference.
%
\newcommand{\MyEnvironment}[8]{%
	\hrule
	\section[\texttt{\hskip1em#1}]%
		{\texttt{#1}}% Command Name
	\begin{description}
	\ifthenelse{\equal{#2}{-}}%
		{}{\item [Synopsis] \texttt{#1}#2}
	\item [Function] \emph{(Environment \emph{or} Option) }#3	% Function
	\ifthenelse{\equal{#5}{-}}%
		{}{\item [Limitations] #5}	% Limitations
	\ifthenelse{\equal{#6}{-}}%
		{}{\item [Comments] #6}	% Comments
	\ifthenelse{\equal{#7}{-}}%
		{}{\item [Related commands] \texttt{#7}}% See also
	\ifthenelse{\equal{#8}{-}}%
		{}{\item [See page] \pageref{#8}}% See page
	\ifthenelse{\equal{#4}{-}}%
		{}{\item [Example]}
	\end{description}
	\ifthenelse{\equal{#4}{+}}{\vspace{-6mm}}{}%
	}
%
\newcommand{\MyCommand}[8]{%
	\hrule
	\section[\hskip1em\tttt{#1}]%
		{\tttt{#1}}% Command Name
	\begin{description}
	\ifthenelse{\equal{#2}{-}}%
		{}{\item [Synopsis] \tttt{#1}#2}
	\item [Function]  \emph{(Command) }#3	% Function
	\ifthenelse{\equal{#5}{-}}%
		{}{\item [Limitations] #5}	% Limitations
	\ifthenelse{\equal{#6}{-}}%
		{}{\item [Comments] #6}	% Comments
	\ifthenelse{\equal{#7}{-}}%
		{}{\item [Related commands] \texttt{#7}}% See also
	\ifthenelse{\equal{#8}{-}}%
		{}{\item [See page] \pageref{#8}}% See page
	\ifthenelse{\equal{#4}{-}}%
		{}{\item [Example]}
	\end{description}
	\ifthenelse{\equal{#4}{+}}{\vspace{-6mm}}{}%
	}
%
\endinput
%
% The file mtdocmac.tex ends here. Do not expect any secret to
% follow!
%
% OC, Berlin, Beijing, Ulaanbaatar 2001
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%