% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
\PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
$endif$
$if(dir)$
$if(latex-dir-rtl)$
\PassOptionsToPackage{RTLdocument}{bidi}
$endif$
$endif$
$if(CJKmainfont)$
\PassOptionsToPackage{space}{xeCJK}
$endif$
%
\documentclass[11pt]{article}
% jezik v babel
$if(lang)$
\usepackage[main=$babel-lang$]{babel}
$endif$
% del za linke in povezave
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{mdframed}
\hypersetup{
    colorlinks,
    linkcolor={red!30!black},
    citecolor={red!30!black},
    urlcolor={red!30!black}}
% ugasne šteteje naslovov
\setcounter{secnumdepth}{0}
% osnovna geometrija in fonti 
\usepackage[a5paper, verbose, tmargin=2cm, bmargin=2cm, lmargin=1.6cm, rmargin=1.6cm]{geometry}
\usepackage{fontspec,xltxtra,xunicode}
\usepackage{relsize,etoolbox}
\setmainfont[Ligatures=TeX,Scale=0.97]{Skolar PE}
\usepackage{titling}
% odmiki ostavkov in velikost citatov
\setlength{\parindent}{0cm}
\setlength{\parskip}{0.5em}
\AtBeginEnvironment{quote}{\smaller}
% slike na širino teksta
\setkeys{Gin}{width=\textwidth}
% strvari za uvoz svg
\usepackage{svg}
\usepackage{titlesec}
\newcommand{\subsectionbreak}{\clearpage}
\newcommand{\subsubsectionbreak}{\clearpage}
\titleformat{\subsection}{\normalfont\fontsize{22}{28}\bfseries\centering}{} {} {}
\titlespacing*{\subsection}{0pt}{0pt}{0pt} %top ne dela,ker je pred naslovom pagebrak, zato zgoraj 160 visoka vrstica
\titleformat{\subsubsection}{\normalfont\fontsize{14}{20}\bfseries\centering}{} {} {}
\titlespacing*{\subsubsection}{0pt}{0pt}{20pt} %top ne dela,ker je pred naslovom pagebrak
\def\tightlist{}
% zacetek dokumenta
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%naslovnica%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{titlepage}
\vspace*{-0.8in}
\hspace*{-0.3in}
\includesvg[svgpath = ui/templates/]{logo}
\begin{flushright}
\vspace*{-0.4in}
$if(doi)$ \href{https://doi.org/$doi$}{DOI: $doi$}\\$endif$
$if(zbirka)$ \href{https://doi.org/$zbirka.doi$}{$zbirka.naslov$}  $zbirka.številka$ \\$endif$
\vspace*{0.4in}
$for(avtor)$
\vspace*{0.2in}
$if(avtor.ime)${\large\strong{ $avtor.ime$}}\\$if(avtor.afiliation)$$avtor.afiliation$\\$endif$$if(avtor.email)$$avtor.email$\\$endif$$if(avtor.orcid)$\href{https://orcid.org/$avtor.orcid$}{ORCID: $avtor.orcid$}\\$endif$
$else$\large{\strong{ $avtor$}}\\$endif$
$endfor$
\end{flushright}
\begin{center}
\vspace*{0.3in}
\huge{$naslov$}\\
$if(podnaslov)$$podnaslov$\\$endif$
\end{center}
\begin{flushright}
$if(prevod)$
\vspace*{0.3in}
\large{$prevod$}\\
$endif$
\end{flushright}
\end{titlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%konec naslovnice%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% kazalo, ce je %%%%%%%%%%%%%%
$if(toc)$
$if(toc-title)$
\renewcommand*\contentsname{$toc-title$}
$endif$
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents
\clearpage
$endif$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% konec kazala %%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% telo iz pandoca %%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
$body$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% konec telesa %%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\begin{small}
  $for(avtor)$
  $if(avtor.ime)$ $avtor.ime$\\
  $else$$avtor$\\
  $endif$
  $endfor$
\strong{$naslov$}\\
$if(podnaslov)$$podnaslov$\\$endif$
$if(prevod)$$prevod$\\$endif$

$if(doi)$DOI: $doi$\\$endif$

$if(izvirnik)$$t_original$ $izvirnik$\\$endif$

$if(urednik)$$urednik$\\$endif$
$if(lektor)$$lektor$\\$endif$

$if(založnik)$$založnik$\\$endif$


$if(datum)$$t_date$ \strong{$datum$}\\$endif$
$if(verzija)$$t_version$ \strong{$verzija.št$}\\$t_vdate$ \strong{$verzija.datum$}\\$endif$

$if(pravice)$$pravice$\\$endif$

$if(podpora)$$podpora$\\$endif$

$if(cip)$
\clearpage
\begin{mdframed}
$cip$\\
\end{mdframed}
$endif$
\end{small}
\end{document}
