我试图将 \cite 放在图形标题中,但是在构建参考文献列表时,它会首先将所有 \cite 放在图形标题中,然后才开始将所有其他参考文献放在文档中。
我知道这个问题已被问过多次,并且我在网上找到了几个答案,但似乎没有一个能解决我的问题。
我试过了:
- 使用 \protect\cite
- 使用 notoccite 包
- 使用 \caption[text without cite command]{text with \cite}
这是我的最小程序:
\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english, italian]{babel}
\usepackage{lipsum}
\usepackage{url}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{hyperref}
\usepackage[bibstyle=numeric, backend=biber, hyperref]{biblatex}
\addbibresource{Bibliografia.bib}
\usepackage{sectsty}
\allsectionsfont{\centering}
\usepackage{graphicx}
\usepackage{notoccite}
\begin{document}
\author{Me}
\title{Title}
\maketitle
%...
\section{}
\lipsum[1]\cite{focardi}
\appendix
\section{Viscosità attesa teoricamente}
\label{app:appA}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{tabviscos.png}
\caption[Caption]{Viscosità di soluzioni acquose di glicerina ($cP$) \protect\cite{glic}}
\label{fig:tabvisc}
\end{figure}
\lipsum[1]
\printbibliography[heading=bibintoc]
\end{document}
我正在与 Overleaf 合作
答案1
添加sorting=none
选项biblatex
似乎可以解决您的问题:
\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english, italian]{babel}
\usepackage{lipsum}
\usepackage{url}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{hyperref}
\usepackage[bibstyle=numeric, backend=biber, hyperref,sorting=none]{biblatex}
\usepackage{sectsty}
\allsectionsfont{\centering}
\usepackage[draft]{graphicx}
\usepackage{notoccite}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{focardi,
author = {Citation, Text},
year = {2001},
title = {Title},
publisher = {Publisher},
}
@book{glic,
author = {Citation, Caption},
year = {2001},
title = {Title},
publisher = {Publisher},
}
\end{filecontents}
\begin{document}
\author{Me}
\title{Title}
\maketitle
%...
\section{}
\lipsum[1]\cite{focardi}
\appendix
\section{Viscosità attesa teoricamente}
\label{app:appA}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{tabviscos.png}
\caption[Caption]{Viscosità di soluzioni acquose di glicerina ($cP$) \cite{glic}}
\label{fig:tabvisc}
\end{figure}
\lipsum[1]
\printbibliography[heading=bibintoc]
\end{document}