Difference between revisions of "Law Faculty University of Ljubljana Styling and citations"

From Wiki
Jump to navigation Jump to search
Line 9: Line 9:
 
Big thanks to everyone on the ConTeXt users' mailing list for helping me out with this! The least I can do is make it publicly available.
 
Big thanks to everyone on the ConTeXt users' mailing list for helping me out with this! The least I can do is make it publicly available.
  
--[[User:Hook|Hook]] 20:51, 6 April 2008 (CEST)
+
--[[User:Hook|Hook]]
  
 
== ChangeLog ==
 
== ChangeLog ==

Revision as of 07:25, 9 April 2008

< Sample documents

Introduction

Style and citing for writting diploma thesis (and other works) compatible with the citing and styling rules of the Law Faculty of the University of Ljubljana (Pravna fakulteta Univerze v Ljubljani). It is not an official package of the faculty though (not that most of them ever heard of TeX).

Since it is used mainly for writing documents for a Slovenian faculty, I didn't bother translating my comments into English. If anyone finds use for it and needs the comments in English (or German), don't hesitate to contact me. ;)

Big thanks to everyone on the ConTeXt users' mailing list for helping me out with this! The least I can do is make it publicly available.

--Hook

ChangeLog

  • 2008-04-06 - initial submition
  • 2008-04-06 - (later in the same evening) implemented a fix for legal acts so it displays the long form (without the paragraph info) the first time and in all other occurrences only the abbrevated forms (with the paragraph info).

TODO

What it misses the most right now is to get the \placepublications in a way to display separately cited works from the bibliography in different blocks by their type (e.g. t=zakon) and inside these blocks by alphabet. Also I still lack citation rules for internet and (various) court decisions. I may change the fonts and layout a bit as well. But that's low priority.

Environment

Here's the environment .tex file.

%d Tu so ConTeXt definicije oblike ipd., kot so predpisane za seminarske
%d in diplomske naloge na Pravni fakulteti Univerze v Ljubljani
%c Avtor: Matija Šuklje, matija.suklje@rutka.net, http://matija.suklje.name
%c Avtor dovoljuje (in spodbuja) uporabo vsebino tega „dela“ pod pogoji v licenci GPL.

%d This are the ConTeXt definitions of layout etc. as perscribed for writing a thesis
%d on the Law faculty, University of Ljubljana
%c Author: Matija Šuklje, matija.suklje@rutka.net, http://matija.suklje.name
%c The author permits (and encourages) the usage of this "work" under the terms of the GPL licence.

%%%
%%% splošne definicije dokumenta
%%%

% jezik, UTF-8 in velikost papirja
\mainlanguage[sl]
\enableregime[utf8]
\setuppapersize[a4][a4]

%%%
%%% splošna oblika teksta
%%%

\setupindenting[1.5em]
\setupindenting[yes]
\setupwhitespace[medium]

% oštevilčenje strani
\setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right]

% hack, da ni odvečnih praznih strani zadaj. ker, če uporabljaš delitev na front- pa back-matter,
% sklepa, da gre za knjigo in zato avtomatično doda strani, da je sodo število
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=no]

%%%
%%% za informacije v PDF, pobere podatke iz definicij glavnega dokumenta
%%%

% da dela UTF-8 tudi v PDF kazalu in informacijah o dokumentu
\input spec-tst

% pobere iz glavnega dokumenta definicije in jih zapiše v informacije v PDF
\setupinteraction
	[state=start,
	title={\naslov},
	subtitle={\tip},
	author={\avtor},
	keyword={\tip, \kljucnebesede}
	]

% ustvari kazalo v PDF
\placebookmarks[chapter,section,subsection]

%%%
%%% kazalo
%%%

\setupcombinedlist[content][alternative=c]
\setuplist[chapter][style=bold,alternative=b,width=1.5em]
\setuplist[section][margin=1.5em,width=2em]
\setuplist[subsection][margin=3.5em,width=3em]
\setuplist[subsubsection][margin=6.5em,width=4em]

%%%
%%% oblika poglavij ipd.
%%%

% zgenerira okoli naslova prvo stran na podlagi definicij iz glavnega dokumenta in datuma ob generiranju
\setuphead
	[title]
	[align=middle,
	textstyle=\sc,
	style=\bfd,
	before={\startalignment[middle] Univerza v Ljubljani \crlf Pravna fakulteta \vfill},
	after=
		{
		\blank[line]
		(\tip)		% definiraj v dokumentu — npr. \def\tip{diplomska naloga}
		\vfill
		Avtor: \avtor		% definiraj v dokumentu — npr. \def\autor{Matija Šuklje}
		\crlf
		Mentor: \mentor		% definiraj v dokumentu — npr. \def\mentor{preljubi profesor}
		\vfill
		Ljubljana, \currentdate[month,year] \stopalignment \page
		}
	]

