summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-musuos/musuos.cbx
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2011-09-26 17:19:31 +0000
committerNorbert Preining <preining@logic.at>2011-09-26 17:19:31 +0000
commit0454199fb8d0690826381492ba9d7eaebf491dec (patch)
treedb4b73ed1c8c56016d58c9fbf3ef4459bfcdfb7a /Master/texmf-dist/tex/latex/biblatex-musuos/musuos.cbx
parent6eff7b7c443af1e1ee9630503e2724984573bcf5 (diff)
fix biblatex-musuos mis-placements
git-svn-id: svn://tug.org/texlive/trunk@24097 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-musuos/musuos.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-musuos/musuos.cbx191
1 files changed, 191 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-musuos/musuos.cbx b/Master/texmf-dist/tex/latex/biblatex-musuos/musuos.cbx
new file mode 100644
index 00000000000..7959047eee0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-musuos/musuos.cbx
@@ -0,0 +1,191 @@
+% Tobias Weh, 2011
+
+% THANKS to Audrey form TeX.SX for building the
+% quoted-in-cite-code. His code is marked with the
+% pseudo tag <audrey>.
+% See http://tex.stackexchange.com/q/27964/4918
+\ProvidesFile{musuos.cbx}[2011/09/10 v1.0 Musikwissenschaften Uni Osnabrueck]
+
+% Ausgangsstil laden
+\RequireCitationStyle{verbose-ibid}
+
+% Voreinstellungen
+\ExecuteBibliographyOptions{
+ autocite=footnote,
+ labelyear=true,
+ dashed=false,
+ urldate=long,
+%<audrey>
+ citetracker=true,
+ ibidtracker=true,
+ ibidpage=true,
+%</audrey>
+}
+
+% Auf die neue Sprachdatei umleiten
+\DeclareLanguageMapping{german}{german-musuos}
+
+% Zitatmacros anpassen
+\renewbibmacro*{cite:short}{%
+ \iffieldequalstr{entrytype}{music}{%
+ \iffieldundef{userb}{%
+ \printnames{labelname}%
+ \newunit{\addcolon\space}{\printfield{title}}
+ }{%
+ \printfield{userb}%
+ }
+ }{%
+ \ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}{%
+ \printnames{labelname}%
+ \setunit{\nameyeardelim}%
+ \usebibmacro{cite:label}%
+ \setunit{\addcolon}%
+ }{%
+ \printnames{labelname}%
+ \setunit{\nameyeardelim}%
+ \usebibmacro{cite:labelyear+extrayear}%
+ }%
+ }%
+}
+
+\newbibmacro*{cite:labelyear+extrayear}{%
+ \iffieldundef{labelyear}{%
+ }{%
+ \printtext[bibhyperref]{%
+ \printfield{labelyear}%
+ \printfield{extrayear}}
+ }%
+}
+
+\newbibmacro*{cite:label}{%
+ \newunit{\nameyeardelim}{o.\,J.}%
+}
+
+\renewbibmacro*{shorthandintro}{%
+ \iffieldundef{shorthandintro}
+ {\iffieldundef{shorthand}
+ {}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \bibstring{citedas}\space
+ \mkbibquote{\printfield{shorthand}}}}}
+ {\setunit{\addspace}%
+ \printtext[parens]{\printfield{shorthandintro}}}}
+
+%<audrey>
+\newbibmacro*{cite:quotee}{%
+ \savefieldcs{postnote}{cbx@post}%
+ \ifboolexpr{ test {\ifciteseen} and not test {\iftoggle{cbx@fullquote}} }
+ {\iffieldundef{shorthand}
+ {\ifboolexpr{ not test {\iffirstonpage}
+ and test {\ifsamepage{\value{instcount}}{\value{instcount}-2}}
+ and test {\iftoggle{cbx@iflastquote}}
+ and test {\iffieldequalcs{entrykey}{cbx@lastquoteekey}} }
+ {\printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
+ \iffieldequalcs{postnote}{cbx@lastquoteepost}
+ {\clearfield{postnote}}
+ {\global\toggletrue{cbx@ifquoteepost}}%
+ \global\toggletrue{cbx@iflastibid}}
+ {\usebibmacro{cite:short}}}
+ {\usebibmacro{cite:shorthand}}}
+ {\usebibmacro{cite:full}}%
+ \csxdef{cbx@lastquoteepost}{\csuse{cbx@post}}}
+
+\newbibmacro*{cite:quoter}{%
+ \savefieldcs{postnote}{cbx@post}%
+ \ifboolexpr{ not test {\iftoggle{cbx@fullquote}}
+ and test {\iftoggle{cbx@iflastibid}}
+ and test {\iffieldequalcs{entrykey}{cbx@lastquoterkey}} }
+ {\iffieldequalcs{postnote}{cbx@lastquoterpost}
+ {\clearfield{postnote}}
+ {\global\toggletrue{cbx@ifquoterpost}}}
+ {\iftoggle{cbx@iflastibid}
+ {\quotedelim}
+ {}%
+ \global\togglefalse{cbx@iflastibid}%
+ \ifboolexpr{ test {\ifciteseen} and not test {\iftoggle{cbx@fullquote}} }
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:short}}
+ {\usebibmacro{cite:shorthand}}}
+ {\usebibmacro{cite:full}}}%
+ \csxdef{cbx@lastquoterpost}{\csuse{cbx@post}}%
+ \global\togglefalse{cbx@ifquoteepost}}
+
+\DeclareCiteCommand{\cbx@quotecite}
+ {\usebibmacro{prenote}}
+ {\ifnumless{\value{multicitecount}}{2}% <loopcode>
+ {\usebibmacro{citeindex}% Current entry is a quotee
+ \addtocategory{quotee}{\thefield{entrykey}}%
+ \xdef\cbx@quoteekey{\thefield{entrykey}}%
+ \usebibmacro{cite:quotee}%
+ \csxdef{cbx@lastquoteekey}{\thefield{entrykey}}}
+ {\addtocategory{quoter}{\thefield{entrykey}}% Current entry is a quoter
+ \xifinlistcs{\thefield{entrykey}}{cbx@quoterlist@\cbx@quoteekey}
+ {}
+ {\csxappto{cbx@quoter@\cbx@quoteekey}{\thefield{entrykey},}%
+ \listcsxadd{cbx@quoterlist@\cbx@quoteekey}{\thefield{entrykey}}}%
+ \usebibmacro{cite:quoter}%
+ \csxdef{cbx@lastquoterkey}{\thefield{entrykey}}}}
+ {\multicitedelim}
+ {\iftoggle{cbx@iflastibid}
+ {\iftoggle{cbx@ifquoteepost}
+ {\let\postnotedelim=\quoteepostdelim}
+ {\iftoggle{cbx@ifquoterpost}
+ {\let\postnotedelim=\quoterpostdelim}
+ {}}}
+ {}%
+ \usebibmacro{cite:postnote}%
+ \global\toggletrue{cbx@iflastquote}}
+
+\newrobustcmd{\cbx@mkfullquote}{%
+ \AtNextCite{\citetrackerfalse}%
+ \toggletrue{cbx@fullquote}}
+
+\DeclareMultiCiteCommand{\quotecite}
+ [\cbx@qcwrapper\relax\mkbibautoformat]
+ {\cbx@quotecite}
+ {\cbx@qcdelim}
+\DeclareMultiCiteCommand{\fullquotecite}
+ [\cbx@qcwrapper\cbx@mkfullquote\mkbibautoformat]
+ {\cbx@quotecite}
+ {\cbx@qcdelim}
+
+\newrobustcmd{\mkbibautoformat}[1]{%
+ \cslet{cbx@autocite}{\autocite}%
+ \ifcsequal{cbx@autocite}{blx@acite@inline}
+ {\ifboolexpr{ test {\ifdefstring{\blx@bbxfile}{numeric}}
+ or test {\ifdefstring{\blx@bbxfile}{alphabetic}} }
+ {\mkbibbrackets{#1}}
+ {\mkbibparens{#1}}}
+ {\ifcsequal{cbx@autocite}{blx@acite@footnote}
+ {\iffootnote
+ {\ifboolexpr{ test {\ifdefstring{\blx@bbxfile}{numeric}}
+ or test {\ifdefstring{\blx@bbxfile}{alphabetic}} }
+ {\mkbibbrackets{#1}}
+ {\mkbibparens{#1}}}
+ {\mkbibfootnote{#1}}}
+ {\ifcsequal{cbx@autocite}{blx@acite@superscript}
+ {\mkbibsuperscript{#1}}
+ {#1}}}}
+
+
+\newrobustcmd{\cbx@qcwrapper}[3]{%
+ \global\toggletrue{cbx@isquote}%
+ \global\togglefalse{cbx@fullquote}%
+ #1#2{#3}%
+ \global\togglefalse{cbx@isquote}%
+ \global\togglefalse{cbx@iflastibid}%
+ \global\togglefalse{cbx@ifquoteepost}%
+ \global\togglefalse{cbx@ifquoterpost}}
+
+\newrobustcmd{\cbx@qcdelim}{%
+ \iftoggle{cbx@iflastibid}
+ {}
+ {\quotedelim}}
+%</audrey>
+
+% Feldformate anpassen
+\DeclareFieldFormat{url}{\url{#1}}
+\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
+
+\endinput \ No newline at end of file