BibLaTeX에서 제목과 부제를 콜론으로 구분하는 방법은 있지만 제목이 물음표로 끝날 때가 아닙니까?

Dec 09 2020

BibLaTeX를 사용하면 일부 인용 스타일 에서처럼 제목과 부제를 콜론으로 구분하고 싶습니다. 그러나 제목이 따옴표로 끝나는 지 감지하고 따옴표로 끝나는 경우 subtitlepunct.

§4.7.3의 문서는 다음과 같이 말합니다.

\addcolon 쉼표, 세미콜론, 다른 콜론 또는 마침표가 앞에 나오지 않는 한 콜론을 추가합니다.

그 목록에 "따옴표"를 추가 할 수 있습니까? 즉, 피하는 해결책이 \isdot있습니까?


\documentclass{article}

\begin{filecontents}{test.bib}
    @book{testbook,
      author = {A. U. Thor},
      year = {2020},
      title = {An example title?},
      subtitle = {An example subtitle}
    }
\end{filecontents}

\usepackage{biblatex}
\addbibresource{test.bib}
\renewcommand*{\subtitlepunct}{\addcolon\space}

\begin{document}
    \nocite{testbook}
    \printbibliography
\end{document}

답변

5 moewe Dec 09 2020 at 22:38

당신은 전에 허용되는 문장 부호를 선언 할 수 있습니다 \addcolon\DeclarePunctuationPairs. 기본 설정

\DeclarePunctuationPairs{colon}{*!?}

콜론 앞에 약어 점, 느낌표 및 물음표를 사용할 수 있습니다. 다른 모든 구두점 뒤에는 콜론이 표시되지 않습니다.

당신은 아마 원합니다

\documentclass{article}

\usepackage{biblatex}

\renewcommand*{\subtitlepunct}{\addcolon\space}

\DeclarePunctuationPairs{colon}{*}

\begin{filecontents}{\jobname.bib}
@book{testbook,
  author   = {A. U. Thor},
  year     = {2020},
  title    = {An example title?},
  subtitle = {An example subtitle}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  \nocite{testbook}
  \printbibliography
\end{document}

참고\DeclarePunctuationPairs 때문에 보통 일반적으로 언어 별과 라이브에 필요 \DefineBibliographyExtras. 이는 MWE ( babel또는 로드하지 않음 polyglossia)에서는 필요하지 않지만 실제 응용 프로그램과 매우 관련이있을 수 있습니다. 자세한 내용은 Biblatex 구두점 인식 을 참조하세요.