論文テンプレートの参照スタイルを変更する

論文テンプレートの参照スタイルを変更する

私は参照スタイルを変更しようとしていますケンブリッジ工学論文テンプレート上司の要請により、参考文献を AIP 風のスタイルで表示します。テンプレートのデフォルトの参考文献オプションは次のとおりです。

\RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=nty, natbib=True]{biblatex}
\addbibresource{References/references}

\begin{document}
...
\bibliographystyle{unsrt}
\bibliography
 
...
\end{document}

現在、この方法では記事のタイトルは表示されますが、ジャーナル名は表示されません(AIP スタイルとのその他の違い)。

style=numeric-compに変更してみましたstyle=physが、参考文献には影響しません。

上記を次のように変更してみました:

\usepackage[backend=biber,style=phys]{biblatex}
\addbibresource{References/references.bib}

\begin{document}
...
\printbibliography
...
\end{document}

しかし、最初のコンパイル実行では、参考文献なしで文書がコンパイルされ、テキスト内の引用はすべて、数値参照や??、そして 2 回目のコンパイル実行では PDF の生成に失敗します (私は Overleaf を使用していますが、Texmaker を使用して biber と pdflatex のコンパイルを個別に実行しようとしたときにも同様に失敗しました)。参考文献キーが 'name2009a' 形式である場合に失敗するようです (たとえば、'li2019' では問題ありませんが、'li2009' と 'li2009a' の両方が含まれている場合は失敗します)。ただし、これは偶然かもしれません。

physオプションを使用するか、参考文献によって表示されるフィールドを変更するようにこれを変更する方法はありますか?

以下も .cls ファイルに含まれており、custombibクラス オプションで使用しています。

% ******************************* Bibliography *********************************
\newif\ifsetBib\setBibfalse                   % Custom Bibliography = true/false
\newif\ifsetBiBLaTeX\setBiBLaTeXfalse         % BiBLaTeX = True / False

\newif\ifPHD@biblatex\PHD@biblatexfalse       % BiBLaTeX
\DeclareOption{biblatex}{
  \ifsetBib
    \ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
      bibliography style aleady specified. Please check the document class
      options in case you have defined two bibliography styles.}
  \else
    \PHD@biblatextrue
  \fi
}

\newif\ifPHD@authoryear\PHD@authoryearfalse   % Author-Year citation
\DeclareOption{authoryear}{
  \ifsetBib
    \ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
      bibliography style aleady specified. Please check the document class
      options in case you have defined two bibliography styles.}
  \else
    \PHD@authoryeartrue
    \setBibtrue
  \fi
}

\newif\ifPHD@numbered\PHD@numberedfalse       % Numbered citiation
\DeclareOption{numbered}{
  \ifsetBib
    \ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
      bibliography style aleady specified. Please check the document class
      options in case you have defined two bibliography styles.}
  \else
    \PHD@numberedtrue
    \setBibtrue
  \fi
}

\newif\ifuseCustomBib\useCustomBibfalse     % Custom Bibliography
\DeclareOption{custombib}{
  \ifsetBib
    \ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
      bibliography style aleady specified. Please check the document class
      options in case you have defined two bibliography styles.}
  \else
    \ifPHD@biblatex
        \ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
          bibliography style aleady specified. Please check the document class
          options in case you have defined two bibliography styles.}
    \else
      \useCustomBibtrue
      \setBibtrue
    \fi
  \fi
}

答え1

ついにコンパイルの問題の根本原因が見つかりました。将来他の誰かが同様のものを検索する場合に備えて、ここに追加します。

CUED(ケンブリッジ大学工学部)の論文テンプレート.clsファイルには、参考文献と参考文献を扱う2つのセクションがあります。テンプレートのデフォルトをすべて削除して独自の設定に置き換える必要がある場合は、必ず削除/コメントアウトしてください。両方.cls ファイルからのサブセクション!

デフォルトの参照を AIP/physスタイル参照に置き換えるには:

  1. 削除されました両方.cls ファイルからの参考文献/参考文献に関連するサブセクション

  2. プリアンブルファイルから参照のすべての設定を削除し、\usepackage[backend=biber,style=phys]{biblatex} \addbibresource{References/references.bib}

  3. 次のクラス設定のみ保持されます: \documentclass[a4paper,12pt,times]{PhDThesisPSnPDF}

他の参照 (特に URL を含む参照) が失敗する原因となった問題は、@online私が設定したカスタム コマンドに関係していました。私は数式の外で下付き文字を非常に頻繁に使用するため、早い段階で次のショートカットを設定しました。

\let\sb\textsubscript

\sb参考文献/ URLのフォーマット/を印刷する役割を果たすコマンドがあることが判明しました。何か参考文献に@online記載されています。

削除するためにすべてのサブドキュメントで検索と置換を何度も実行した後\sb、ようやくすべてがスムーズに動作するようになりました。再構築と問題の骨の折れる検索に数週間かかり、これは私のカスタム ショートカットに特有のものであることはわかっていますが、これで誰かの時間を節約できればと思います。

(ちなみに、デフォルトのテンプレート設定からphysスタイルに変更した理由は、上司の指定でした)

関連情報