Which are going to be handouts given to students covering the main topics of the lesson.
At the moment I am dividing the document using either parbox (for single lines) or minipage (for multiple lines) combined with the tabular environment for better alignment. I am also using parkskip to define the vertical space between each box:
Code: Select all
\documentclass[10pt,a4paper,landscape]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[left=1cm,right=1cm,top=1cm,bottom=0.4cm]{geometry}
\usepackage{inconsolata}
\usepackage[parfill]{parskip}
\usepackage[cmyk]{xcolor}
\usepackage[usestackEOL]{stackengine}
\definecolor{red}{RGB}{153,0,0}
\definecolor{blue}{RGB}{51,102,153}
\pagestyle{empty}
\setlength{\parskip}{3mm}
\begin{document}
\parbox[t]{200mm}{\huge{\textbf{Resumo Aula 1 - Curso MATLAB}}}
\parbox[t]{200mm}{\huge{$\bullet$ Concatenação e criação de matrizes - Operador \texttt{[]} e \texttt{:}}}
%\fbox
{
\begin{minipage}[t]{140mm}
\Large
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{ l l l }
\texttt{a = [1,2,3,4]} & \texttt{a = [1 2 3 4]} & Vetor Coluna \\
\texttt{a = [1,2,3,4]} & & Vetor Linha \\
\texttt{c = [a,a]} & \texttt{c = [a a]} & Concatenização Vertical \\
\texttt{C = [a;a]} & & Concatenização Horizontal
\end{tabular}
\end{minipage}
}
%\fbox
{
\begin{minipage}[c]{100mm}
\Large
\renewcommand{\arraystretch}{1}
\begin{tabular}{ l l }
\texttt{zeros} & Matriz de zeros \\
\texttt{ones} & Matriz de números 1 \\
\texttt{eye} & Matriz identidade \\
\texttt{rand} & Matriz de números aleatórios \\
\texttt{zeros(3,3)} & Matriz 3x3\\
\texttt{zeros(1,3)} & Matriz 3x1
\end{tabular}
\end{minipage}
}
\parbox[b]{65mm}{\Large{\texttt{inicio:incremento:fim}}}
\parbox[b]{60mm}{\Large{\texttt{1:2:10}}$\rightarrow$ \texttt{[1 3 5 7 9]}}
\parbox[b]{40mm}{\Large{\texttt{1:4}}$\rightarrow$ \texttt{[1 2 3 4]}}
\parbox[c]{40mm}{Se o incremento não for especificado é considerado um incremento de 1}
\parbox[t]{200mm}{\huge{$\bullet$ Indexação - Operadores \texttt{()} e \texttt{:}}}
%\fbox
{
\begin{minipage}[t]{200mm}
\Large
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{ l l }
\texttt{A(indice)} & Procura através das colunas \\
\texttt{A(indiceLinha, indiceColuna)} & Intersecção do vetor \texttt{indiceLinha} e \texttt{indiceColuna} \\
\texttt{end} & Seleciona o último elemento de uma dimensão \\
\texttt{:} & Seleciona toda uma dimensão
\end{tabular}
\end{minipage}
}
%\fbox
{
\begin{minipage}[c]{130mm}
\Large
\includegraphics{exemploIndexacao}
\texttt{\textcolor{red}{indiceLinha} = [1 3]}
\texttt{\textcolor{blue}{indiceColuna} = [2 3]}
\texttt{A(\textcolor{red}{indiceLinha}, \textcolor{blue}{indiceColuna})}
\end{minipage}
}
%\fbox
{
\begin{minipage}[c]{135mm}
\Large
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{ l l }
\texttt{A(:,2)} & Segunda coluna completa \\
\texttt{A(:)} & Todos os elementos de A em um vetor coluna \\
\texttt{A([1 3],:)} & Primeira e terceira linha completa \\
\texttt{A(1,end)} & Primeira e última coluna
\end{tabular}
\end{minipage}
}
\scriptsize\raggedleft\vfill{\textbf{Copyright \copyright\ 2016 Pedro Dreyer (pedrodreyer@hotmail.com)}}
\end{document}
some other questions:
1- Can I make the parbox width be exactly the size of the text inside it?
2-Why I am receiving an overfull \hbox warning? The width of the minipages are more than enough to fit its contents.
3- Any input/comment on the overall design of the document?