]> rtime.felk.cvut.cz Git - opencv.git/blob - opencv/doc/opencv.sty
another warning fixed
[opencv.git] / opencv / doc / opencv.sty
1 \ProvidesPackage{opencv}
2
3 \lstset{ %
4 language=Python,                % choose the language of the code
5 %basicstyle=\footnotesize,       % the size of the fonts that are used for the code
6 %numbers=left,                   % where to put the line-numbers
7 %numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers
8 %stepnumber=2,                   % the step between two line-numbers. If it's 1 each line will be numbered
9 %numbersep=5pt,                  % how far the line-numbers are from the code
10 %backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}
11 showspaces=false,               % show spaces adding particular underscores
12 showstringspaces=false,         % underline spaces within strings
13 showtabs=false,                 % show tabs within strings adding particular underscores
14 %frame=single,                  % adds a frame around the code
15 %tabsize=2,                         % sets default tabsize to 2 spaces
16 %captionpos=b,                   % sets the caption-position to bottom
17 %breaklines=true,                % sets automatic line breaking
18 %breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
19 %escapeinside={\%*}{*)}          % if you want to add a comment within your code
20 }
21
22 \newcommand{\cvclass}[1]{
23 \ifthenelse{\equal{\targetlang}{cpp}}
24 {
25 \subsection{cv::#1}
26 %\addcontentsline{toc}{subsection}{#1} 
27 \index{cv...!#1}
28 }
29 {
30 \subsection{#1}
31 %\addcontentsline{toc}{subsection}{#1} 
32 \index{cv...!#1}
33 }
34 }
35
36 \newcommand{\cvfunc}[1]{
37 \subsection{#1}
38 %\addcontentsline{toc}{subsection}{#1} 
39 \index{cv...!#1}
40 }
41
42 \newcommand{\cvstruct}[1]{
43 \subsection{#1}
44 %\addcontentsline{toc}{subsection}{#1} 
45 \index{cv...!#1}
46 }
47
48 \newcommand{\cvmacro}[1]{
49 \subsection{#1}
50 %\addcontentsline{toc}{subsection}{#1} 
51 \index{cv...!#1}
52 }
53
54 \newcommand{\cvarg}[2]{
55 \item[\texttt{#1}] #2
56 }
57
58 \newcommand{\cvFunc}[2]{
59 \ifthenelse{\equal{\targetlang}{c}}
60 {\subsection{cv#1}\index{cv#1}\label{cfunc.#1}}
61 {\ifthenelse{\equal{\targetlang}{cpp}}
62 {\subsection{cv::#2}\index{cv::#2}\label{cppfunc.#2}}
63 {\subsection{cv.#1}\index{cv.#1}\label{pyfunc.#1}}}}
64
65 \newcommand{\cvCPyFunc}[1]{\cvFunc{#1}{}}
66 \newcommand{\cvCppFunc}[1]{\cvFunc{}{#1}}
67
68 \newcommand{\cvCross}[2]{
69 \ifthenelse{\equal{\targetlang}{c}}
70 {\hyperref[cfunc.#1]{cv#1}}
71 {\ifthenelse{\equal{\targetlang}{cpp}}
72 {\hyperref[cppfunc.#2]{cv::#2}}
73 {\hyperref[pyfunc.#1]{cv.#1}}}}
74
75 \newcommand{\cvCPyCross}[1]{\cvCross{#1}{}}
76 \newcommand{\cvCppCross}[1]{\cvCross{}{#1}}
77
78 \newcommand{\cvdefC}[1]{
79 \ifthenelse{\equal{\targetlang}{c}}{
80 \begin{shaded}
81 \begin{alltt}
82 \setlength{\parindent}{1in}
83 #1
84 \end{alltt}
85 \end{shaded}
86 }{}
87 }
88
89 \newcommand{\cvdefCpp}[1]{
90 \ifthenelse{\equal{\targetlang}{cpp}}{
91 \begin{shaded}
92 \begin{alltt}
93 \setlength{\parindent}{1in}
94 #1
95 \end{alltt}
96 \end{shaded}
97 }{}
98 }
99
100 \newcommand{\cvdefPy}[1]{
101 \ifthenelse{\equal{\targetlang}{python}}{
102 \begin{shaded}
103 \begin{alltt}
104 \setlength{\parindent}{1in}
105 #1
106 \end{alltt}
107 \end{shaded}
108 }{}
109 }
110
111 \newcommand{\cvC}[1]{
112 \ifthenelse{\equal{\targetlang}{c}}{#1}{}
113 }
114
115 \newcommand{\cvCpp}[1]{
116 \ifthenelse{\equal{\targetlang}{cpp}}{#1}{}
117 }
118
119 \newcommand{\cvPy}[1]{
120 \ifthenelse{\equal{\targetlang}{python}}{#1}{}}
121
122 \newcommand{\cvCPy}[1]{
123 \ifthenelse{\equal{\targetlang}{c}\or\equal{\targetlang}{python}}{#1}{}
124 }
125
126 \newcommand{\cvcode}[1]{
127 \begin{shaded}
128 \begin{alltt}
129 \setlength{\parindent}{1in}
130 #1
131 \end{alltt}
132 \end{shaded}
133 }
134
135 %\newcommand{\cross}[1]{#1 (page \pageref{#1})}
136 \newcommand{\cross}[1]{ \hyperref[#1]{#1} }
137
138 \newcommand{\matTT}[9]{
139 \[
140 \left|\begin{array}{ccc}
141  #1 & #2 & #3\\
142  #4 & #5 & #6\\
143  #7 & #8 & #9
144 \end{array}\right|
145 \]
146 }
147
148 \newcommand{\fork}[4]{
149   \left\{
150   \begin{array}{l l}
151   #1 & \mbox{#2}\\
152   #3 & \mbox{#4}\\
153   \end{array} \right.}
154 \newcommand{\forkthree}[6]{
155   \left\{
156   \begin{array}{l l}
157   #1 & \mbox{#2}\\
158   #3 & \mbox{#4}\\
159   #5 & \mbox{#6}\\
160   \end{array} \right.}
161
162 \newcommand{\vecthree}[3]{
163 \begin{bmatrix}
164  #1\\
165  #2\\
166  #3
167 \end{bmatrix}
168 }
169
170 \newcommand{\vecthreethree}[9]{
171 \begin{bmatrix}
172  #1 & #2 & #3\\
173  #4 & #5 & #6\\
174  #7 & #8 & #9
175 \end{bmatrix}
176 }
177
178 % allow special plastex handling
179 \newif\ifplastex
180 \plastexfalse
181