날짜의 월을 무시하도록 IEEETran.bst 파일을 변경하는 방법은 무엇입니까?

날짜의 월을 무시하도록 IEEETran.bst 파일을 변경하는 방법은 무엇입니까?

저는 Lyx와 BibTex로 논문을 작성하여 참고문헌을 작성하고 있습니다. 내 .bib는 Mendeley에 의해 생성되었습니다. 그래서 제가 관리하려고 하는 것은 BibTeX의 월을 무시하도록 IEEEtran.bst 스타일 파일을 변경하는 방법을 찾는 것입니다.

현재 출력에는 출판 월과 연도가 포함됩니다.

..., 2017년 12월

하지만 각 항목의 월을 제거해야 합니다. 파일 은 .bibMendeley에서 생성되었으므로 변경해도 작동하지 않습니다. 또한 Mendeley가 이러한 정보를 자동으로 업데이트하므로 월을 수동으로 삭제하는 것도 작동하지 않습니다.

IEEETran 파일의 날짜에 대한 함수는 다음과 같습니다.

FUNCTION {format.date}
{
  month "month" bibinfo.check duplicate$ empty$
  year  "year" bibinfo.check duplicate$ empty$
    { swap$ 'skip$
        { this.to.prev.status
          this.status.std
          cap.status.std
         "there's a month but no year in " cite$ * warning$ }
      if$
      *
    }
    { this.to.prev.status
      this.status.std
      cap.status.std
      swap$ 'skip$
        {
          swap$
          " " * swap$
        }
      if$
      *
    }
  if$
}

문제는 그 달이 무시된다는 점에서 무엇을 바꿔야 할지 정말 모르겠다는 것입니다. 나는 부품을 삭제하는 가능한 많은 조합을 시도했습니다. 하지만 여전히 해결책을 찾을 수 없습니다. 누군가 나를 도와줄 수 있나요?

답변1

의 경우 @article다음 format.date과 같이 변경해야 합니다.

FUNCTION {format.date}
{
  "" duplicate$ empty$
  year  "year" bibinfo.check duplicate$ empty$
    { swap$ 'skip$
        { this.to.prev.status
          this.status.std
          cap.status.std
         "there's a month but no year in " cite$ * warning$ }
      if$
      *
    }
    { this.to.prev.status
      this.status.std
      cap.status.std
      swap$ 'skip$
        {
          swap$
          " " * swap$
        }
      if$
      *
    }
  if$
}

및 의 경우 @inproceedings수정 format.address.org.or.pub.date해야 합니다.

FUNCTION {format.address.org.or.pub.date}
{ 't :=
  ""
  year empty$
    { "empty year in " cite$ * warning$ }
    { skip$ }
  if$
  address empty$ t empty$ and
  year empty$ and month empty$ and
    { skip$ }
    { this.to.prev.status
      this.status.std
      cap.status.std
      address "address" bibinfo.check *
      t empty$
        { skip$ }
        { punct.period 'prev.status.punct :=
          space.large 'prev.status.space :=
          address empty$
            { skip$ }
            { ": " * }
          if$
          t *
        }
      if$
      year empty$ month empty$ and
        { skip$ }
        { t empty$ address empty$ and
            { skip$ }
            { ", " * }
          if$
          month empty$
            { year empty$
                { skip$ }
                { year "year" bibinfo.check * }
              if$
            }
            { year empty$
                 { skip$ }
                 { " " * year "year" bibinfo.check * }
              if$
            }
          if$
        }
      if$
    }
  if$
}

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

\documentclass[journal]{IEEEtran}
\usepackage{filecontents}
\begin{filecontents}{refs.bib}
@article{fuext1,
    year={2004},
    month={May},
    booktitle={$23^{rd}$ International Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT)},
    volume={3027},
    title={Fuzzy Extractors: How to Generate Strong Keys from Biometrics and Other Noisy Data},
    publisher={{LNCS}, Springer Berlin Heidelberg},
    author={Dodis, Yevgeniy and Reyzin, Leonid and Smith, Adam},
    address={Interlaken, Switzerland},
    pages={523-540},
}

@inproceedings{fuext2,
    year={2004},
    month={May},
    booktitle={$23^{rd}$ International Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT)},
    volume={3027},
    title={Fuzzy Extractors: How to Generate Strong Keys from Biometrics and Other Noisy Data},
    author={Dodiz, Yevgeniy and Reyzin, Leonid and Smith, Adam},
    address={Interlaken, Switzerland, {LNCS}, Springer Berlin Heidelberg},
    pages={523-540},
}
\end{filecontents}

\begin{document}
Article \cite{fuext1} and Proceedings \cite{fuext2}.
\bibliographystyle{IEEEtran}
\bibliography{refs}
\end{document}

답변2

BibTeX 구문은 다소 혼란스러울 수 있습니다. 가장 쉬운 해결책은 때때로 더 간단한 구문을 사용하여 보다 기본적인 참고문헌 스타일에서 함수를 복사하는 것입니다.

다음은 다음에서 수정되었습니다 abbrvnat.bst.

FUNCTION {format.date}
{ year  "year" bibinfo.check duplicate$ empty$
    { "empty year in " cite$ * warning$
       pop$ "" }
    'skip$
  if$
}

IEEEtran.bst항목 에 대해 별도의 날짜 형식 지정 기능을 사용하므로 이 inproceedings기능도 편집해야 합니다.

FUNCTION {format.address.org.or.pub.date}
{ 't :=
  ""
  year empty$
    { "empty year in " cite$ * warning$ }
    { skip$ }
  if$
  address empty$ t empty$ and
  year empty$ and month empty$ and
    { skip$ }
    { this.to.prev.status
      this.status.std
      cap.status.std
      address "address" bibinfo.check *
      t empty$
        { skip$ }
        { punct.period 'prev.status.punct :=
          space.large 'prev.status.space :=
          address empty$
            { skip$ }
            { ": " * }
          if$
          t *
        }
      if$
      year empty$ month empty$ and
        { skip$ }
        { t empty$ address empty$ and
            { skip$ }
            { ", " * }
          if$
          month empty$
            { year empty$
                { skip$ }
                { year "year" bibinfo.check * }
              if$
            }
            { year empty$ % removed printing the month string here
                 { skip$ }
                 { " " * year "year" bibinfo.check * }
              if$
            }
          if$
        }
      if$
    }
  if$
}

수정된 MWE를 사용하는 경우 IEEEtran.bst:

\documentclass{article}
\begin{filecontents}{\jobname.bib}
@article{articlemonth,
  author = {Mary Jones},
  title = {First Things},
  journal = {Journal of Things},
  month = {jan},
  year = {2017}
}

@inproceedings{proceedingsmonth,
  author = {Joe Peterson},
  title = {Briefly Explained},
  booktitle = {Conference of Briefness},
  month = {feb},
  year = {2017}
}
\end{filecontents}
\begin{document}
See \cite{articlemonth,proceedingsmonth}.

\bibliographystyle{IEEEtranmod}
\bibliography{\jobname}
\end{document}

결과:

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

관련 정보