Bibtex에서 "Title Case" 구현

Bibtex에서 "Title Case" 구현

bibtex에서 "제목 케이스"는 어떻게 정의됩니까? 단어 목록은 무엇입니까~ 아니다대문자로 표시하고 어떤 파일에 정의되어 있습니까? 변경이 가능한가요? 파일 을 확인했지만 정의를 찾을 수 없는 .bst함수에 위임된 것 같습니다 .change.case

답변1

내가 아는 한, biblatex"제목 케이스로 변환" 매크로/함수를 구현하는 BibTeX(또는 ) 스타일은 없습니다.이것을 달성하는 방법에 대한 질문이 있습니다.biblatex, 답변은 Biber에서 이러한 매크로를 시작하는 방법을 보여줍니다 biblatex.

그러나 제목을 문장 케이스(첫 번째 단어의 첫 글자는 대문자, 나머지는 소문자)로 변환하는 기능이 있습니다. 이 기능의 사용 여부는 스타일에 따라 다릅니다. 귀하의 스타일이 문장 대소문자 구분을 적용한다면 아마도 .bst파일 에서 이와 같은 줄을 찾을 수 있을 것입니다 title "t" change.case$.

따라서 규칙은 파일의 제목 케이스에 제목을 제공 .bib하고 원하는 경우 참고문헌 스타일을 문장 케이스로 변환하도록 하는 것입니다(참조.참고문헌 데이터베이스에 제목을 저장할 때 사용할 적절한 대소문자는 무엇입니까?).

일반적으로 .bib파일의 제목은 항상 제목 대소문자로 표시되어야 합니다.항상 대문자로 표기해야 함특정 방식(이름, 약어, 공식 등)은 중괄호로 묶입니다 {}.

title = {From {Brouwer} to {Hilbert}: {The} Debate on the Foundations of Mathematics in the 1920s}
title = {{NASA} Ends Unmanned Launchings in {Florida}}

또한보십시오BibTeX는 .bbl 파일을 생성할 때 대문자를 잃습니다., 특히알렉시스의 대답.

답변2

내장 기능 은 change.case$소스( texk/bibtex-x/bibtex-4.cTeX Live)에 설명되어 있습니다.

* The |built_in| function change.case$ pops the top two (string)
* literals; it changes the case of the second according to the
* specifications of the first, as follows.  (Note: The word `letters' in
* the next sentence refers only to those at brace-level~0, the top-most
* brace level; no other characters are changed, except perhaps for
* special characters, described shortly.)  If the first literal is the
* string t, it converts to lower case all letters except the very
* first character in the string, which it leaves alone, and except the
* first character following any |colon| and then nonnull |white_space|,
* which it also leaves alone; if it's the string l, it converts all
* letters to lower case; if it's the string u, it converts all
* letters to upper case; and if it's anything else, it complains and
* does no conversion.  It then pushes this resulting string.  If either
* type is incorrect, it complains and pushes the null string; however,
* if both types are correct but the specification string (i.e., the
* first string) isn't one of the legal ones, it merely pushes the second
* back onto the stack, after complaining.  (Another note: It ignores
* case differences in the specification string; for example, the strings
* t and T are equivalent for the purposes of this |built_in|
* function.)

그게 복잡해서 대부분 이해하지 못했는데, 실제로 기억해야 할 점은 ".", "!" 같은 구두점 문자 뒤에도 있다는 점이라고 생각합니다. 또는 "?"인 경우 ":"(콜론) 뒤를 제외하고 문자는 기본적으로 소문자로 변환됩니다. 물론,

title = {Test! Test? Test: Test. Test, Test}

.bib 파일의 결과는 다음과 같습니다.

\newblock Test! test? test: Test. test, test.

이 유일한 예외는 다소 이상하고 예상치 못한 일입니다.

답변3

사용자 정의 .bst 파일을 생성하려는 경우 다음과 같은 방법으로 이 작업을 수행할 수 있습니다. 문서에는 다음 줄이 필요합니다.

\usepackage{titlecaps}
\Addlcwords{the of into}

여기서는 매크로 가 있는 패키지를 \usepackage사용합니다 . 매크로 는 소문자로 유지되고 대문자로 표시되지 않아야 하는 단어 목록을 제공합니다.titlecaps\titlecap\Addlcwords

파일 에 .bst새 매크로를 추가해야 합니다.

FUNCTION {titlecap}
{ duplicate$ empty$
    { pop$ "" }
    { "\titlecap{" swap$ * "}" * }
  if$
}

남은 유일한 일은 서식을 지정하는 다양한 문서 스타일에 사용하는 것입니다. 예를 들어, 귀하의 스타일에 다음과 같은 내용이 포함된 줄이 있을 수 있습니다.

title ". " * output

제목을 인쇄하고 마침표를 연결하여 결과를 출력합니다. 이제 다음과 같이 편집할 수 있습니다.

title titlecap ". " * output

마침표를 연결하고 결과를 출력하기 전에 먼저 titlecap매크로를 에 적용합니다 . title~의 호출\titlecap . 매크로에서 제외 목록에 있는 단어를 제외한 각 단어의 첫 글자가 대문자로 표시됩니다. 패키지 설명서를 참조하세요.http://ctan.org/pkg/titlecaps.

관련 정보