diff options
author | Karl Berry <karl@freefriends.org> | 2013-08-10 22:45:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-08-10 22:45:47 +0000 |
commit | d2938c5fcfa93090c7f5d006d80884a190caefaa (patch) | |
tree | ca6fb8e094622b2260adfe160f82523fbbba9d34 /Master/texmf-dist/tex/latex | |
parent | dc68b1b33aee8e2228bd36e1a7319dbcabcc7890 (diff) |
uni-wtal-lin (10aug13)
git-svn-id: svn://tug.org/texlive/trunk@31409 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.bbx | 255 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.cbx | 2 |
2 files changed, 184 insertions, 73 deletions
diff --git a/Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.bbx b/Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.bbx index 0f5994c051f..12646601d2c 100644 --- a/Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.bbx +++ b/Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.bbx @@ -1,22 +1,9 @@ -% uni-wtal-lin.bbx, v 0.1 2012-04-17, Carsten A. Dahlmann (Ace@Dahlmann.net) +% uni-wtal-lin.bbx, v 0.2 2013-08-09, Carsten A. Dahlmann (Ace@Dahlmann.net) % based on authoryear - -%% for a proper result make sure to load the following options: -% -% \usepackage[ -% style=uni-wtal-lin, -% maxnames=2, -% maxbibnames=99, -% dashed=false, -% ]{biblatex} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %% requires authoryear \RequireBibliographyStyle{authoryear} - %% Book \DeclareBibliographyDriver{book}{% \usebibmacro{bibindex}% @@ -31,9 +18,6 @@ {}% \newunit \newunit\newblock - \iffieldundef{series} - {}% - {\usebibmacro{series+number}}% \usebibmacro{byeditor+others}% \newunit\newblock \printfield{note}% @@ -54,7 +38,10 @@ \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \setunit{\bibpagespunct}\newblock - \printfield{edition}% + \newunit\newblock + \iffieldundef{series} + {}% + {\usebibmacro{series+number}}% \usebibmacro{finentry}} %% InBook @@ -71,7 +58,7 @@ \newunit\newblock \usebibmacro{in:}% \usebibmacro{bybookauthor}% - \newunit\newblock + \setunit{\titleaddonpunct}\newblock \usebibmacro{maintitle+booktitle}% \newunit\newblock \iffieldundef{maintitle} @@ -79,17 +66,14 @@ \printfield{part}} {}% \newunit\newblock - \iffieldundef{series} - {}% - {\usebibmacro{series+number}}% \usebibmacro{byeditor+others}% \newunit\newblock \printfield{note}% \newunit\newblock - \usebibmacro{chapter+pages}% - \newunit\newblock \usebibmacro{publisher+location+date}% \newunit\newblock + \usebibmacro{chapter+pages}% + \newunit\newblock \iftoggle{bbx:isbn} {\printfield{isbn}} {}% @@ -99,8 +83,11 @@ \usebibmacro{addendum+pubstate}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% - \setunit{\bibpagespunct}\newblock - \printfield{edition}% + \setunit{\bibpagespunct} + \newunit\newblock + \iffieldundef{series} + {}% + {\usebibmacro{series+number}}% \usebibmacro{finentry}} %% Collection @@ -120,10 +107,6 @@ \printfield{part}} {}% \newunit\newblock - \iffieldundef{series} - {}% - {\usebibmacro{series+number}}% - \newunit\newblock \printfield{note}% \newunit\newblock \usebibmacro{publisher+location+date}% @@ -142,7 +125,10 @@ \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \setunit{\bibpagespunct}\newblock - \printfield{edition}% + \newunit\newblock + \iffieldundef{series} + {}% + {\usebibmacro{series+number}}% \usebibmacro{finentry}} %% InCollection @@ -157,7 +143,9 @@ \newunit\newblock \usebibmacro{byauthor}% \newunit\newblock - \usebibmacro{in:}% + \usebibmacro{in:}% + \usebibmacro{byeditor+others} + \setunit{\titleaddonpunct}\newblock \usebibmacro{maintitle+booktitle}% \newunit \iffieldundef{maintitle} @@ -165,42 +153,54 @@ \printfield{part}} {}% \newunit\newblock - \iffieldundef{series} - {}% - {\usebibmacro{series+number}} - \printfield{note}% - \newunit\newblock - \usebibmacro{byeditor+others} + \printfield{note}% \newunit\newblock + \usebibmacro{publisher+location+date}% + \newunit\newblock \usebibmacro{chapter+pages}% \newunit\newblock - \usebibmacro{publisher+location+date}% - \newunit\newblock \usebibmacro{doi+eprint+url}% \newunit\newblock \usebibmacro{addendum+pubstate}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% - \setunit{\bibpagespunct}\newblock - \printfield{edition}% + \setunit{\bibpagespunct} + \newunit\newblock + \iffieldundef{series} + {}% + {\usebibmacro{series+number}} \usebibmacro{finentry}} %% Article -\DeclareBibliographyDriver{article}{% - \usebibmacro{author/editor}% - \newunit - \usebibmacro{title}% - \newunit - \usebibmacro{journal}% - \setunit*{\addspace}% - \printtext{\printfield{volume}}% - \iffieldundef{number}{}{\printtext[parens]{\printfield{number}}}% - \setunit*{\addcolon\addspace}% - \printfield{pages}% +\DeclareBibliographyDriver{article}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{bytranslator+others}% + \newunit\newblock + \printfield{version}% + \newunit\newblock + \usebibmacro{journal+issuetitle}% + \newunit + \usebibmacro{note+pages}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{issn}} + {}% \newunit\newblock \usebibmacro{doi+eprint+url}% \newunit\newblock - \usebibmacro{finentry}} + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \usebibmacro{finentry}} %% Unpublished \DeclareBibliographyDriver{unpublished}{% @@ -218,25 +218,106 @@ \newunit\newblock \printfield{note}% \newunit\newblock - \usebibmacro{location+date}% - \newunit\newblock \iftoggle{bbx:url} {\usebibmacro{url+urldate}} {}% \newunit\newblock \usebibmacro{addendum+pubstate}% + \setunit{\bibpagespunct}% + \usebibmacro{location+date}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \newunit\newblock \usebibmacro{finentry}} -%% put series and number into brackets + +%% use option edsuper for turning superscripted edition on/off + +\newbool{bbx:editionstring} +\newbool{bbx:edsuper} + +\DeclareBibliographyOption{editionstring}[true]{% + \csuse{bool#1}{bbx:editionstring}} +\DeclareBibliographyOption{edsuper}[true]{% + \csuse{bool#1}{bbx:edsuper}} + +%% DeclareFieldFormat edition +\DeclareFieldFormat{edition}{% + \ifinteger{#1} + {\mkbibordedition{#1}~\bibstring{edition}} + {\ifbool{bbx:editionstring} + {#1\addspace\bibstring{edition}\isdot} + {#1\isdot}}} + +%% DeclareFieldFormat edition:super +\DeclareFieldFormat{edition:super}{% + \ifinteger{#1} + {\mkbibsuperscript{#1}} + {\blxdw@warning@noline{% + The 'edition' field of entry\MessageBreak + '\abx@field@entrykey' is not an integer.\MessageBreak + The edition will not be printed as\MessageBreak + superscript. Instead, the 'edition'\MessageBreak + field is printed completely}}} + +%% Test, if field is integer +\newcommand{\bbx@iffieldinteger}[1]{% + \iffieldundef{#1} + {\@secondoftwo} + {\edef\@tempa{\strfield{#1}}% + \expandafter\ifinteger\expandafter{\@tempa}}} + +%% for position of edition at the end: +%% if option edsuper true and +%%%% if field integer, do nothing +%%%% else print edition +%% else print edition +%% +\renewbibmacro*{publisher+location+date}{% + \printlist{location}% + \iflistundef{publisher} + {\setunit*{\addcomma\space}} + {\setunit*{\addcolon\space}}% + \printlist{publisher}% + \setunit*{\addcomma\space}% + \usebibmacro{date}% + \ifbool{bbx:edsuper} + {\bbx@iffieldinteger{edition} + {}% + {\printfield{edition}% + \newunit}}% + {\printfield{edition}% + \newunit}} + +%% for position of edition (superscripted) at the beginning: +%% if option edsuper true and +%%%% if field integer, print edition superscripted +%%%% else do nothing +%% else do nothing +%% +\renewbibmacro*{date+extrayear}{% + \iffieldundef{year} + {}% + {\printtext[parens]{% + \printfield{issue}% + \setunit*{\addspace}% + {\printdateextra}% + {\ifbool{bbx:edsuper}% + {\bbx@iffieldinteger{edition}% + {\printfield[edition:super]{edition}}% + {}}% + {}}% + }}}% + + +%% put series and number into parenthesis \renewbibmacro*{series+number}{% - \printtext[parens]{\printfield{series}% - \setunit*{\addcomma\addspace}% - \printfield{number}\adddot% + \printtext[parens]{=\addhpthinspace\printfield{series}% + \setunit*{\addspace}% + \printfield{number}\nopunct% }\setunit*{\addspace}\nopunct} + %% no comma before (eds.) \renewbibmacro*{bbx:editor}[1]{% \ifboolexpr{ @@ -255,7 +336,9 @@ {\global\undef\bbx@lasthash \usebibmacro{labeltitle}% \setunit*{\addspace}}% - \usebibmacro{date+extrayear}} + \usebibmacro{date+extrayear}}% +% \usebibmacro{year}}% + %% byeditor: first-last (eds.) \renewbibmacro*{byeditor+others}{% @@ -269,14 +352,32 @@ \usebibmacro{byeditorx}% \usebibmacro{bytranslator+others}} -%% listing of names: name, name & final name -\renewcommand*{\multinamedelim}{\addcomma\space} -\renewcommand*{\finalnamedelim}{% - \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% - \addspace\bibstring{and}\space} -%% comma after note -\DeclareFieldFormat{note}{#1\addcomma\addspace} +%% deactivate series for journal +\renewbibmacro*{journal+issuetitle}{% + \usebibmacro{journal}% + \setunit*{\addspace}% + \usebibmacro{volume+number+eid}% + \setunit{\addspace}% + \usebibmacro{issue+date}% + \setunit{\addcolon\space}% + \usebibmacro{issue}% + \newunit} + + +%% renew volume+number: colon as delimiter +\newbibmacro*{volume+number+eid}{% + \printfield{volume}% + \setunit*{\addcolon\space}% + \printfield{number}% + \setunit{\addcomma\space}% + \printfield{eid}} + + +%% listing of names: name/name/final name +\renewcommand{\multinamedelim}[0]{\addslash}% +\renewcommand*{\finalnamedelim}[0]{\addslash}% + %% change of german abbreviations \DefineBibliographyStrings{german}{% @@ -296,18 +397,19 @@ andothers={et\addabbrvspace al\adddot}, } + %% no quotation marks for article, inbook, ... \DeclareFieldFormat [article,inbook,incollection,inproceedings,patent,thesis,unpublished] {title}{#1\isdot} -%% no colon after the word "in" +%% colon after the word "in" \renewbibmacro*{in:}{% \printtext{% - \bibstring{in}\nopunct\space}} + \bibstring{in}\addcolon\space}} -%% no "URL:" before url -\DeclareFieldFormat{url}{\url{#1}} +%% colon for "editor:" after "in:" +\newcommand*{\titleaddonpunct}{\addcolon\space} %% no "visited:" before urldate \DeclareFieldFormat{urldate}{\mkbibparens{#1}} @@ -315,4 +417,13 @@ %% vertical spacing between entrys \setlength{\bibitemsep}{0.8\baselineskip} + +%% load style defaults +\ExecuteBibliographyOptions{% +maxnames=2, +maxbibnames=99, +dashed=false, +edsuper=true, +}% + \endinput diff --git a/Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.cbx b/Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.cbx index cd4cc5d56a5..82941ee1454 100644 --- a/Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.cbx +++ b/Master/texmf-dist/tex/latex/uni-wtal-lin/uni-wtal-lin.cbx @@ -1,4 +1,4 @@ -% uni-wtal-lin.cbx, v 0.1 2012-04-17, Carsten A. Dahlmann (Ace@Dahlmann.net) +% uni-wtal-lin.cbx, v 0.2 2013-08-09, Carsten A. Dahlmann (Ace@Dahlmann.net) \RequireCitationStyle{authoryear} |