Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Lecture Specific Information to Fill Out
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \newcommand{\LectureTitle}{Notas de Aula \#2}
- %\newcommand{\LectureDate}{\today}
- \newcommand{\LectureDate}{30\ de Novembro,\ 2013}
- \newcommand{\LectureClassName}{MAT\ D04}
- \newcommand{\LatexerName}{Carlos\ V.A.\ Silva}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Change "article" to "report" to get rid of page number on title page
- \usepackage{amsmath,amsfonts,amsthm,amssymb}
- \usepackage{setspace}
- \usepackage{Tabbing}
- \usepackage{fancyhdr}
- \usepackage{lastpage}
- \usepackage{extramarks}
- \usepackage{chngpage}
- \usepackage{soul,color}
- \usepackage{graphicx,float,wrapfig}
- \usepackage{afterpage}
- \usepackage{abstract}
- \usepackage[version=3]{mhchem} % for chemical equations
- \usepackage{chemfig} % for drawing chemical compounds
- \usepackage{pgfplots} % for plotting equations
- \usepackage{multicol}
- \usepackage{tikz}
- \usetikzlibrary{matrix}
- \usetikzlibrary{decorations.pathreplacing}
- \tikzstyle{underbrace style}=[decorate,decoration={brace,raise=10mm,amplitude=5pt,mirror},color=black]
- % \tikzstyle{underbrace text style}=[font=\tiny, below, pos=.5, yshift=-3mm]
- %emoticons
- \usepackage{wasysym}
- %Code Listing
- \usepackage{listings}
- \usepackage{courier}
- \renewcommand{\lstlistingname}{Listagem}
- \lstset{
- basicstyle=\footnotesize\ttfamily, % Standardschrift
- numbers=left, % Ort der Zeilennummern
- numberstyle=\tiny, % Stil der Zeilennummern
- %stepnumber=2, % Abstand zwischen den Zeilennummern
- numbersep=5pt, % Abstand der Nummern zum Text
- tabsize=2, % Groesse von Tabs
- extendedchars=true, %
- breaklines=true, % Zeilen werden Umgebrochen
- keywordstyle=\color{red},
- frame=b,
- % keywordstyle=[1]\textbf, % Stil der Keywords
- % keywordstyle=[2]\textbf, %
- % keywordstyle=[3]\textbf, %
- % keywordstyle=[4]\textbf, \sqrt{\sqrt{}} %
- stringstyle=\color{white}\ttfamily, % Farbe der String
- showspaces=false, % Leerzeichen anzeigen ?
- showtabs=false, % Tabs anzeigen ?
- %tab=$\mid$,
- xleftmargin=17pt,
- framexleftmargin=17pt,
- framexrightmargin=5pt,
- framexbottommargin=4pt,
- %backgroundcolor=\color{lightgray},
- showstringspaces=false % Leerzeichen in Strings anzeigen ?
- }
- \lstloadlanguages{% Check Dokumentation for further languages ...
- %[Visual]Basic
- %Pascal
- %C
- %C++
- %XML
- %HTML
- %Java
- python
- }
- %\DeclareCaptionFont{blue}{\color{blue}}
- %\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue}, textfont={blue}}
- \usepackage{caption}
- \DeclareCaptionFont{white}{\color{white}}
- \DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35, 0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}
- \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}
- %End code listing
- \usepackage[brazilian]{babel}
- \usepackage[utf8]{inputenc}
- \usepackage[T1]{fontenc}
- % In case you need to adjust margins:
- \topmargin=-0.45in
- \evensidemargin=0in
- \oddsidemargin=0in
- \textwidth=6.5in
- \textheight=9.0in
- \headsep=0.25in
- % Setup the header and footer
- \pagestyle{fancy}
- \lhead{\LatexerName}
- \chead{\LectureClassName: \LectureTitle}
- \rhead{\LectureDate}
- \lfoot{\lastxmark}
- \cfoot{}
- \rfoot{Page\ \thepage\ of\ \pageref{LastPage}}
- \renewcommand\headrulewidth{0.4pt}
- \renewcommand\footrulewidth{0.4pt}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Some tools
- \newcommand{\enterTopicHeader}[1]{\nobreak\extramarks{#1}{#1 continua na próxima página\ldots}\nobreak
- \nobreak\extramarks{#1 (continued)}{#1 continua na próxima página\ldots}\nobreak}
- \newcommand{\exitTopicHeader}[1]{\nobreak\extramarks{#1 (continued)}{#1 continua na próxima página\ldots}\nobreak
- \nobreak\extramarks{#1}{}\nobreak}
- \newlength{\labelLength}
- \newcommand{\labelAnswer}[2]
- {\settowidth{\labelLength}{#1}
- \addtolength{\labelLength}{0.25in}
- \changetext{}{-\labelLength}{}{}{}
- \noindent\fbox{\begin{minipage}[c]{\columnwidth}#2\end{minipage}}
- \marginpar{\fbox{#1}}
- % We put the blank space above in order to make sure this
- % \marginpar gets correctly placed.
- \changetext{}{+\labelLength}{}{}{}}
- \setcounter{secnumdepth}{0}
- \newcommand{\TopicName}{}
- \newcounter{TopicCounter}
- \newenvironment{Topic}[1][Problem \arabic{TopicCounter}]
- {\stepcounter{TopicCounter}
- \renewcommand{\TopicName}{#1}
- \section{\TopicName}
- \enterTopicHeader{\TopicName}}
- {\exitTopicHeader{\TopicName}}
- \setcounter{secnumdepth}{0}
- \newcommand{\ExampleSectionName}{}
- \newcounter{ExampleSectionCounter}[TopicCounter]
- \newenvironment{ExampleSection}[1][Example \arabic{ExampleSectionCounter}]
- {\stepcounter{ExampleSectionCounter}
- \renewcommand{\ExampleSectionName}{#1}
- \section{\ExampleSectionName}
- \enterTopicHeader{\ExampleSectionName}}
- {\exitTopicHeader{\ExampleSectionName}}
- \setcounter{secnumdepth}{0}
- \newcounter{ExampleBoxCounter}[TopicCounter]
- \newcommand{\examplebox}[1]
- {
- % We put this space here to make sure we're disconnected from the previous
- % passage
- \stepcounter{ExampleBoxCounter}
- \noindent\fbox{\begin{minipage}[c]{\columnwidth}#1\end{minipage}}\enterTopicHeader{\ExampleSectionName}\exitTopicHeader{\ExampleSectionName}\marginpar{\fbox{\#\arabic{ExampleBoxCounter}}}
- % We put the blank space above in order to make sure this
- % \marginpar gets correctly placed.
- \vskip10pt
- }
- \renewcommand{\contentsname}{{\normalsize Topics Covered}}
- \renewcommand{\abstractname}{\LectureTitle\ Summary}
- \renewcommand{\absnamepos}{flushleft}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \begin{document}
- \begin{spacing}{1.1}
- \newpage
- \begin{tikzpicture}[%
- >=stealth,
- shorten >=2pt,
- thick
- ]
- \matrix (block) [%
- matrix of nodes,
- nodes={%
- draw,
- anchor=center,
- minimum width=2em,
- minimum height=1em
- }
- ] {%
- 1 & 2 & \node[fill=gray!99]{8}; & \node[fill=gray!50]{3}; & 4 & 6 & 9\\
- };
- %\node[fill=gray!50]{1};
- \path[->] (block-1-4.north) edge [bend right=30] (block-1-3.north)
- (block-1-3.south) edge [bend right=30] (block-1-4.south);
- \draw (block-1-1.west) node[left=0.005cm,scale=0.9] {A:};
- \draw (block-1-2.south) node[below=0.1cm] {$\longleftarrow$};
- \draw (block-1-2.south) node[left=0.2cm,below=0.4cm,scale=0.6] {Ordenado};
- \draw (block-1-1.north) node[above=0.1cm,scale=0.7] {0};
- \draw (block-1-2.north) node[above=0.1cm,scale=0.7] {1};
- \draw (block-1-3.north) node[above=0.1cm,scale=0.7] {i=2};
- \draw (block-1-4.north) node[above=0.05cm,scale=0.7] {j=3};
- \draw (block-1-5.north) node[above=0.1cm,scale=0.7] {4};
- \draw (block-1-6.north) node[above=0.1cm,scale=0.7] {5};
- \draw (block-1-7.north) node[above=0.1cm,scale=0.7] {6};
- \draw (block-1-2.south east) node[right=0.25cm,below=1.9cm] {$\longrightarrow$};
- \draw [thin] (block-1-2.south east) +(0,-2) -- +(0,+2);
- \draw (block-1-2.south east) node[right=0.25cm,below=2.1cm] {Fronteira};
- \draw [underbrace style] (block-1-1.south west) -- (block-1-2.south east) node [left=0.8cm,below=1.05cm] {$A_{esquerdo}$};
- \draw [underbrace style] (block-1-2.south east) -- (block-1-7.south east) node [left=1.8cm,below=1.05cm] {$A_{direito}$};
- \end{tikzpicture}
- \end{spacing}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement