-
Notifications
You must be signed in to change notification settings - Fork 2
/
tutoriais.sty
157 lines (136 loc) · 4.86 KB
/
tutoriais.sty
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
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{xcolor}
\usepackage{shadethm}
\usepackage{amssymb}
\usepackage{listings}
\usepackage{textcomp} % this package is usefull to enable copy and paste of codes of the pdf.
\usepackage[dvipsnames]{color}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{framed}
\newshadetheorem{theorem}{Teorema}[section]
\newshadetheorem{lemma}[theorem]{Lema}
\newshadetheorem{corolary}[theorem]{Corolário}
\newshadetheorem{proposition}[theorem]{Proposição}
\theoremstyle{definition}
\setlength{\shadeboxrule}{.4pt}
\newcommand{\defineshdwidth}[1]{
\setlength{\shadedtextwidth}{\textwidth}
\addtolength{\shadedtextwidth}{-#1}
\addtolength{\shadedtextwidth}{-#1}
\setlength{\shadeleftshift}{#1}
}
\newshadetheorem{definition}[theorem]{Definição}
\newshadetheorem{example}{Exemplo}[section]
\newcommand{\theorembegin}[1]{
\definecolor{shadethmcolor}{HTML}{FFEEEE}
\definecolor{shaderulecolor}{HTML}{AA0000}
\begin{theorem}[#1]}
\newcommand{\theoremend}{\end{theorem}}
\newcommand{\lemmabegin}[1]{
\definecolor{shadethmcolor}{HTML}{FFEEEE}
\definecolor{shaderulecolor}{HTML}{AA0000}
\begin{lemma}[#1]}
\newcommand{\lemmaend}{\end{lemma}}
\newcommand{\corolarybegin}[1]{
\definecolor{shadethmcolor}{HTML}{FFEEEE}
\definecolor{shaderulecolor}{HTML}{AA0000}
\begin{corolary}[#1]}
\newcommand{\corolaryend}{\end{corolary}}
\newcommand{\propositionbegin}[1]{
\definecolor{shadethmcolor}{HTML}{FFEEEE}
\definecolor{shaderulecolor}{HTML}{AA0000}
\begin{proposition}[#1]}
\newcommand{\propositionend}{\end{proposition}}
\newcommand{\definitionbegin}[1]{
\definecolor{shadethmcolor}{HTML}{DDDDDD}
\definecolor{shaderulecolor}{HTML}{000000}
\begin{definition}[#1]}
\newcommand{\definitionend}{\end{definition}}
\newcommand{\examplebegin}{
\definecolor{shadethmcolor}{HTML}{EEFFFF}
\definecolor{shaderulecolor}{HTML}{00AAAA}
\begin{example}}
\newcommand{\exampleend}{\end{example}}
\newcommand{\proofbegin}{
\definecolor{shadethmcolor}{HTML}{EEFFEE}
\definecolor{shaderulecolor}{HTML}{00AA00}
\begin{shadebox}
\begin{proof}}
\newcommand{\proofend}{\end{proof}\end{shadebox}}
%\newenvironment{proof}[1][Demonstração:]{\begin{trivlist}
%\item[\hskip \labelsep {\bfseries #1}]}{\begin{flushright}$\blacksquare$\end{flushright}\end{trivlist}}
\renewcommand{\labelenumi}{\textbf{\arabic{enumi}.}}
\renewcommand{\labelenumii}{\textbf{\arabic{enumii}.}}
\renewcommand{\labelenumiii}{\textbf{\arabic{enumiii}.}}
\renewcommand{\labelenumiv}{\textbf{\arabic{enumiv}.}}
\newcommand{\RemR}{\R\tende\R}
\newcommand{\RnemR}[1]{\Rn{#1}\tende\R}
\newcommand{\RemRn}[1]{\R\tende\Rn{#1}}
\newcommand{\RnemRn}[2]{\Rn{#1}\tende\Rn{#2}}
\newcommand{\barra}[1]{\overline{#1}}
\newcommand{\beq}{\begin{eqnarray*}}
\newcommand{\bigo}{\mathcal{O}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Cn}[1]{\mathbb{C}^{#1}}
\newcommand{\Cmn}[2]{\mathbb{C}^{{#1}\times{#2}}}
\newcommand{\eeq}{\end{eqnarray*}}
\newcommand{\hess}{\nabla^2}
\newcommand{\Img}{\mbox{Im}}
\newcommand{\Lagr}{\mathcal{L}}
\newcommand{\matriz}[4]{\left[\begin{array}{cc}#1 & #2 \\ #3 & #4\end{array}\right]}
\newcommand{\meio}{\frac{1}{2}}
\newcommand{\modulo}[1]{\vert #1\vert}
\newcommand{\norma}[1]{\Vert #1\Vert}
\newcommand{\Nu}{\mathcal{N}}
\newcommand{\prodint}[2]{\langle {#1}, {#2} \rangle}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Rn}[1]{\mathbb{R}^{#1}}
\newcommand{\Rmn}[2]{\mathbb{R}^{{#1}\times{#2}}}
\newcommand{\tende}{\longrightarrow}
\newcommand{\vetor}[2]{\left[\begin{array}{c}#1 \\ #2\end{array}\right]}
\newcommand{\Vetor}[1]{\left[\begin{array}{c} #1 \end{array}\right]}
\newcommand{\vetord}[2]{\left[\begin{array}{cc} #1 & #2 \end{array}\right]}
\definecolor{darkred}{rgb}{0.7,0,0}
\definecolor{darkgreen}{rgb}{0,0.7,0}
\definecolor{darkblue}{rgb}{0,0,0.7}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{darkgray}{rgb}{0.25,0.25,0.25}
\definecolor{lightgray}{rgb}{0.75,0.75,0.75}
\definecolor{termcolor}{rgb}{0.95,0.95,0.95}
\definecolor{codecolor}{rgb}{1.0,1.0,1.0}
%\newenvironment{terminal}{\begin{lstlisting}[language=bash]}{\end{lstlisting}}
\lstdefinestyle{codestyle}{
columns=fixed,
basicstyle=\ttfamily\scriptsize,
upquote=true,
columns=flexible,
keywordstyle=\bf\color{blue}\ttfamily,
commentstyle=\it\color{gray}\ttfamily,
stringstyle=\color{red}\ttfamily,
showspaces=false,
showstringspaces=false,
frame=single,
backgroundcolor=\color{codecolor},
xleftmargin=0.5cm,
xrightmargin=0.5cm,
rulecolor=\color{black}
}
\lstdefinestyle{terminalstyle}{
language=bash,
columns=fixed,
basicstyle=\ttfamily\scriptsize,
upquote=true,
columns=flexible,
frame=single,
breaklines=true,
breakatwhitespace=false,
backgroundcolor=\color{termcolor},
xleftmargin=0.5cm,
xrightmargin=0.5cm,
rulecolor=\color{black}}
\lstnewenvironment{terminal}{
\lstset{style=terminalstyle}}{}
\lstnewenvironment{code}[1]
{\lstset{language=#1,style=codestyle}}{}