我的模板draft1.tex
如下:
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{comment}
\usepackage{tikz-feynman}
\usepackage{graphicx,epstopdf,epsfig,xcolor}
\usepackage{geometry}
\geometry{left=2 cm,right=2 cm,top=2 cm,bottom=2 cm}
\usepackage[backend=biber]{biblatex}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
}
\urlstyle{same}
\begin{document}
\section{Introduction}
\feynmandiagram [horizontal=a to b] {
i1 [particle=\(e^{-}\)] -- [fermion] a -- [fermion] i2 [particle=\(e^{+}\)],
a -- [photon, edge label=\(\gamma\), momentum'=\(k\)] b,
f1 [particle=\(\mu^{+}\)] -- [fermion] b -- [fermion] f2 [particle=\(\mu^{-}\)],
};
One of the alternative approach to solve hierarchy problem is \cite{ADD} model
which introduced by Arkani-Hamed, Dimopoulos and Dvali.
\begin{thebibliography}{9}
\bibitem{ADD}
N. Arkani-Hamed, S. Dimopoulos, and G. Dvali, Phys. Lett. B 429, 263 (1998);
preprint \href{https://arxiv.org/abs/hep-ph/9807344}{hep-ph/9807344}.
\end{thebibliography}
\end{document}
跑步后xelatex draft1.tex
Package tikz-feynman Warning: LuaTeX is required if you wish to have vertices a
utomatically placed. You can disable this warning by setting /tikzfeynman/warn
luatex=false on input line 21.
Package tikz-feynman Warning: Consider loading TikZ-Feynman with \usepackage[co
mpat=1.1.0]{tikz-feynman} so that you can be warned if TikZ-Feynman changes. on
input line 21.
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
No file draft1.bbl.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./draft1.out) (./draft1.out)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)
Package tikz-feynman Warning: The key you tried to use '/tikz/horizontal' requi
res LuaTeX. It will be ignored. on input line 23.
Package tikz-feynman Warning: The key you tried to use '/graph drawing/node dis
tance' requires LuaTeX. It will be ignored. on input line 23.
Package tikz-feynman Warning: The key you tried to use '/graph drawing/level di
stance' requires LuaTeX. It will be ignored. on input line 23.
Package tikz-feynman Warning: The key you tried to use '/graph drawing/sibling
distance' requires LuaTeX. It will be ignored. on input line 23.
Package tikz-feynman Warning: The key you tried to use '/tikz/graphs/spring lay
out' requires LuaTeX. It will be ignored. on input line 23.
Package tikz-feynman Warning: The key you tried to use '/tikz/horizontal' requi
res LuaTeX. It will be ignored. on input line 23.
LaTeX Warning: Citation 'ADD' on page 1 undefined on input line 31.
[1] (./draft1.aux)
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) draft1
(biblatex) and rerun LaTeX afterwards.
)
Output written on draft1.pdf (1 page).
Transcript written on draft1.log.
我该如何正确使用包tikz-feynman
和biblatex
?
答案1
您不能同时使用thebibliography
和。让您完全控制整个参考书目,但您必须手动输入所有内容。另一方面,如果您为其提供文件,它可以自动为您创建参考书目。 看看biblatex
thebibliography
biblatex
.bib
https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management以获得有关 TeX 所有可能的参考书目系统的更详细介绍。
如果你想使用biblatex
、删除thebibliography
、创建.bib
文件并打印参考书目\printbibliography
。另请参阅biblatex 简介(适合初学者). 您的文档可能如下所示
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=numeric, backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem~\cite{sigfridsson}
\printbibliography
\end{document}
其中biblatex-examples.bib
将包含一个条目,sigfridsson
如下所示
@article{sigfridsson,
author = {Sigfridsson, Emma and Ryde, Ulf},
title = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journaltitle = {Journal of Computational Chemistry},
date = 1998,
volume = 19,
number = 4,
pages = {377-395},
doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
如果你想使用手册书目thebibliography
,将呼叫转到biblatex
。在这种情况下,您的文档可能看起来像
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{url}
\ifundef\doi
{\DeclareUrlCommand\doi{}}
{}
\begin{document}
Lorem~\cite{sigfridsson}
\begin{thebibliography}{1}
\bibitem{sigfridsson} Emma Sigfridsson and Ulf Ryde.
\enquote{Comparison of methods for deriving atomic charges
from the electrostatic potential and moments}.
In: \emph{Journal of Computational Chemistry} 19.4 (1998),
pp. 377–395.
\textsc{doi}: \doi{710.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P}.
\end{thebibliography}
\end{document}
在改变参考书目设置后,最好删除所有临时辅助文件(,,,...),以确保辅助文件中现在未定义或重新定义的宏调用不会导致错误.aux
。.bbl
.bcf
如果有任何疑问,我应该提到这个问题与无关tikz-feynman
。tikz-feynman
并不关心您是否使用biblatex
BibTeX 或手动thebibliography
来生成您的参考书目。