biblatex의 모든 항목 유형을 구분합니다(예: 수학 대 박사학위).

biblatex의 모든 항목 유형을 구분합니다(예: 수학 대 박사학위).

나는 최근에 biblatex로 전환했는데, 지금까지는 훌륭하지만 bibtex만큼 쉽지는 않습니다. 지금까지 해결할 수 없는 문제가 발생했습니다.

내 참고문헌에는 reports, techreports, mastersthesisand phdthesis,외에 일부 articles및 가 포함되어 있습니다 books. biblatex 문서에 작성된 대로 처음 두 개는 로 매핑 @reports되고 세 번째와 네 번째는 로 매핑됩니다 @thesis. 그 이유는 불분명해 보이며 네 항목에 대해 서로 다른 형식 지정 옵션이 있으므로 이를 결합하는 것이 불가능합니다. 조합은 biblatex.def아래 에 정렬된 것 같습니다. 사용자 정의 참고문헌 스타일을 위한 \DeclareDriverSourceMap 자체 파일을 정의하면서 작업하면서 *.bbx네 항목 모두에 대해 서로 다른 모양도 정의했습니다.

\DeclareBibliographyDriver{report}{ ...
...
\DeclareBibliographyDriver{phdthesis}{...

그러나 여전히 biblatex는 내 항목을 참조 biblatex.def하고 무시합니다. 섹션 의 명령을 억제하거나 갱신하려면 어떻게 해야 합니까 \DeclareDriverSourceMap? 선호되는 옵션은 파일에 일부 코드를 추가하는 것입니다 *.bbx. 그렇지 않으면 가능하지 않은 경우 서문도 추가됩니다. 그러나 내 MWE에서는 전문에서 재선언이 불가능해 보입니다.


MWE는 다음과 같습니다.

\begin{filecontents*}{Beispielbibliographie.bib}
@PHDTHESIS{Mus15,
  Title                    = {Doktorarbeit ABC},
  Author                   = {Wax Mustermann},
  School                   = {XY Universität},
  Year                     = {2015},
  Note                     = {ISBN unbekannt},
}
@MASTERSTHESIS{Mus10,
  Title                    = {Bachelorarbeit DEF},
  Author                   = {Martina Musterfrau},
  School                   = {XY Universität},
  Year                     = {2010},
  Note                     = {Max Mustermann},
  Type                     = {unveröffentlichte Bachelorarbeit},
}
@ARTICLE{Gan11,
  Title                    = {GHI},
  Author                   = {T. Gantenbein},
  Journal                  = {Journal für Beispiele},
  Year                     = {2011},
  Number                   = {8},
  Pages                    = {1001-1010},
  Volume                   = {43},
}
\end{filecontents*}

\begin{filecontents}{Beispiel.bbx}
\ProvidesFile{Beispiel.bbx}

\RequireBibliographyStyle{standard}
\ExecuteBibliographyOptions{labelalpha,sorting=anyt}

\DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelalphawidth]{%
        \printfield{prefixnumber}%
    \printfield{labelalpha}%
        \printfield{extraalpha}}}
     {\setlength{\labelwidth}{\labelalphawidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{##1\hss}}
  {\endlist}
  {\item}

\defbibenvironment{shorthand}
  {\list
     {\printfield[shorthandwidth]{shorthand}}
     {\setlength{\labelwidth}{\shorthandwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}%
      \renewcommand*{\makelabel}[1]{##1\hss}}}
  {\endlist}
  {\item}

\renewcommand*{\labelnamepunct}{\addcolon\addspace}
\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1\isdot}

\DeclareBibliographyDriver{mastersthesis}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \printfield{school}%
  \newunit\newblock
  \printfield{type}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printfield{year}%
  \newunit\newblock
  {}%
}

\DeclareBibliographyDriver{phdthesis}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \printfield{school}%
  \newunit\newblock
  \printfield{year}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  {}%
}
\endinput
\end{filecontents}


\documentclass[12pt,halfparskip,BCOR0pt,DIV12]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{lipsum}

\DeclareDriverSourcemap[datatype=bibtex]{
  \map{
    \step[fieldset=day, null]
  }
}

\usepackage[backend=bibtex, bibstyle=Beispiel, citestyle=alphabetic, firstinits=true, isbn=false, doi=false, url=false, maxbibnames=99]{biblatex}
\bibliography{Beispielbibliographie.bib}


\begin{document}

\lipsum[1] \cite{Gan11,Mus10,Mus15}
\lipsum[2]

\printbibliography[title=Literaturverzeichnis]

\end{document}

답변1

s는 with로 @techreport매핑되고 while 과 둘 다 with 와로 각각 매핑되는 것을 볼 수 있습니다 . 따라서 항목 유형이 아닌 필드를 통해 유형을 구별하는 방법이 있습니다 .@reporttype = {techreport}@phdthesis@mastersthesis@thesistype = {phdthesis}type = {mastersthesis}type

나는 유형에 대한 출력이 충분히 유사하여 각각 하나의 드라이버를 갖는 것으로 충분할 것이라고 생각했을 것입니다( @mastersthesisMA @phdtehsis또는 박사 학위 논문?), 물론 이는 원하는 정확한 결과에 따라 다르지만 \iffieldequalstr{type}{techreport}{Ohh, a @techreport}{just a normal @report}.

예를 들어

\DeclareBibliographyDriver{report}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \printtext{\iffieldequalstr{type}{techreport}{Ohh, a @techreport}{just a normal @report}}
  \newunit\newblock
  \usebibmacro{finentry}}

리매핑을 절대적으로 억제해야 한다면 모든 유형의 하나의 소스 매핑 지시문만 허용할 수 biblatex.def있다는 사실을 활용할 수 있습니다 . biblatex그래서 추가하면

\DeclareDriverSourcemap[datatype=bibtex]{
  \map{
    \step[fieldset=day, null]
  }
}

문서의 서문에 대한 기본 매핑은 무시됩니다.

관련 정보