biblatex-chicago에서 북타일과 시리즈를 함께 그룹화

biblatex-chicago에서 북타일과 시리즈를 함께 그룹화

참고 자료로 biblatex-chicago를 사용하고 있습니다. 내 턱받이 파일에는 ACM 디지털 라이브러리에서 가져온 회의 논문에 대한 많은 참고 자료가 포함되어 있습니다. 이러한 컨퍼런스의 약어는 컨퍼런스 자체의 전체 제목보다 더 잘 알려진 경우가 많습니다. 따라서 inproceedings항목의 경우 필드를 사용하여 약어를 포함했습니다 series. booktitle및 필드를 함께 그룹화하고 싶습니다 series.

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    ]{biblatex-chicago} % biblatex setup

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@inproceedings{paper2012,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    series = {CHI '12},
    pages = {937-946},
    location = {New York, NY, USA},    
    publisher = {{ACM}},    
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

이 예제는 현재 다음을 출력합니다.

스미스, 존. 2012. “논문제목” 에서컴퓨팅 시스템의 인적 요소에 관한 2012 ACM 연례 회의 간행물, 937-946. 치 '12. 뉴욕, 뉴욕, 미국: ACM.

inproceedings대신 항목 의 출력을 변경하여 booktitleseries필드가 다음과 같이 그룹화되도록 하고 싶습니다 .

스미스, 존. 2012. “논문제목” 에서컴퓨팅 시스템의 인적 요소에 관한 2012 ACM 연례 회의 간행물 — CHI '12, 937–46. 뉴욕, 뉴욕, 미국: ACM.

중요한 주의 사항은 모든 inproceedings항목에 series필드가 있는 것은 아니라는 것입니다.

이것이 biblatex-chicago로 가능합니까?

답변1

booktitleaddon대신 사용하도록 제안된 다른 솔루션 입니다 series. 개인적으로 나는 그것이 series사용하기에 적합한 분야라고 생각하지 않습니다 . 예를 들어 컴퓨터 과학 컨퍼런스의 출판물을 출판하는 컴퓨터 과학 시리즈의 Springer 강의 노트를 생각해 보십시오. 각 책에는 제목이 있지만(종종 학회 제목과 다름) 진행 과정은 약어로 학회 이름으로 알려진 경우가 더 많습니다. 그런 다음 LNCS 시리즈에 대한 참조와 시리즈 번호를 포함하는 것이 일반적입니다.

Biblatex를 와 함께 사용하면 biber새 필드를 생성할 수 있는 가능성을 제공합니다. 필드 를 추가하는 것이 좋습니다 acronym.

이 작업은 다음으로 수행할 수 있습니다.

\begin{filecontents}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{acronym}
\end{filecontents}

로컬 biblatex 구성 파일을 생성합니다.

그런 다음 새 필드를 조판하는 방법에 대한 지침을 제공해야 합니다( 는 이탤릭체로 표시됨 in proceedings).

\DeclareFieldFormat[inproceedings]{acronym}{\textit{#1}}

마지막 단계는 bibmacro이 경우 적절한 를 수정하는 것입니다 btitle+bstitle.

\newbibmacro*{btitle+bstitle}{% 
  \iffieldundef{booktitle}
  {}
  {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
      \ifentrytype{video}}%
    {}%
    {\usebibmacro{cms-in:}}%
    \printtext{%
      \printfield{booktitle}%
      \setunit{\addcolon\addspace}%
      \printfield[booktitle]{booksubtitle}}%
      \setunit{\addspace---\addspace}%
      \ifentrytype{inproceedings}
        {\printfield{acronym}}
        {}%
    \newcunit
    \printfield{booktitleaddon}%
    \setunit*{\addcomma\addspace}}}

\ifentrytype{inproceedings}이 항목 유형에만 변경 사항을 지역화하는 데 사용합니다 .

전체 MWE는 다음과 같습니다.

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    ]{biblatex-chicago} % biblatex setup

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@inproceedings{paper201x,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Long Title of the Confererence},
    acronym = {CONF'2012},
    pages = {937-946},
    series = {LNCS},
    number = {1234},
    location = {Heidelberg},    
    publisher = {Springer},    
}

@inproceedings{paper2012a,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    series = {CHI '12},
    pages = {937-946},
    location = {New York, NY, USA},    
    publisher = {{ACM}},    
}

@inproceedings{paper2012b,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    acronym = {CHI '12},
    pages = {937-946},
    location = {New York, NY, USA},    
    publisher = {{ACM}},    
}

\end{filecontents}

\begin{filecontents}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{acronym}
\end{filecontents}

\DeclareFieldFormat[inproceedings]{acronym}{\textit{#1}}

\newbibmacro*{btitle+bstitle}{% InIn fix from N&B
  \iffieldundef{booktitle}
  {}
  {\ifthenelse{\ifentrytype{audio}\OR\ifentrytype{music}\OR%
      \ifentrytype{video}}%
    {}%
    {\usebibmacro{cms-in:}}%
    \printtext{%
      \printfield{booktitle}%
      \setunit{\addcolon\addspace}%
      \printfield[booktitle]{booksubtitle}}%
      \setunit{\addspace---\addspace}%
      \ifentrytype{inproceedings}
        {\printfield{acronym}}
        {}%
    \newcunit
    \printfield{booktitleaddon}%
    \setunit*{\addcomma\addspace}}}



\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

여기에 이미지 설명을 입력하세요

답변2

booktitleaddon내 조언은 원하는 위치에 인쇄되도록 이미 설계되어 있으므로 대신 필드를 사용하는 것입니다 . 그러나 이러한 종류의 필드는 일반적으로 드라이버에서 꽤 '깊이' 있으므로 변경 사항이 inproceedings다른 "in-"과 동일한 bibmacros를 사용하므로 항목 에만 영향을 미치도록 주의해야 합니다.

나는 다음과 같이 할 것입니다: 새로운 bibmacros를 생성하고 패키지를 사용하여 xpatch필요한 것을 대체합니다.

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    ]{biblatex-chicago} % biblatex setup

\usepackage{xpatch}
\usepackage{xcolor}
\newcommand{\diff}[1]{\textcolor{red}{#1}}% <-- just to highlight differences

\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}% we need more entries...
@inproceedings{paper2012,
    author = {Smith, John},
    date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    booktitleaddon = {\diff{CHI '12}},
    number = 33,
    series = {\diff{This is the series}},
    pages = {937-946},
    location = {New York, NY, USA},
    publisher = {{ACM}},
}

@inproceedings{paper2013,
    author = {Smith, John},
    date = {2013},
    title = {Different Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    booksubtitle = {\diff{With a Subtitle}},
    booktitleaddon = {CHI '12},
    number = 34,
    series = {\diff{This is the series}},
    pages = {937-946},
    location = {New York, NY, USA},
    publisher = {{ACM}},
}

@inproceedings{paper2011,
    author = {Smith, John},
    date = {2011},
    title = {Another Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    booksubtitle = {\diff{With a Subtitle \& No Booktitleaddon}},
    pages = {937-946},
    location = {New York, NY, USA},
    publisher = {{ACM}},
}

@incollection{paper2014,
    author = {Doe, Jane},
    date = {2014},
    title = {Jane's Paper Title},
    booktitle = {Collected Essays},
    booksubtitle = {\diff{With a Series and a Booktitleaddon}},
    series = {CHI '13},
    booktitleaddon = {\diff{This is the booktitleaddon (which is preceded by the normal comma)}},
    pages = {937-946},
    location = {New York, NY, USA},
    publisher = {{ACM}},
}

\end{filecontents*}

% we need our own bibmacros
\newbibmacro*{INP-btitle+bstitle}{%
  \iffieldundef{booktitle}
    {}
    {\printtext{%
       \printfield{booktitle}%
       \setunit{\addcolon\addspace}%
       \printfield[booktitle]{booksubtitle}}%
     \newcunit
     \setunit{\addspace ---\addspace}%
     \printfield{booktitleaddon}}}

\newbibmacro*{INP-mtitle+mstitle+vol+part+btitle+bstitle}{%
  \usebibmacro{INP-btitle+bstitle}%
  \iffieldundef{booktitle}
  {\setunit{\addperiod\addspace}}% Fix customc?
  {\setunit{\addcomma\addspace}}%
  \iffieldundef{maintitle}
  {}
  {\iffieldundef{volume}
    {\printtext{%
        \printfield{maintitle}%
      \setunit{\addcolon\addspace}%
      \printfield[maintitle]{mainsubtitle}}%
    \newcunit
    \printfield{maintitleaddon}}
  {\printfield{volume}%
    \printfield{part}%
    \setunit{\addspace}
    \bibstring{ofseries}%
    \setunit{\addspace}
    \printtext{%
      \printfield{maintitle}%
      \setunit{\addcolon\addspace}%
      \printfield[maintitle]{mainsubtitle}}%
    \newcunit
    \printfield{maintitleaddon}}}}


\addbibresource{\jobname.bib}

% this puts the booktitleaddon field in 'italics' only for @inproceedings entry types
\DeclareFieldFormat[inproceedings]{booktitleaddon}{\emph{#1}}
% this replaces a portion of the default inproceedings bibdriver with the macrs we defined above.
\xpatchbibmacro{inproceedings}{mtitle+mstitle+vol+part+btitle+bstitle}{INP-mtitle+mstitle+vol+part+btitle+bstitle}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

... 그리고 제가 이 글을 쓰는 동안 Moewe가 다른 솔루션을 게시한 것을 보았습니다. 그 중 일부를 여기에서 결합할 수 있으므로 턱받이 항목을 다시 작성할 필요가 없습니다. 그러나 필드 booktitleaddon에 입력해야 하는 서지 정보보다 책에 부제목이 있을 가능성이 훨씬 더 높기 때문에 매핑을 기본적으로 사용하는 것이 더 나은 필드라고 생각합니다 titleaddon.

답변3

짧은 제목(귀하의 분야)의 위치 series는 의 위치라고 생각하므로 booksubtitle우리가 할 수 있는 일은 다음과 같습니다.

series필드를 으로 변경하면 됩니다 . 물론 이것은 실제로 적절한 항목이 없고 비어 있어야 하는 항목이 없는 경우에만 작동합니다.@inproccedingsbooksubtitleseriesbooksubtitle

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{inproceedings}
        \step[fieldsource=series, fieldtarget=booksubtitle]
    }
    \map{
      \pertype{proceedings}
        \step[fieldsource=series, fieldtarget=subtitle]
    }
  }
}

MWE

\documentclass{article}
\usepackage[
    authordate,
    backend=biber,
    ]{biblatex-chicago} % biblatex setup
\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@inproceedings{paper2012,
    author = {Smith, John},
date = {2012},
    title = {Paper Title},
    booktitle = {Proceedings of the 2012 ACM annual conference on Human Factors in Computing Systems},
    series = {CHI '12},
    pages = {937-946},
    location = {New York, NY, USA},    
    publisher = {{ACM}},    
}
\end{filecontents*}

\addbibresource{\jobname.bib}
\nocite{*}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{inproceedings}
        \step[fieldsource=series, fieldtarget=booksubtitle]
    }
    \map{
      \pertype{proceedings}
        \step[fieldsource=series, fieldtarget=subtitle]
    }
  }
}

\begin{document}
  \printbibliography
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보