diff options
author | Karl Berry <karl@freefriends.org> | 2015-01-11 22:25:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-01-11 22:25:35 +0000 |
commit | ffd0a5d337e9ff3c89109f208771ec70f599ebef (patch) | |
tree | 1dfea0d60d89adbe1b9489c034939d9112ba8cb0 /Master/texmf-dist/tex/latex/cnltx/cnltx.bbx | |
parent | ffc578485f0573fbef95749a3b239380be42da87 (diff) |
cnltx (11jan15)
git-svn-id: svn://tug.org/texlive/trunk@36025 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cnltx/cnltx.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/cnltx/cnltx.bbx | 73 |
1 files changed, 64 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/cnltx/cnltx.bbx b/Master/texmf-dist/tex/latex/cnltx/cnltx.bbx index 0c8099fb0af..1fd4dc2b1bc 100644 --- a/Master/texmf-dist/tex/latex/cnltx/cnltx.bbx +++ b/Master/texmf-dist/tex/latex/cnltx/cnltx.bbx @@ -25,11 +25,13 @@ % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % -------------------------------------------------------------------------- -\RequirePackage{cnltx-example} +\RequirePackage{cnltx-base} \ProvidesFile{cnltx.bbx}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info] +\cnltx@load@modules{example,tools,translations} + \RequireBibliographyStyle{alphabetic} -\ExecuteBibliographyOptions{block=ragged} +\ExecuteBibliographyOptions{block=ragged,useprefix=true} \DeclareBibliographyDriver{latex}{% \usebibmacro{bibindex}% @@ -77,13 +79,22 @@ }% } +\renewcommand*{\mkbibnamelast}[1]{\cnltx@write@lastname{#1}} +\renewcommand*{\mkbibnamefirst}[1]{\cnltx@write@firstname{#1}} +\renewcommand*{\mkbibnameprefix}[1]{\cnltx@write@lastname{#1}} + \DeclareNameAlias[package]{maintainer}{default} \DeclareNameAlias[class]{maintainer}{default} \DeclareNameAlias[bundle]{maintainer}{default} -\DeclareIndexNameAlias[package]{maintainer}{default} -\DeclareIndexNameAlias[class]{maintainer}{default} -\DeclareIndexNameAlias[bundle]{maintainer}{default} +\RequirePackage{translations} +\DeclareTranslationFallback{cnltx-maintainer}{current maintainer} +\DeclareTranslation{English}{cnltx-maintainer}{current maintainer} +\DeclareTranslation{German}{cnltx-maintainer}{aktueller Maintainer} + +\DeclareTranslationFallback{cnltx-maintainers}{current maintainers} +\DeclareTranslation{English}{cnltx-maintainers}{current maintainers} +\DeclareTranslation{German}{cnltx-maintainers}{aktuelle Maintainer} \DeclareFieldFormat[package]{title}{\pkg*{#1}} \DeclareFieldFormat[class]{title}{\cls*{#1}} @@ -121,6 +132,46 @@ {\bndidx{#1}}% } +\def\cnltx@onlyonefirstname#1\bibnamedelima#2\q@stop{#1} + +\DeclareIndexNameFormat{cnltx}{% + \cnltx@if@in{#3}{\bibnamedelima} + {% + \usebibmacro{index:entry}{\index}{% + \ifblank{#5}{}{#5 }% + \@firstofone#1% + \ifblank{#3}{}{, \cnltx@onlyonefirstname#3\q@stop}% + \actualoperator + \ifblank{#5} + {\cnltx@write@lastname{#1}} + {\cnltx@write@lastname{#5 #1}}% + \ifblank{#3}{}{, \cnltx@write@firstname{\cnltx@onlyonefirstname#3\q@stop}}% + }% + } + {% + \usebibmacro{index:entry}{\index}{% + \ifblank{#5}{}{#5 }% + \@firstofone#1% + \ifblank{#3}{}{, #3}% + \actualoperator + \ifblank{#5} + {\cnltx@write@lastname{#1}} + {\cnltx@write@lastname{#5 #1}}% + \ifblank{#3}{}{, \cnltx@write@firstname{#3}}% + }% + }% +} + +\DeclareIndexNameAlias{labelname}{cnltx} +\DeclareIndexNameAlias{author}{cnltx} +\DeclareIndexNameAlias{maintainer}{cnltx} +\DeclareIndexNameAlias{labelname}{cnltx} +\DeclareIndexNameAlias{author}{cnltx} +\DeclareIndexNameAlias{maintainer}{cnltx} +\DeclareIndexNameAlias{labelname}{cnltx} +\DeclareIndexNameAlias{author}{cnltx} +\DeclareIndexNameAlias{maintainer}{cnltx} + \DeclareFieldFormat[package]{subtitle}{\mkbibemph{#1}} \DeclareFieldFormat[class]{subtitle}{\mkbibemph{#1}} \DeclareFieldFormat[bundle]{subtitle}{\mkbibemph{#1}} @@ -143,8 +194,12 @@ \endinput HISTORY: -2013/09/14 v0.4 - first version added to the bundle -2013/10/04 v0.7a - added drivers `@class' and `@bundle' -2013/11/22 v0.9 - made independent from the `cnltx-doc' class - +2013/09/14 v0.4 - first version added to the bundle +2013/10/04 v0.7a - added drivers `@class' and `@bundle' +2013/11/22 v0.9 - made independent from the `cnltx-doc' class +2014/03/11 v0.11 - change name format so that names are printed according to + the format of the \newname commands from the `tools' + module; + this is going to need tests if it really is consistent + for different types of name formats (prefixes, affixes...) |