Biblatex를 강조한 케이스 보호

Biblatex를 강조한 케이스 보호

질문에 이어 참고문헌 데이터베이스에 제목을 저장할 때 사용할 적절한 대소문자는 무엇입니까?biblatex-chicago저는 .bib 파일의 제목 케이스와 고유 명사 등의 {Protecting}에 제목을 저장하고 있습니다 . 시카고에서는 어쨌든 제목 케이스를 요구하기 때문에 어떤 문제도 발생하지 않는 곳에서 지금까지 사용하고 있었습니다 .

biblatex-apa하지만 지금은 APA가 문장 대소문자 구분을 선호하므로 인용 부호와 강조에 문제가 있습니다 . 내부 내용 \mkbibquote{}은 이미 대소문자를 보호 하므로 대소 문자를 보호하지 않는 \mkbibemph{}추가 중괄호 세트로 묶습니다 . {\mkbibquote{}}하지만 그러면 여러 가지 문제가 발생합니다.

다음 MWE를 고려하십시오.

% !TEX TS-program = xelatexmk
\documentclass{article} 

\usepackage{polyglossia}
\setdefaultlanguage[variant=american]{english}
\usepackage{csquotes}
\usepackage[style=apa]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{bib.bib}

@book{Author2000,
    Title = {This is a Title with Something in {\mkbibquote{Quotes that Should Be Downcased}}},
    Author = {Author, Anton},
    Date = {1990},
}
@book{Author2000a,
    Title = {{\mkbibquote{But if the Title starts in Quotes}} It Turns into All Caps},
    Author = {Author, Anton},
    Date = {2000},
}
@book{Author2000b,
    Title = {A Discussion of the Book {\mkbibemph{{My} New Book}}: It Should Keep the First Word Capitalized},
    Author = {Author, Anton},
    Date = {2010},
}
@book{Author2000c,
    Title = {{\mkbibemph{And if the Title starts with Emphasis}} It also Turns into All Caps and Doesn't Apply the Emphasis},
    Author = {Author, Anton},
    Date = {2001},
}
@book{Author2000d,
    Title = {And If {\mkbibquote{an Acronym {{{AAEE}}} is Included}}, How to Preserve it?},
    Author = {Author, Anton},
    Date = {2011},
}

\end{filecontents}
\addbibresource{bib.bib}

\begin{document}
\autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
\printbibliography % print the bibliography 
\end{document}

다음과 같은 출력이 제공됩니다.

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

수많은 문제가 있습니다. 문자열 시작 부분에 mkbibquote또는 가 발행 되면 전체 문자열이 모두 대문자로 변환됩니다. 또한 이미 or mkbibemph로 묶인 문자열 내에서 특정 단어를 보호하는 방법을 모르겠습니다 .mkbibquotemkbibemph

답변1

문장 케이싱 기능은 biblatexLaTeX에서 구현됩니다. 반면에 BibTeX의 문장 대소문자 구분은 BibTeX에서 직접 구현됩니다. 즉, 둘 사이에는 미묘하고 미묘하지 않은 차이가 있다는 의미입니다. 특히 biblatex의 문장 케이스 기능은 가능하면 매크로를 확장하려고 시도합니다.

여기서 중요한 문제는 중괄호에 의미가 너무 많다는 것입니다. LaTeX의 경우 중괄호는 인수 구분 기호로 사용되거나 그룹화를 적용합니다. BibTeX의 경우 대소문자 변경으로부터 문자열을 보호하고 다음과 같은 비ASCII 문자에 대한 LaTeX 매크로를 마크업합니다 ä -> {\"a}.참고문헌에서 "ä"와 기타 움라우트 및 악센트 문자를 어떻게 작성합니까?). 때때로 서로 다른 의미가 충돌하므로 문제를 해결하려면 해결 방법이 필요합니다.

최근 내용도 참조하세요https://github.com/plk/biblatex/issues/871링크된 문제와 문서 추가 사항https://github.com/plk/biblatex/commit/863fea969a9f1d37d7f944265cb276cf18293334그리고https://github.com/plk/biblatex/commit/a291e72a6c8ba2b896eb3f53ada6cc938c2cfa86.

MWE에 표시된 사용 사례의 경우 다음 해결 방법을 제공할 수 있습니다. 아이디어는 구분된 인수(일종의 \foo <argument>\endfoo구문)를 사용하여 중괄호를 사용하는 것입니다. 구분된 인수는 중첩될 때 자체적인 문제가 있지만 MWE에서는 충분히 잘 작동합니다.

\documentclass{article} 
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa]{biblatex}

\protected\def\horriblemkbibquote#1\endhorriblemkbibquote{\mkbibquote{#1}}
\let\endhorriblemkbibquote\relax
\protected\def\horriblemkbibemph#1\endhorriblemkbibemph{\mkbibemph{#1}}
\let\endhorriblemkbibemph\relax

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Author2000,
  title  = {This is a Title with Something in {\mkbibquote{Quotes that Should Be Downcased}}},
  author = {Author, Anton},
  date   = {1990},
}
@book{Author2000a,
  title = {\horriblemkbibquote {But} if the Title starts in Quotes\endhorriblemkbibquote{} It Turns into All Caps},
  author = {Author, Anton},
  date = {2000},
}
@book{Author2000b,
  title = {A Discussion of the Book \horriblemkbibemph{My} New Book\endhorriblemkbibemph{}: It Should Keep the First Word Capitalized},
  author = {Author, Anton},
  date = {2010},
}
@book{Author2000c,
  title = {\horriblemkbibemph {And} if the Title starts with Emphasis\endhorriblemkbibemph{} It also Turns into All Caps and Doesn't Apply the Emphasis},
  author = {Author, Anton},
  date = {2001},
}
@book{Author2000d,
  title = {And If \horriblemkbibquote an Acronym {AAEE} is Included\endhorriblemkbibquote{}, How to Preserve it?},
  author = {Author, Anton},
  date = {2011},
}

\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
\autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
\printbibliography % print the bibliography 
\end{document}

저자 A. (1990). 이것은 "낮춰야 하는 인용문"에 뭔가가 포함된 제목입니다.//저자, A. (2000). “그러나 제목이 따옴표로 시작하면” 모두 대문자로 바뀐다.//저자, A. (2001). 그리고 제목이 강조로 시작하면 모두 대문자로 바뀌고 강조가 적용되지 않습니다.//저자, A. (2010). 책에 대한 토론 내 새 책: 첫 번째 단어를 대문자로 유지해야 합니다.//저자, A. (2011). 그리고 "AAEE라는 약어가 포함되어 있다"면 어떻게 보존할까요?

장기적으로 바람직한 해결책은 보호된 문자열을 지정하기 위해 다른 마크업을 사용하는 새로운 대소문자 변경 기능을 구현하여 중괄호가 더 이상 충돌하지 않도록 하는 것 같습니다.

FWIW BibTeX의 대소문자 변경 기능에도 비슷한 문제가 있습니다. 문자열 시작 부분에 단어를 대문자로 표시하지 않으므로 모두 대문자 문제가 발생하지 않지만 다른 두 가지 보호 안 함 문제도 있습니다.

관련 정보