summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-swiss-legal/biblatex-swiss-legal-general.cbx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-12-28 22:44:49 +0000
committerKarl Berry <karl@freefriends.org>2012-12-28 22:44:49 +0000
commitf9c08d4132e208cadb31e87e602b7cfcd98cc2b0 (patch)
tree045d5871ee83ef6db4333a536137c490d971d5ae /Master/texmf-dist/tex/latex/biblatex-swiss-legal/biblatex-swiss-legal-general.cbx
parenta2293c42f429d632096ab53d7eea0d57210ec68c (diff)
biblatex-swiss-legal (27dec12)
git-svn-id: svn://tug.org/texlive/trunk@28647 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-swiss-legal/biblatex-swiss-legal-general.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-swiss-legal/biblatex-swiss-legal-general.cbx492
1 files changed, 15 insertions, 477 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-swiss-legal/biblatex-swiss-legal-general.cbx b/Master/texmf-dist/tex/latex/biblatex-swiss-legal/biblatex-swiss-legal-general.cbx
index 3712a5b90a7..86373853375 100644
--- a/Master/texmf-dist/tex/latex/biblatex-swiss-legal/biblatex-swiss-legal-general.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-swiss-legal/biblatex-swiss-legal-general.cbx
@@ -18,492 +18,30 @@
%
% The Current Maintainer of this work is Adrien Vion.
-
+ % Encoding of this file: UTF8. Code is ASCII compatible.
%%%%%%%%%% PREAMBULE / REGLES GENERALES %%%%%%%%%%
-% IntitulŽ
-
-\ProvidesFile{biblatex-swiss-legal-general.cbx}[2012/04/25 v1.01 alpha]
-
-
-% OPTIONS
-
-
-\ExecuteBibliographyOptions{%
-singletitle=true,%
-%singletitle=true,%
-abbreviate=true,%
-date=long,%
-abrjournal=true,%
-backend=biber,%
-uniquename=full,%
-%uniquelist=true,%
-maxcitenames=4,%
-%idemtracker=true,%
-}
-
-\DeclareLanguageMapping{french}{biblatex-swiss-legal-fr}
-
-
-% FORMATAGE DES DONNƒES
-
-
-% Jurisprudence => revues abrŽgŽes
-\DeclareFieldFormat[customb]{volume}{#1}
-\DeclareFieldFormat[customb]{pages}{#1}
-
-
-
-% Formatage des postnotes sensible au champ pagination
-
-
-\DeclareFieldFormat[]{postnote}{%
-\iffieldundef{pagination}%
- {%
- \ifnumeral{#1}%
- {\pno~#1}%
- {%
- \ifnumerals{#1}%
- {\ppno~#1}%
- {#1}%
- }%
- }%
- {%
- \iffieldequalstr{pagination}{page}%
- {}%
- {%
- \iffieldequalstr{pagination}{num}%
- {%
- \ifnumeral{#1}%
- {\no~#1}%
- {%
- \ifnumerals{#1}%
- {\nos~#1}%
- {#1}%
- }%
- }%
- {#1}%
- }%
- }%
-}
-
-
-
-% Mention "n¡" automatique s'il n'y a que des chiffres dans les commentaires.
-% => S'il on veut N ou NN ˆ la place, c'est ici qu'il faut le modifier.
-
-\DeclareFieldFormat[customa]{postnote}{\ifnumeral{#1}{\no #1}{\ifnumerals{#1}{\nos #1}{#1}}}
-
-
-
-% Crossref
-
-\DeclareDataInheritance{jurisdiction}{customb}{%
-}
-
-\DeclareDataInheritance{commentary}{customa}{%
-\noinherit{crossref}%
-}
-
-% Ibid
-
-\newbibmacro{ibid}{%
-\iffieldequalstr{entrytype}{customb}%
- {\bibstring{lastruling}}%
- {\iffieldequalstr{entrytype}{jurisdiction}%
- {\bibstring{lastruling}}%
- {\emph{\bibcpstring{ibidem}}}%
- }%
-}
-
-
-% MACROS PAR TYPE D'ENTRƒE
-
-% GŽnŽral
-
-\newbibmacro{citationgeneral}{%
-\ifciteibid%
- {\usebibmacro{ibid}}%
- {%
-\printnames{labelname}%
-\ifsingletitle%
- {}%
- {\addcomma\addspace%
- \iffieldundef{shorttitle}%
- {\printfield{title}}%
- {\printfield{shorttitle}}%
- }%
-}%
-}
-
-
-% Source online
-
-\newbibmacro{online}{%
-\ifciteibid%
- {\usebibmacro{ibid}}%
- {%
- \ifnameundef{labelname}%
- {}%
- {\printnames{labelname}\addcomma\addspace}%
- \iffieldundef{shorttitle}%
- {\printfield{title}}%
- {\printfield{shorttitle}}%
- }%
-}
-
-% Jurisprudence
-
-\newbibmacro{jurisdiction}{%
-\ifciteibid%
- {\usebibmacro{ibid}}%
- {%
-\printfield{usera}%
-\iffieldundef{userb}%
- {}%
- {\newunit\printfield{userb}}%
-\iffieldundef{userc}%
- {}%
- {\newunit\printfield{userc}}%
-\iffieldundef{userd}%
- {}%
- {\newunit\printfield{userd}}%
-\iffieldequalstr{usera}{ATF}% <= La date ne s'imprime que s'il ne s'agit pas d'un ATF.
- {}%
- {\iffieldundef{origyear}%
- {}%
- {\addspace\mkbibparens{\printfield{origday}\adddot\printfield{origmonth}\adddot\printfield{origyear}}}%
- }%
-\iftoggle{bbx:jstitles}% <= Option pour activer / dŽsactiver la mention du titre dans les citations d'arrts
- {\iffieldundef{title}%
- {}%
- {\newunit%
- \printfield{title}}%
- }%
- {}%
-\iflistundef{language}%
- {}%
- {\addspace\mkbibbrackets{\printlist{language}}}%
-\iffieldundef{usere}%
- {}
- {\addcomma\addspace\bibsstring{recital}\addspace\printfield{usere}%
- \iffieldundef{userf}
- {}
- {\addspace\mkbibparens{\printfield{userf}}}
- }%
-\iffieldequalstr{howpublished}{publ}
- {\newunit}%
- {\newblock}%
-\iffieldbibstring{howpublished}%
- {\bibsstring{\thefield{howpublished}}}% Dans les citations, on va toujours utiliser le string abrŽgŽ.
- {\printfield{howpublished}}%
-\newunit%
- \iffieldbibstring{journaltitle}
- {% aa) s'il existe un string pour le nom de la revue
- \bibsstring{\thefield{journaltitle}}%
- }%
- {% bb) s'il n'existe pas de string pour le nom de la revue
- \printfield{journaltitle}%
- }%
- \newunit%
- \usebibmacro{date}%
- \newunit%
- \printfield{volume}%
- \newunit%
- \iffieldundef{number}%
- {}%
- {\bibsstring{number}\addnbthinspace\printfield{number}}%
- \newunit%
- \printfield{pages}%
-}%
-}%
-
-% Commentaires
-
-\DeclareFieldFormat{part}{%
-\ifnumeral{#1}%
- {\bibsstring{article}~#1}%
- {\ifnumerals{#1}%
- {\bibsstring{articles}~#1}%
- {#1}%
- }%
-}
-\DeclareFieldFormat{type}{%
-\ifbibstring{#1}{\bibsstring{#1}}{#1}%
-}
-
-
-\newbibmacro{styleA}{% Format "BK-Kramer, 1 CO, n¡ ...."
-\ifciteibid%
- {\usebibmacro{ibid}}%
- {%
-\iffieldbibstring{series}%
- {\bibsstring{\thefield{series}}}%
- {\printfield{series}}%
-\printtext{-}%
-\printnames{labelname}%
-\newblock%
-\printfield{type}%
-\newunit%
-\printfield{part}%
-\newunit%
-\printfield{titleaddon}%
-}%
-}
-
-\newbibmacro{styleB}{%
-\ifciteibid%
- {\usebibmacro{ibid}}%
- {%
-\iffieldbibstring{series}%
- {\bibsstring{\thefield{series}}\printtext{-}}%
- {\iffieldundef{series}%
- {}%
- {\printfield{series}\printtext{-}}%
- }%
-\iffieldundef{titleaddon}%
- {}%
- {\printfield{titleaddon}\addspace}%
-\iffieldundef{volume}%
- {}%
- {\thefield{volume}}%
-\newblock%
-\printnames{labelname}%
-\addcomma\addspace%
-\printfield{type}%
-\newunit%
-\printfield{part}%
-}%
-}
-
-\newbibmacro{styleC}{%
-\ifciteibid%
- {\usebibmacro{ibid}}%
- {%
-\printnames{author}%
-\newblock%
-\usebibmacro{printin}%
-\iffieldbibstring{series}%
- {\biblstring{\thefield{series}}}%
- {\printfield{series}}%
-\newblock%
-\printfield{type}%
-\newunit%
-\printfield{part}%
-\newunit%
-\printfield{titleaddon}%
-}%
-}
-
-\newbibmacro{commentary}{%
-{\ifnum\blx@commentarystyle=\z@% Si on a choisi le style A (par dŽfaut, c'est le cas)
- \usebibmacro{styleA}%
- \else% Dans les autres cas
- \ifnum\blx@commentarystyle=\@ne% Si on a choisi l'option halfdash
- \usebibmacro{styleB}% Alors un tiret demi-cadratin est imprimŽ
- \else% Dans les autres cas = on a choisi l'option comma
- \usebibmacro{styleC}% une virgule et une espace sont imprimŽes
- \fi%
- \fi}%
-}
-
-
-
-% MACROS DE CITATION
-
-\newbibmacro*{cite}%
-{%
-\iffieldequalstr{entrytype}{customa}%
- {\usebibmacro{commentary}}%
- {\iffieldequalstr{entrytype}{customb}%
- {\usebibmacro{jurisdiction}}%
- {\iffieldequalstr{entrytype}{jurisdiction}%
- {\usebibmacro{jurisdiction}}%
- {\iffieldequalstr{entrytype}{online}%
- {\usebibmacro{online}}%
- {\usebibmacro{citationgeneral}}%
- }%
- }%
- }%
-}%
-
-
-% COMMANDES DE CITATION
-
-\DeclareCiteCommand{\footcite}[\mkbibfootnote]%
- {\usebibmacro{prenote}}%
- {\usebibmacro{citeindex}%
- \usebibmacro{cite}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}%
-
-\DeclareCiteCommand{\textcite}[]%
- {\usebibmacro{prenote}}%
- {\usebibmacro{citeindex}%
- \usebibmacro{cite}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}%
-
-\DeclareCiteCommand{\cite}[]%
- {\usebibmacro{prenote}}%
- {\usebibmacro{citeindex}%
- \usebibmacro{cite}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}%
-
-\DeclareCiteCommand{\parencite}[\mkbibparens]%
- {\usebibmacro{prenote}}%
- {\usebibmacro{citeindex}%
- \usebibmacro{cite}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}%
-
-
-% COMMANDES SPECIFIQUES POUR LES CITATIONS DE JURISPRUDENCE
-
-% Commandes pour l'utilisateur
-
-\usepackage{xargs}
-
-\newcommandx{\jdcite}[5][1,2,3,4]{%
-\ifdef{\jurisdiction@prenote}%
- {\renewcommand{\jurisdiction@prenote}{#1}}% Actualisation de la commande \jurisdiction@prenote avec le contenu du champ #1
- {\newcommand{\jurisdiction@prenote}{#1}}%
-\ifdef{\jurisdiction@recital}%
- {\renewcommand{\jurisdiction@recital}{#3}}% Actualisation de la commande \jurisdiction@recital avec le contenu du champ #3
- {\newcommand{\jurisdiction@recital}{#3}}%
-\ifdef{\jurisdiction@page}%
- {\renewcommand{\jurisdiction@page}{#4}}% Actualisation de la commande \jurisdiction@page avec le contenu du champ #4
- {\newcommand{\jurisdiction@page}{#4}}%
-\jurisdiction@cite%
-[#1]%
-[#2]%
-{#5}%
-}
-
-
-
-
-% Interface avec biblatex
-
-\DeclareCiteCommand{\jurisdiction@cite}[]%
- {% PRECODE
- \usebibmacro{prenote}%
- \ifcsempty{jurisdiction@prenote}% test pour savoir s'il y a quelque chose dans le champ optionnel prenote.
- {\bibsentence}% s'il n'y a rien, le bibstring (p. ex. Arrt prŽcitŽ) suivant est capitalisŽ
- {\midsentence}% s'il y a quelque chose, le bibstring suivant commence par une minuscule
-}%
- {% LOOPCODE
- \usebibmacro{citeindex}%
-\iffieldequalstr{entrytype}{jurisdiction}% test pour tre sur qu'on est dans une fiche @jurisdiction
-{\usebibmacro{jurisdiction@details}}% si c'est bien le cas, on utilise le macro jurisdiction@details
-{% <= Un message d'erreur appara”t si on est pas dans une fiche @jurisdiction
-\PackageError{biblatex-swiss-legal}{Use the \protect\jdcite\space command \MessageBreak ONLY for 'jurisdiction' entry types!}{Replace the entrykey by an \MessageBreak entrykey corresponding to a 'jurisdiction' entry.}%
-}%
-}%
- {\multicitedelim}% SEPCODE
- {\usebibmacro{postnote}}% POSTCODE
-
-\DeclareMultiCiteCommand{\jurisdiction@cites}{\jurisdiction@cite}{\multicitedelim}
-
-
-
-
-%% Macro dŽtaillŽe
+\ProvidesFile{biblatex-swiss-legal-general.cbx}[2012/12/28 v1.1 alpha]
-\newbibmacro{jurisdiction@details}{%
-\ifciteibid% Test pour savoir si l'arrt vient d'tre citŽ
- {\ifcsempty{jurisdiction@recital}% Si oui, on se demande si un numŽro de considŽrant a ŽtŽ dŽfini
- {\usebibmacro{ibid}}% Si a n'est pas le cas, le bibstring lastruling uniqument s'imprime
- {\usebibmacro{ibid}\addcomma\addspace\bibsstring{recital}\addspace\jurisdiction@recital% Sinon, impression du bibstring + considŽrant + Žv. page.
- \ifcsempty{jurisdiction@page}%
- {}%
- {\addspace\mkbibparens{\jurisdiction@page}}%
- }%
- }%
- {%
-\printfield{usera}%
-\iffieldundef{userb}%
- {}%
- {\newunit\printfield{userb}}%
-\iffieldundef{userc}%
- {}%
- {\newunit\printfield{userc}}%
-\iffieldundef{userd}%
- {}%
- {\newunit\printfield{userd}}%
-\iffieldequalstr{usera}{ATF}% <= La date ne s'imprime que s'il ne s'agit pas d'un ATF.
- {}%
- {\iffieldundef{origyear}%
- {}%
- {\addspace\mkbibparens{\printfield{origday}\adddot\printfield{origmonth}\adddot\printfield{origyear}}}%
- }%
-\iftoggle{bbx:jstitles}% <= Option pour activer / dŽsactiver la mention du titre dans les citations d'arrts
- {\iffieldundef{title}%
- {}%
- {\newunit%
- \printfield{title}}%
- }%
- {}%
-\iflistundef{language}%
- {}%
- {\addspace\mkbibbrackets{\printlist{language}}}%
-\ifcsempty{jurisdiction@recital}%
- {}%
- {%
- \addcomma\addspace\bibsstring{recital}\addspace\jurisdiction@recital%
- \ifcsempty{jurisdiction@page}%
- {}%
- {\addspace\mkbibparens{\jurisdiction@page}}%
- }%
-\iffieldequalstr{howpublished}{publ}
- {\newunit}%
- {\newblock}%
-\iffieldbibstring{howpublished}%
- {\bibsstring{\thefield{howpublished}}}% Dans les citations, on va toujours utiliser le string abrŽgŽ.
- {\printfield{howpublished}}%
-\newunit%
- \iffieldbibstring{journaltitle}
- {% aa) s'il existe un string pour le nom de la revue
- \bibsstring{\thefield{journaltitle}}%
- }%
- {% bb) s'il n'existe pas de string pour le nom de la revue
- \printfield{journaltitle}%
- }%
- \newunit%
- \usebibmacro{date}%
- \newunit%
- \printfield{volume}%
- \newunit%
- \iffieldundef{number}%
- {}%
- {\bibsstring{number}\addnbthinspace\printfield{number}}%
- \newunit%
- \printfield{pages}%
-}%
-}
+\RequireCitationStyle{biblatex-swiss-legal-base}
+\RequireBibliographyStyle{biblatex-swiss-legal-general}
-%% INDEXATION AUTOMATIQUE DE LA JURISPRUDENCE (expŽrimental)
-%
-\iftoggle{bbx:jurisdictionindex}%
-{%
-\makeindex{jurisdiction}%
-\AtEveryCitekey{%
- \iffieldequalstr{entrytype}{jurisdiction}%
- {\index{jurisdiction}{[\thefield{origyear}-\thefield{origmonth}-\thefield{origday}] \thefield{usera}\addspace\thefield{userb}\addspace\thefield{userc}\addspace\thefield{userd}}}%
- {%
- \iffieldequalstr{entrytype}{customb}%
- {\index{jurisdiction}{[\thefield{origyear}-\thefield{origmonth}-\thefield{origday}] \thefield{usera}\addspace\thefield{userb}\addspace\thefield{userc}\addspace\thefield{userd}!-- consid.\addspace\thefield{usere}}}%
- {}%
- }%
- }%
-}%
-{}%
+% MACROS PAR TYPE D'ENTRÉE
+\newbibmacro{book:cite}{\usebibmacro{generic:short}}
+\newbibmacro{thesis:cite}{\usebibmacro{generic:short}}
+\newbibmacro{inbook:cite}{\usebibmacro{generic:short}}
+\newbibmacro{article:cite}{\usebibmacro{generic:short}}
+\newbibmacro{commentary:cite}{\usebibmacro{generic:short}}
+\newbibmacro{customa:cite}{\usebibmacro{customa:full}}
+\newbibmacro{jurisdiction:cite}{\usebibmacro{jurisdiction:full}}
+\newbibmacro{customb:cite}{\usebibmacro{jurisdiction:full}}
+\newbibmacro{online:cite}{\usebibmacro{online:full}}
+\newbibmacro{legislation:cite}{\usebibmacro{legislation:full}}
\endinput