% poglavja
\setuphead
	[chapter]
	[header=empty,
	textstyle=\sc,
	style=\bfb,
	before={\page\noindentation\hairline\blank[line]},
	after={\nowhitespace\hairline\blank[4*line]}
	]

% oddelki
\setuphead
	[section]
	[page=yes,
	textstyle=\sc,
	style=\tfa,
	align=right,
	before={\blank[2*line]},
	after={\blank[line]}
	]

% pododdelki
\setuphead
	[subsection]
	[style=\it,
	align=right,
	before={\blank[2*line]},
	after={\blank[line]}
	]

%%%
%%% definicije za citiranje in bibliografijo
%%%

% da sploh dela citiranje in bibliografija in ga poišče v zunanji datoteki
\usemodule[bib]
\input moja_bibliografija.bbl

% definicija novih ukazov za citiranje
% definition by: Taco Hoekwater
\def\citat[#1][#2]%
	{\bgroup
	% this adds the reference to the publication list
	% in the back:
	\nocite[#2]%
	% you can get all single-valued fields with this
	% \commands (title,issue,journal etc.) but not the
	% \author,\artauthor and \editor because they have
	% special arguments:
	\getcitedata[kauthor][#2] to \localavtor
	\getcitedata[kratko][#2] to \localkratko
	\getcitedata[pubyear][#2] to \localyear
	% you may want more fields and/or better formatting:
	\footnote{\localavtor, {\sc\localkratko} (\localyear)#1.}%
	\egroup}
%moja adaptacija le-tega še za zakone
%velika pomoč: Aditya Mahajan
%opomba — ko prvič citiraš, napiše dolgo obliko, ampak brez člena (kot po definiciji fakulteta). Pazi!
\def\zakon[#1][#2]%
	{\doifdefinedelse{zakonkratko:#2}
		{\zakonkratko[#1][#2]}
		{\bgroup
		\nocite[#2]%
		\getcitedata[title][#2] to \localtitle
		\getcitedata[kratko][#2] to \localkratko
		\getcitedata[journal][#2] to \localjournal
		\getcitedata[issue][#2] to \localissue
		\getcitedata[volume][#2] to \localvolume
		\getcitedata[spremembe][#2] to \localspremembe
		\footnote{\localtitle\ (\localkratko), \localjournal, št. \localissue/\localvolume\ \localspremembe.}%
		\egroup}
	\setvalue{zakonkratko:#2}{done}
	}

\def\zakonkratko[#1][#2]%
	{\bgroup
	\nocite[#2]%
	\getcitedata[kratko][#2] to \localkratko
	\footnote{#1 \localkratko.}%
	\egroup}
%moja adaptacija le-tega še za članke 
\def\clanek[#1][#2]%
	{\bgroup
	\nocite[#2]%
	\getcitedata[kauthor][#2] to \localavtor
	\getcitedata[kratko][#2] to \localkratko
	\getcitedata[journal][#2] to \localjournal
	\getcitedata[volume][#2] to \localvolume
	\getcitedata[issue][#2] to \localissue
	\getcitedata[pubyear][#2] to \localyear
	\getcitedata[pages][#2] to \localpages
	\footnote{\localavtor, \localkratko, v: \localjournal, {\localvolume} (\localyear) \localissue\unskip, str. \localpages.}%
	\egroup}
%moja adaptacija le-tega še za zbornike
\def\zbornik[#1][#2]%
	{\bgroup
	\nocite[#2]%
	\getcitedata[kauthor][#2] to \localavtor
	\getcitedata[kratko][#2] to \localkratko
	\getcitedata[kjournal][#2] to \localkjournal
	\getcitedata[volume][#2] to \localvolume
	\getcitedata[issue][#2] to \localissue
	\getcitedata[pubyear][#2] to \localyear
	\getcitedata[pages][#2] to \localpages
	\footnote{\localavtor, \localkratko, v: {\sc \localkjournal} (\localyear) \localissue\unskip, str. \localpages.}%
	\egroup}

% nekakšne splošne nastavitve za bibliografijo
\setupheadtext[sl][pubs={\sca Literatura\blank[line]}]
\setuppublicationlist
	[title={{\sca\naslov} \blank[line]},
% 	totallist=6,
	author=\invertedauthor,
	artauthor=\invertedauthor,
	editor=\invertedauthor,
	namesep={, },
	lastnamesep={ in },
	finalnamesep={ in },
	authoretallimit=10,
	authoretaltext={ in drugi},
	artauthoretallimit=10,
	artauthoretaltext={ in drugi},
	editoretallimit=10,
	editoretaltext={ in drugi},
]

%TODO — najdi boljši način za določit vrstni red v Literaturi (npr. po tipih in znotraj teh abecedi)
\setuppublications
	[sorttype=cite,
	numbering=no,
	criterium=cite
]

% posebne nastavitve za knjige v bibliografiji
\setuppublicationlayout[knjiga]{
	\insertauthors{}{: }{}%
	\inserttitle{\bgroup\sc}{\egroup}{}%
	\insertrevision{ (}{)}{\unskip}%
	\insertpubname{, }{}{\unskip}%
	\insertcity{, }{}{\unskip}%
	\insertpubyear{ }{.}{}%
}

% posebne nastavitve za članke v bibliografiji
\setuppublicationlayout[clanek]{
	\insertauthors{}{: }{}%
	\inserttitle{}{}{}%
	\insertjournal{, v: }{}{}%
	\insertvolume{, }{}{\unskip}%
	\insertpubyear{ (}{)}{}%
	\insertissue{ }{}{\unskip}%
	\insertpages{, str. }{.}{\unskip}%
}

% posebne nastavitve za zbornike v bibliografiji
\setuppublicationlayout[zbornik]{
	\insertauthors{}{: }{\unskip}%
	\inserttitle{}{}{\unskip}%
	\insertjournal{, v: \bgroup\sc}{\egroup}{\unskip}%
	\inserteditors{ (ur. }{)}{\unskip}%
	\insertpubname{, }{}{\unskip}%
	\insertcity{, }{}{\unskip}%
	\insertpubyear{ }{}{\unskip}%
	\insertpages{, str.}{.}{\unskip}%
}

% posebne nastavitve za pravne vire v bibliografiji
\setuppublicationlayout[zakon]{%
	\inserttitle{}{}{}%
	\insertkratko{ (}{)}{\unskip}%
	\insertjournal{, }{, }{\unskip}%
	\insertissue{št. }{}{}%
	\insertvolume{/}{ }{}%
	\insertspremembe{}{.}{\unskip}%
}


Sample document

Here's a sample document with comments on how to use it (and fill-in texts)

%%%
%%% Splošne definicije
%%%

% za pravila PF UL
\input pf_ul
\def\avtor{Matija Šuklje}
\def\mentor{as. mag. Luka Tičar}
\def\tip{seminarska naloga}
\def\naslov{Konkurenčna klavzula v delovni pogodbi}
\def\kljucnebesede{delovno pravo}

% moji lastni linki
\useURL[author-email][mailto:matija.suklje@rutka.net][][matija.suklje@rutka.net]
\useURL[homepage][http://matija.suklje.name][][matija.suklje.name]

%%%
%%% Začetek teksta
%%%

\starttext
\startstandardmakeup
\title{\naslov}
\stopstandardmakeup

%%%
%%% Kazalo in uvod s povzetki
%%%
\startfrontmatter
\placecontent

	\section[uvod]{Uvod}

	\subsection[povzetek]{Povzetek}

\input knuth

{\en		% začasno spremeni jezik v angleščino
	\subsection[summary]{Summary}

\input knuth
}
\stopfrontmatter

%%%
%%% Vsebina naloge
%%%
\startbodymatter

	\section[1]{Prvo poglavje}

\input tufte

	\subsection[1.1]{podpoglavje}

% \input knuth

tuki citiram, veš?

knjiga\citat[, str. 12][pavcnik_teorija] \crlf
več avtorjev ... \citat[, str. 102-232][kusej_uvod] \crlf
članek v zborniku \zbornik[, str. 5][raz_purity] \crlf
pa še {\em poudarjeno nekaj} kar sem {\em res} prebral \clanek[][damjan_gpl3] \crlf
ena Galičeva objava v ZZR \clanek[][galic_vloga] \crlf

Nek drug zakon\zakon[][ZPP-UPB3] in je prav\zakon[7. člen][ZPP-UPB3] tako relevanten\zakon[103. člen][ZPP-UPB3] pa spet članek v zborniku \zbornik[][raz_purity]

pa še zakon\zakon[33. člen][SPZ] ...in še enkrat isti zakon\zakon[12. člen][SPZ]



\stopbodymatter

%%%
%%% Appendix
%%%
\startappendices

\page
\completepublications

\stopappendices
\stoptext


Sample bibliography

...and the sample bibliography file I used in the sample document. It includes all citations types from the environment as well.

% definicije dodatnega polja za skrajšane naslove in avtorje
\newbibfield[kratko]
\newbibfield[kjournal]
\newbibfield[kauthor]

% definicije dodatnih polj potrebnih za pravne vire
\newbibfield[engtitle]
\newbibfield[spremembe]

%%%
%%% knjige
%%%

\startpublication[k=pavcnik_teorija,
	a=Pavcnik,
	t=knjiga,
	y=2001,
]
	\title{Teorija prava}
	\kratko{Teorija prava}
	\author{Marijan}[M.]{}{Pavčnik}
	\kauthor{M. Pavčnik}
	\revision{2. izdaja}
	\pubyear{2001}
	\pubname{Cankarjeva založba}
	\city{Ljubljana}
\stoppublication

\startpublication[k=kusej_uvod,
	a=Kusej,
	t=knjiga,
	y=1996
]
	\title{Uvod v pravoznanstvo}
	\kratko{Uvod}
	\author{Gorazd}[G.]{}{Kušej}
	\author{Marijan}[M.]{}{Pavčnik}
	\author{Anton}[A.]{}{Perenič}
	\kauthor{G. Kušej, M. Pavčnik, A. Perenič}
	\revision{ponatis 3. spremenjene in dopolnjene izd.}
	\pubyear{1996}
	\pubname{Uradni list Republike Slovenije}
	\city{Ljubljana}
\stoppublication

%%%
%%% zborniki
%%%

\startpublication[k=raz_purity,
	a=Raz,
	t=zbornik,
	y=1998,
]
	\title{The Purity of the Pure Theory of Law}
	\kratko{The Purity}
	\author{Joseph}[J.]{}{Raz}
	\kauthor{J. Raz}
	\journal{Norms and Normativity — Critcal Perspectives on Kelsenian Themes}
	\kjournal{Norms and Normativity}
	\editor{}[S. L.]{}{Paulson}
	\editor{}[B.]{}{Litschewski Paulson}
	\pubname{Clarendon Press}
	\city{Oxford}
	\pubyear{1998}
	\pages{237-252}
\stoppublication

%%%
%%% članki v revijah
%%%

\startpublication[k=damjan_gpl3,
	a=Damjan,
	t=clanek,
	y=2007
]
	\title{Izšla je 3. verzija licence GPL}
	\kratko{GPL3}
	\author{Matija}[M.]{}{Damjan}
	\kauthor{M. Damjan}
	\journal{Pravna praksa}
	\volume{26}
	\issue{37}
	\pubyear{2007}
	\pages{II-VIII}
\stoppublication

\startpublication[k=galic_vloga,
	a=Galic,
	t=clanek,
	y=2002
]
	\title{Vloga sodnika pri spodbujanju sodnih poravnav}
	\kratko{Vloga sodnika}
	\author{Aleš}[A.]{}{Galič}
	\kauthor{A. Galič}
	\journal{Zbornik znanstvenih razprav}
	\volume{LXII}
	\pubyear{2002}
	\pages{51-72}
\stoppublication

%%%
%%% pravni viri
%%%

%TODO — zlo grdi hack-i na mestih — nekak morš rešt to :/
\startpublication[k=SPZ,
	t=zakon,
	y=2002,
	s=SPZ
]
	\title{Stvarnopravni zakonik}
	\kratko{SPZ}
	\engtitle{Law of Property Code}
	\organization{Državni zbor RS}
	\journal{Ur. l. RS}
	\volume{2002}
	\issue{87}
	\spremembe{18/2007 Skl.US: U-I-70/04-18}
	\pubyear{2002}\month{10}\day{17}% datum objave
	\yearfiled{2003}\monthfiled{1}\dayfiled{1} % datum začetka veljave	%%% TODO — boljšo definicijo
	\biburl{http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248}
\stoppublication

\startpublication[k=ZPP-UPB3,
	t=zakon,
	y=2004,
	s=ZPP
]
	\title{Zakon o pravdnem postopku (uradno prečiščeno besedilo)}
	\kratko{ZPP-UPB3}
	\engtitle{Civil Procedure Act (consolidated text)}
	\organization{Državni zbor RS}
	\journal{Ur. l. RS}
	\volume{2007}
	\issue{73}
	\spremembe{}
	\pubyear{2007}\month{8}\day{13}% datum objave
	\yearfiled{}\monthfiled{}\dayfiled{} % datum začetka veljave	%%% TODO — boljšo definicijo
	\biburl{http://www.uradni-list.si/1/objava.jsp?urlid=200773&stevilka=3965}
\stoppublication

%%%
%%% internet
%%%
%TODO

%TODO — manjkajo odločbe sodišč, ...