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

From Wiki
Jump to navigation Jump to search
(One intermediate revision by the same user not shown)
Line 250: Line 250:
  
 
% special bibliography settings for books
 
% special bibliography settings for books
posebne nastavitve za knjige v bibliografiji
 
 
\setuppublicationlayout[knjiga]{
 
\setuppublicationlayout[knjiga]{
 
\insertauthors{}{: }{}%
 
\insertauthors{}{: }{}%
Line 541: Line 540:
 
%TODO — court decisions
 
%TODO — court decisions
  
%TODO — odločbe European Court of Human Rights
+
%TODO — European Court of Human Rights decisions
 
 
\stoppublication
 
  
 
%%%
 
%%%
 
%%% internet
 
%%% internet
 
%%%
 
%%%
%TODO — naredi še za internet citiranje
+
%TODO — internet citation
 
</texcode>
 
</texcode>

Revision as of 17:00, 16 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).

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

  • 0.1 - initial submition --Hook 17:05, 6 April 2008 (CEST)
  • 0.2 - (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). --Hook 19:13, 6 April 2008 (CEST)
  • 0.3 - translated the comments into English --Hook 18:55, 16 April 2008 (CEST)

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.

%%%
%%% general definitions of the document
%%%

% language, UTF-8 and paper size
\mainlanguage[sl]
\enableregime[utf8]
\setuppapersize[a4][a4]

%%%
%%% general text format
%%%

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

% page numbering
\setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right]

% hack to remove excess blank pages in the end. needed because front- and back-matter usage
% makes the system assume it is a book and therefore it adds pages to make the number even
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=no]

%%%
%%% for the information in the PDF, which it reads from the definitions in the main document itself
%%%

% to make UTF-8 work also in the PDF content/bookmarks and document information
\input spec-tst

% takes the definitions from the main document and writes them into the PDF
\setupinteraction
	[state=start,
	title={\naslov},
	subtitle={\tip},
	author={\avtor},
	keyword={\tip, \kljucnebesede}
	]

% makes the PDF content/bookmarks
\placebookmarks[chapter,section,subsection]

%%%
%%% content
%%%

\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]

%%%
%%% chapter styling etc.
%%%

% this generates the first page around the title, using definitions from the main document and the system time
\setuphead
	[title]
	[align=middle,
	textstyle=\sc,
	style=\bfd,
	before={\startalignment[middle] Univerza v Ljubljani \crlf Pravna fakulteta \vfill},
	after=
		{
		\blank[line]
		(\tip)		% define in the document — e.g. \def\tip{diplomska naloga}
		\vfill
		Avtor: \avtor		% define in the document — e.g. \def\autor{Matija Šuklje}
		\crlf
		Mentor: \mentor		% define in the document — e.g. \def\mentor{preljubi profesor}
		\vfill
		Ljubljana, \currentdate[month,year] \stopalignment \page
		}
	]

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

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

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

%%%
%%% citation and bibliography definitions
%%%

% to make citing and bibliography work and check the external file for bibliography
\usemodule[bib]
\input moja_bibliografija.bbl

% definition of new citation commands
% 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}
% my adaptation of it for the legal acts
% big help: Aditya Mahajan
% note — when citing acts for the first time, it writes the long form, but without the paragraph 
% (faculty rules). otherwise it writes the short form together with the paragraph.
\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}
% my adaptation of it to articles
\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}
% my adaptation of it to journals
\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}

% general bibliography settings
\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 — find a better way to determine the right order in the bibliography at the end
% (e.g. by types and in them by alphabet)
\setuppublications
	[sorttype=cite,
	numbering=no,
	criterium=cite
]

% special bibliography settings for books
\setuppublicationlayout[knjiga]{
	\insertauthors{}{: }{}%
	\inserttitle{\bgroup\sc}{\egroup}{}%
	\insertrevision{ (}{)}{\unskip}%
	\insertpubname{, }{}{\unskip}%
	\insertcity{, }{}{\unskip}%
	\insertpubyear{ }{.}{}%
}

% special bibliography settings for articles
\setuppublicationlayout[clanek]{
	\insertauthors{}{: }{}%
	\inserttitle{}{}{}%
	\insertjournal{, v: }{}{}%
	\insertvolume{, }{}{\unskip}%
	\insertpubyear{ (}{)}{}%
	\insertissue{ }{}{\unskip}%
	\insertpages{, str. }{.}{\unskip}%
}

% special bibliography settings for journals
\setuppublicationlayout[zbornik]{
	\insertauthors{}{: }{\unskip}%
	\inserttitle{}{}{\unskip}%
	\insertjournal{, v: \bgroup\sc}{\egroup}{\unskip}%
	\inserteditors{ (ur. }{)}{\unskip}%
	\insertpubname{, }{}{\unskip}%
	\insertcity{, }{}{\unskip}%
	\insertpubyear{ }{}{\unskip}%
	\insertpages{, str.}{.}{\unskip}%
}

% special bibliography settings for legal acts
\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)

%%%
%%% General definitions
%%%

% by the rules of 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}

% my own links
\useURL[author-email][mailto:matija.suklje@rutka.net][][matija.suklje@rutka.net]
\useURL[homepage][http://matija.suklje.name][][matija.suklje.name]

%%%
%%% Text start
%%%

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

%%%
%%% Intro with content and summary
%%%
\startfrontmatter
\placecontent

	\section[uvod]{Uvod}

	\subsection[povzetek]{Povzetek}

\input knuth

{\en		% temporary change language to english
	\subsection[summary]{Summary}

\input knuth
}
\stopfrontmatter

%%%
%%% Text itself
%%%
\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.

% extra fields definitions for shortened titles and authors
\newbibfield[kratko]
\newbibfield[kjournal]
\newbibfield[kauthor]

% extra fields definitions needed for legal acts
\newbibfield[engtitle]
\newbibfield[spremembe]

%%%
%%% books
%%%

\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

%%%
%%% journals
%%%

\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

%%%
%%% articles in magazines
%%%

\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

%%%
%%% legal acts
%%%

%TODO — very ugly hacks in some places — fix them :/
\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}% date of publication
	\yearfiled{2003}\monthfiled{1}\dayfiled{1} % date of validity	%%% TODO — better definition
	\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}% date of publication
	\yearfiled{}\monthfiled{}\dayfiled{} % date of validity	%%% TODO — better definition
	\biburl{http://www.uradni-list.si/1/objava.jsp?urlid=200773&stevilka=3965}
\stoppublication

%%%
%%% court decisions
%%%

%TODO — court decisions

%TODO — European Court of Human Rights decisions

%%%
%%% internet
%%%
%TODO — internet citation