-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmadstyle.sty
More file actions
142 lines (119 loc) · 3.76 KB
/
madstyle.sty
File metadata and controls
142 lines (119 loc) · 3.76 KB
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
%%% imported from MAD-8
% *******************************************************************
% set the indentation at the beginning of a paragraph to zero
% for better lisibility in a manual style
\setlength{\parindent}{0pt} % Default is 15pt.
\pagestyle{headings}
% heading for the \chapter command.
\makeatletter
\renewcommand\@makechapterhead[1]{{
\parindent 0pt\raggedright\LARGE\bfseries
\ifnum \c@secnumdepth >\m@ne
\@chapapp{} \thechapter.\ \ \fi
#1\par\nobreak\vskip 20pt
}}
% heading for the \chapter* command.
\renewcommand\@makeschapterhead[1]{{
\parindent 0pt\raggedright\LARGE
\textbf{#1}\par\nobreak\vskip 20pt
}}
% titles for the lists of figures and tables:
\renewcommand\listoffigures{
\section*{List of Figures}
\@starttoc{lof}
}
\renewcommand\listoftables{
\section*{List of Tables}
\@starttoc{lot}
}
\makeatother
% description lists:
\newcommand\madlabel[1]{#1\hfill}
\newcommand\madlist{\list{}{
\setlength{\labelwidth}{2.3cm}
\setlength{\leftmargin}{2.5cm}
\let\makelabel\madlabel}
}
\let\endmadlist\endlist
\renewcommand\eqref[1]{Eqn.~\ref{#1}}
\newcommand\epem{e${}^+\)-e${}^-$}
% automatic indexing of keywords:
\newcommand\ttitem[1]{\item[\texttt{#1}]\index{#1@\texttt{#1}}}
\newcommand\ttitemn[1]{\item[\texttt{#1}]}
%\newcommand\ttindex[1]{\texttt{#1}\index{#1@\texttt{#1}}}
\newcommand\ttindex[1]{\index{#1@{\uppercase{\texttt{#1}}}}}
\newcommand\madsection[1]{\section{#1}\index{#1@{\uppercase\texttt{#1}}}\label{sec:#1}}
% MAD command specifications:
\newcommand{\madbox}[1]{
\begin{quote}
\ttfamily
\fbox{
\begin{minipage}{0.95\textwidth}
\begin{tabbing}
#1
\end{tabbing}
\end{minipage}
}
\end{quote}
}
\newcommand{\madboxweb}[1]{
\begin{quote}
\ttfamily
% \fbox{
\begin{minipage}{0.95\textwidth}
\begin{tabbing}
#1
\end{tabbing}
\end{minipage}
%}
\end{quote}
}
% MAD command examples:
\newcommand{\madxmp}[1]{
\begin{quote}
\ttfamily
\begin{tabbing}
#1
\end{tabbing}
\end{quote}
}
% Some Mathematical Symbols and Operators
\newcommand\sign{\mathop{\mathrm{sign}}\nolimits}
\newcommand\Tr{\mathop{\mathrm{Tr}}\nolimits}
\newcommand\ad{{\sl Ad\/}}
\newcommand\adphsp{$\{{:}f{:}\}$}
\newcommand\eqnewcommand{\stackrel{newcommand}{=}}
\newcommand\gappeq{\stackrel{>}{\approx}}
\newcommand\lieop[1]{{:}{#1}{:}}
\newcommand\lietran[1]{e^{{:}{#1}{:}}}
\newcommand\map[1]{$\cal #1$}
\newcommand\numclass[1]{\mathrm\textbf{#1}}
\newcommand\order{order}
\newcommand\phsp{\{Z\}}
\newcommand\pbkt[2]{\sum_{k=1}^3\left(
{\partial #1\over\partial q_k}{\partial #2\over\partial p_k} -
{\partial #1\over\partial p_k}{\partial #2\over\partial q_k}
\right)}
\newcommand\aux{\left(p_x^2+p_y^2+\frac{p_t^2}{\beta^2\gamma^2}\right)}
\newcommand\solaux{\left((p_x+ky)^2+(p_y-kx)^2+\frac{p_t^2}{\beta^2\gamma^2}\right)}
\newcommand\vbar{\overline{v}}
\newcommand\wbar{\overline{w}}
% `array' environment using display style
\newcommand\eqarray[1]{\vcenter{\let\\=\cr\openup1\jot
\halign{&\strut$\,\displaystyle{##}\;$\hfil\crcr#1\crcr}}}
% `array' environment using display style for matrices
\newcommand\madarray[1]{\null\vcenter{\let\\=\cr\openup1\jot
\halign{&\strut\hfil$\>\displaystyle{##}\>$\hfil\crcr#1\crcr}}}
% left align displayed equations
\def\[#1\]{$$\indent\leftline{$\displaystyle{#1}$}\hss$$}
\tabskip=0pt plus 1fill
%%% End imported from MAD-8
%%% replacement for hline
\newcommand \madhline
{\noindent\makebox[\linewidth]{\rule{\textwidth}{0.4pt}}}
%%% Handy abbreviations
\newcommand \madeight {\texttt{MAD-8}\xspace}
\newcommand \madnine {\texttt{MAD-9}\xspace}
\newcommand \madx {\texttt{MAD-X}\xspace}
\newcommand \mad \madx
\newcommand \ptc {\texttt{PTC}\xspace}