機関著者の参考文献には小文字の大文字を使用する

機関著者の参考文献には小文字の大文字を使用する

私は biblatex-apa を使用して参考文献のレイアウトを定義しています。現在、機関やニュース Web サイトからいくつかの (内部) ドキュメントを引用していますが、ドキュメントでは略語で表示されます。これらの略語を小文字で表示したいのですが、実際には、省略された機関はすべて小文字で表示したいのです。これは可能ですか? 現在、タグ (Zotero からエクスポート) を使用して参考文献を分割しているので、タグを使用すると、テキスト内でも引用を小文字で表示できると思います。これを行う方法をご存知の方はいますか?

私のMWE:

\documentclass[10pt,a4paper,twoside]{book}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa, date=year, natbib=true, sorting=nyt, sortcites=true]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\bibliography{Zotero}
\begin{document}
\chapter{Literature review}
This is some text with a double reference \cite{nos_weeralarm_2009, ns_volle_2013}.


\printbibliography[notkeyword=internal]
\printbibliography[title={Internal Documents}, keyword=internal]
\end{document}

私の Zotero.bib の内容は次のとおりです。

@online{nos_weeralarm_2009,
title = {Weeralarm en verkeeralarm ingetrokken},
url = {http://nos.nl/l/124074},
titleaddon = {{NOS.nl}},
author = {{NOS}}, %THIS AUTHOR MUST BE PRINTED IN SC
urldate = {2014-02-12},
date = {2009-12-20},
keywords = {gladheid, ijs, ongeluk, openbaar vervoer, schiphol, sneeuw}
}
@report{ns_volle_2013,
location = {Utrecht},
title = {Internal document title}},
institution = {NS},
type = {Internal Document},
author = {{NS}}, % THIS AUTHOR MUST BE PRINTED IN SC
date = {2013},
keywords = {internal}
}

答え1

小文字の大文字による機関名を必要とするすべての引用に同じタグが付いている場合は、それが可能であるはずです。

ただし、MWE では 2 つのエントリが を共有していないため、チェックするkeywordキーワードを追加しました。instauth

私たちがやっていることはとてもシンプルです。引用コマンドごとに、また参考文献のエントリの前に、エントリにキーワード があるかどうかをチェックします。ある場合は、のマクロinstauthを介して頭字語を生成するように姓の形式を設定します(これが機能するには、「頭字語は大文字で指定する必要があります」、p. 89、biblatex\mkbibacrobiblatexドキュメンテーション)。

\AtEveryCitekey{%
  \ifkeyword{instauth}
    {\renewcommand*{\mkbibnamelast}[1]{\mkbibacro{#1}}}
    {}%
}
\AtEveryBibitem{%
  \ifkeyword{instauth}
    {\renewcommand*{\mkbibnamelast}[1]{\mkbibacro{#1}}}
    {}%
}

別の再定義は、より短い

\renewcommand*{\mkbibnamelast}[1]{%
  \ifkeyword{instauth}
    {\mkbibacro{#1}}
    {#1}}

条件文は内部\ifkeyword書式指定ディレクティブ。そうすると、上で必要だったように、変更を が定義されているグループにフックする必要がなくなります。

instauthある程度まで自動検出も可能だ。

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=true]{
      \step[fieldsource=author, match=\regexp{^\{.+?\}$}, final]
      \step[fieldset=keywords, append, fieldvalue={,instauth}]
    }
  }
}

author二重中括弧で囲まれた文字列を含むすべてのフィールドは として分類されますinstauth。これは、多くの自動ソリューションと同様に、一部の特殊なケースでは機能しない可能性があります。

ムウェ

\documentclass[a4paper]{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage{filecontents}
\usepackage[backend=biber, style=apa, date=year, natbib=true, sorting=nyt, sortcites=true]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{filecontents*}{\jobname.bib}
@online{nos_weeralarm_2009,
title = {Weeralarm en verkeeralarm ingetrokken},
url = {http://nos.nl/l/124074},
titleaddon = {{NOS.nl}},
author = {{NOS}}, %THIS AUTHOR MUST BE PRINTED IN SC
urldate = {2014-02-12},
date = {2009-12-20},
keywords = {gladheid, ijs, ongeluk, openbaar vervoer, schiphol, sneeuw}
}
@report{ns_volle_2013,
location = {Utrecht},
title = {Internal document title},
institution = {NS},
type = {Internal Document},
author = {{NS}}, % THIS AUTHOR MUST BE PRINTED IN SC
date = {2013},
keywords = {internal},
}
\end{filecontents*}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=true]{
      \step[fieldsource=author, match=\regexp{^\{.+?\}$}, final]
      \step[fieldset=keywords, append, fieldvalue={,instauth}]
    }
  }
}

\renewcommand*{\mkbibnamelast}[1]{%
  \ifkeyword{instauth}
    {\mkbibacro{#1}}
    {#1}}


\begin{document}
This is some text with a double reference \cite{nos_weeralarm_2009, ns_volle_2013, wilde, cicero}.


\printbibliography[notkeyword=internal]
\printbibliography[title={Internal Documents}, keyword=internal]
\end{document}

ここに画像の説明を入力してください

答え2

注意: 2016年3月現在 (biblatex 3.3)、\mkbibnamelast の代わりに \mkbibnamefamily を変更する必要があります。Biblatex 3.3 の名前のフォーマット

関連情報