[LUGOS] Diplomska v LateXu

Martin Vuk martin at gollum.fri.uni-lj.si
Mon Oct 13 20:17:35 CEST 2003


Jaz sem se celo potrudil sestaviti poseben class osnovan na classu book.
Za svojo zensko seveda, zase sem prelen.
Zal mu manjka kaksen komentar. Ce bos imel kaksen  popravek ali
dopolnitev, mi ga prosim poslji. Tudi sam ga utegnem kmalu potrbovati:)

Lep pozdrav,
Martin
> 
>  Predvidevam, da je kdo ze pisal diplomsko v LaTeXu... :) Zanima me ali ima
> kdo kak 'template' ze narejen, tak, ki bi se drzal pravil, ki so predpisana
> za diplomske naloge? Stevilcenja, margins, etc, etc, ...
> 
> 
> -- 
> David!

-- 
Laboratorij za matematične metode v računalništvu in informatiki
Fakulteta za računalništvo in informatiko
Univerza v Ljubljani
e-naslov: martin.vuk at fri.uni-lj.si
www: http://torina.fe.uni-lj.si/~martin
-------------- next part --------------
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{lju-thesis}[2001/05/01 v0.1 University of Ljubljana Thesis document class]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptions
\LoadClass{book}
%chapter
\def\@chapter[#1]#2{\ifnum \c at secnumdepth >\m at ne
                       \if at mainmatter
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}%
                                   {\protect\numberline{\thechapter}#2}%
                       \else
                         \addcontentsline{toc}{chapter}{#2}%
                       \fi
                    \else
                      \addcontentsline{toc}{chapter}{#2}%
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if at twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\renewcommand{\chaptermark}[1]{\markboth{}{\thechapter. #1}}
\renewcommand{\sectionmark}[1]{}
\newcommand{\appendixmark}[1]{\markboth{}{#1}}
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c at secnumdepth >\m at ne
      %\if at mainmatter
      %  \huge\bfseries \@chapapp\space \thechapter
      %  \par\nobreak
      %  \vskip 20\p@
      %\fi
    \fi
    \interlinepenalty\@M
    \Huge \bfseries \thechapter.\hskip 10\p@ #1\par\nobreak
    \vskip 40\p@
  }}
% new maketitle
\newcommand{\autfont}{\Large}
\newcommand{\titfont}{\LARGE\bf}

\def\titleen#1{\gdef\@titleen{#1}}
\def\year#1{\gdef\@year{#1}}
\def\oddelek#1{\gdef\@oddelek{#1}}
\def\oddeleken#1{\gdef\@oddeleken{#1}}
\renewcommand{\maketitle}{%
 \setcounter{page}{1}
 \begin{center}
 \thispagestyle{empty}
    {\large\sc University of Ljubljana\\%
      Faculty of Mathematics and Physics\\%
      \@oddeleken}
    \vskip  120\p@%
    {\autfont \@author\par}%
    {\titfont \@titleen \par}%
    {\vskip 20\p@ Dissertation\par}
    \vfill\null
    {\large %\normalsize 
        Ljubljana \@year \par}% 
 \end{center}
 \newpage\mbox{}\thispagestyle{empty}
 \newpage
 \thispagestyle{empty}
   \begin{center}
    {\large\sc Univerza v Ljubljani\\%
      Fakulteta za matematiko in fiziko\\%
      \@oddelek}
    \vskip  120\p@%
    {\autfont \@author\par}%
    {\titfont \@title \par}%
    {\vskip 20\p@ Doktorsko delo\par}
    \vfill\null
    {\large %\normalsize 
        Ljubljana \@year \par}%    
 \end{center}      
  \global\let\@author\@empty
  \global\let\@year\@empty
  \global\let\@title\@empty
  \global\let\@titleen\@empty
  \global\let\@oddeleken\@empty
  \global\let\@oddelek\@empty
  \global\let\oddelek\relax
  \global\let\oddeleken\relax
  \global\let\title\relax
  \global\let\titleen\relax
  \global\let\author\relax
  \global\let\year\relax
}
%% zahvala
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
\newenvironment{zahvala}{\clearemptydoublepage
\thispagestyle{empty}\mbox{}\vfill\null\it}{\normalfont}
%%citat
\newenvironment{citat}
{\clearemptydoublepage\thispagestyle{empty}\mbox{}{\vskip0.20\textheight}\mbox{}\hfill\begin{minipage}{0.55\textwidth}}
{\normalfont\end{minipage}}
% *** page layout

\marginparsep 10pt \topmargin 4 true mm
\headheight 6 true mm \headsep 10 true mm
\footskip 16 true mm 
\textheight 225 true mm \textwidth 150 true mm
\addtolength{\voffset}{-1truecm}
\if at twoside \oddsidemargin 11 true mm \evensidemargin -3 true mm%
 \else \oddsidemargin 16mm \evensidemargin 16mm \marginparwidth 30mm \fi

\renewcommand{\baselinestretch}{1.1}
%\setlength{\parskip}{0.3\baselineskip}
\setlength{\parindent}{30pt}
%\setlength{\topsep}{0.5\baselineskip}
%toc
\renewcommand\tableofcontents{%
    \if at twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \clearemptydoublepage\thispagestyle{empty}
    \section*{\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{}}%
    \@starttoc{toc}%
    \if at restonecol\twocolumn\fi
}
%%list of publications
\newcommand{\pubname}{List of Publications}
\newcommand{\bibtitle}{\bibname}
\renewenvironment{thebibliography}[1]{%
      \chapter*{\bibtitle
        \@mkboth{\MakeUppercase\bibname}{}}%
      \addcontentsline{toc}{chapter}{\protect{\bibname}}
      \small
      \list{\@biblabel{\@arabic\c at enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib at code
            \usecounter{enumiv}%
            \let\p at enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c at enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex at warning{Empty `thebibliography' environment}}%
      \endlist}

\newenvironment{publications}[1]{%
      \addcontentsline{toc}{chapter}{\protect{\pubname}}
      \chapter*{\pubname
        \@mkboth{\MakeUppercase\pubname}{}}%
      \small
      \list{\@biblabel{\@arabic\c at enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib at code
            \usecounter{enumiv}%
            \let\p at enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c at enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex at warning{Empty `thebibliography' environment}}%
      \endlist}
%% Apendix
\newcounter{appendix}
\renewcommand \theappendix {\@Alph\c at appendix}
\newcommand{\@appapp}{\appendixname}
\renewcommand\appendix{\cleardoublepage
 \thispagestyle{plain}%
 \global\@topnum\z@
 \@afterindentfalse
 \secdef\@appendix\@sappendix%
}
\def\@appendix[#1]#2{%
  \refstepcounter{appendix}%
   \addcontentsline{toc}{section}{#2}%
   \appendixmark{#1}%
   \@makeappendixhead{#2}%
}
\def\@makeappendixhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c at secnumdepth >\m at ne
      \if at mainmatter
        \huge\bfseries \@appapp\space \theappendix
        \par\nobreak
        \vskip 20\p@
      \fi
    \fi
    \interlinepenalty\@M
    \LARGE \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\def\@sappendix#1{\@makesappendixhead{#1}}%

\def\@makesappendixhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \Huge \bfseries  #1\par\nobreak
    \vskip 40\p@
  }}


More information about the lugos-list mailing list