기관 저자의 경우 참고문헌에 작은 대문자를 사용합니다.

기관 저자의 경우 참고문헌에 작은 대문자를 사용합니다.

저는 참고문헌의 레이아웃을 정의하기 위해 biblatex-apa를 사용하고 있습니다. 이제 저는 기관이나 뉴스 웹사이트의 여러 (내부) 문서를 인용하고 있는데, 이제 해당 문서에는 약어를 사용하여 표시됩니다. 이러한 약어를 작은 대문자로 표시하고 싶습니다. 사실 저는 모든 약식 기관이 작은 대문자로 표시되기를 원합니다. 이것이 가능한가? 이제 (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에서는 두 항목이 a를 공유하지 않으므로 확인할 keyword키워드를 추가했습니다 .instauth

우리가 하는 일은 매우 간단합니다. 모든 인용 명령에서, 그리고 모든 참고문헌 항목을 확인하기 전에 항목에 키워드가 있으면 instauth성 형식이 의 매크로를 통해 약어를 생성하도록 설정됩니다 biblatex( \mkbibacro이것이 작동하려면 " [t]그 약어는 대문자로 표시되어야 합니다.", p. 89, thebiblatex선적 서류 비치).

\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. 이는 많은 자동 솔루션과 마찬가지로 일부 특수한 경우에 중단될 수 있습니다.

MWE

\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 이름 형식.

관련 정보