\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[slovene]{babel}

% TiKZ za risanje slik
\usepackage{tikz}

\usepackage{graphicx}

\title{Testni dokument za TikZ}
\author{Andrej Bauer}

\begin{document}
\maketitle

\section{Začetek}

V glavo \verb|.tex| datoteke vstavite \verb|\usepackage{tikz}|.
V telo dokumenta vstavite minimalni primer:

\begin{verbatim} 
\begin{tikzpicture}
\draw (0,0) -- (1,2);
\end{tikzpicture}
\end{verbatim}

Rezultat je slika:

\begin{tikzpicture}
\draw (0,0) -- (1,2) -- (3, 0);
\end{tikzpicture}

V kolikor pri prevajanju latex ne najde datoteke \verb|tikz.sty| je najbolje ročno
namestiti naslednje pakete: \verb|pgf|, \verb|ms| in \verb|xcolor|.

Viri za delo s paketom \verb|tikz|:
\begin{itemize}
\item \verb|http://www.math.uni-leipzig.de/~hellmund/LaTeX/pgf-tut.pdf|
\item \verb|http://cremeronline.com/LaTeX/minimaltikz.pdf|
\item \verb|http://ctan.ijs.si/tex-archive/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf|
\end{itemize}

\section{Primeri}
Oglejmo si nekaj primerov.

\begin{figure}[ht]
\centering
\begin{tikzpicture}
\draw (0,0) -- (5,1);
\end{tikzpicture}
\caption{Slika s podnapisom.}
\end{figure}

\vspace{1cm}

\begin{tikzpicture}
\draw (0,0) -- (2,1) -- +(0,1) -- +(-60:2);
\end{tikzpicture}

\vspace{1cm}

\begin{tikzpicture}
\draw (0:1) -- (90:1) -- (180:0.5) -- (270:1) ;
\end{tikzpicture}

\vspace{1cm}

\begin{tikzpicture}
\draw[style=dashed] (2,.5) circle (0.5);
\draw[fill=blue] (0,0) rectangle (1,1);
\draw[fill=green!50] (1,1) ellipse (.5 and 1);
\draw[style=thick] (3,.5) -- +(30:1) arc(30:80:1) -- cycle;
\end{tikzpicture}

\vspace{1cm}

\begin{tikzpicture}[scale=3]
\draw [<->] (0,2) -- (0,0) -- (4,0);
\draw [thick,red] (0,1.5) -- (3,0);
\draw [ultra thick, ->] (0,0) -- (2,2);
\node [above] at (2,2) {$(2,\int_0^1 x^2 dx)$};
\draw [help lines] (1,0) -- (1,1) -- (0,1);
\end{tikzpicture}


\vspace{1cm}


\begin{tikzpicture}[yscale=1.5]
\draw [help lines, ->] (0,0) -- (6.5,0);
\draw [help lines, ->] (0,-1.1) -- (0,1.1);
\draw [green,domain=0:2*pi] plot (\x, {(sin(\x r)* ln(\x+1))/2});
\draw [red,domain=0:pi] plot (\x, {sin(\x r)});
\draw [blue, domain=pi:2*pi] plot (\x, {cos(\x r)*exp(\x/exp(2*pi))});
\end{tikzpicture}

\vspace{1cm}
Sestavimo spiralo

\begin{center}
  \includegraphics[width=0.5\textwidth]{spirala.pdf}
\end{center}




\end{document}
