biblatex와 함께 다른 항목의 날짜 필드 사용

biblatex와 함께 다른 항목의 날짜 필드 사용

date파일 의 항목 필드를 bib다른 항목에 사용하려고 합니다 . 아이디어는 항목의 날짜를 지정하기 위해 다른 소스를 사용하고 있으며(날짜 자체는 날짜가 표시되지 않음) 데이터 중복을 피하고 싶다는 것입니다.

bibBiblatex는 명령을 사용하여 파일 의 다른 항목에 있는 필드를 사용하는 간단한 방법을 제공합니다 \entrydata{entry_key}{\thefield{field}}.

예를 들어 필드( ) 에서 사용하는 경우 명령을 title사용하는 \printdate것도 작동 하지만 필드 에서 사용하는 것은 작동하지 않습니다.title\entrydata{entry_key}{\prindate}\entrydata{entry_key}{\thefield{date}}date

단순한 문자열이 아닌 필드의 특성과 관련이 있다고 추측 date하지만, biblatex 매뉴얼에서 생각할 수 있는 모든 명령을 경험적으로 시도한 후에는 아무것도 작동하지 않습니다.

또한 date사용하려는 필드는 다음과 같은 YYYY-MM-DD형식으로 제공됩니다. 정렬을 위해 전체 날짜는 유지하고 연도만 인쇄하고 싶습니다.

어떤 도움이라도 주시면 감사하겠습니다.

MWE:

\documentclass{article}
\usepackage{biblatex} 
\usepackage{filecontents}
\begin{filecontents}{sources.bib}

@article{testart1,
    title           = {First Article Title},
    journaltitle    = {Something Times},
    date            = {1964-02-01},
    }

@article{testart2,
    title           = {\entrydata{testart1}{\thefield{title}}},% using the title of testart1 entry, working
    journaltitle    = {Another Times},
    date            = {1975-05-10},
    }

@video{testvid,
    title           = {A Film Title},
    editor          = {Doe, John},
    date            = {},% should use date field from testart1 entry, not working with \thefield{date}
    }

\end{filecontents}

\addbibresource{sources.bib}

\begin{document} 

Lorem.

\nocite{*}
\printbibliography 

\end{document}

답변1

간단한 해결책을 찾았습니다.

다른 bib 항목의 필드를 사용하려면 다른 항목(소스 항목)의 키가 포함된 대상 항목에 필드를 date추가하기만 하면 됩니다 .crossref

를 사용하면 crossref부작용이 있습니다. 해당 필드가 아직 정의되지 않은 경우 소스 항목의 불필요한 필드로 대상 항목을 채웁니다(소스 및 대상 항목의 유형이 다른 경우 일반적으로 발생함). 이는 를 사용하면 쉽게 예방할 수 있습니다 \DeclareDataInheritance. 예를 들어:

\DeclareDataInheritance{article}{music}{% source entry type / destination entry type
    \inherit{date}{date}% field we want to use
    \noinherit{entrysubtype}% fields we don't want to use
    \noinherit{author}
    \noinherit{title}
    \noinherit{subtitle}
    \noinherit{journaltitle}
    \noinherit{pages}
}

관련 정보