我读过与书目主题相关的帖子,但它们真的帮不了我。我希望有人能真正帮助我解决这些问题,因为我必须在下周一交作业……
我还在 MWE 中写下了我所有的问题,所以如果你愿意的话,你可以直接阅读我的脚本以节省一些时间!
为了保留参考引用工作,我保留了 footpartcite、partcite 和 footnote 的脚本。
如何按字母顺序列出参考书目?现在我找到了在脚注中显示引文的正确方法,但每个引文都有 2 个数字,结果如下
1[1], 2[2], 3[3], 4[4]
我希望它显示为
[1],[2],[3],[4]
如何删除 [1] 之前的数字 1?
我使用了\footnoteref
而不是\ref
,因为\ref
它不会在文本中显示为上标,如果您知道如何将其设置为文本的上标,那就更好了,因为它可以直接写在标题里面!
单个问题的解决方案也非常感谢!非常感谢!
\documentclass[a4paper, 12pt, headsepline, DIV=12,twoside]{report}
\usepackage[english]{babel}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{parskip}
\usepackage{filecontents}
\usepackage[backend=bibtex,style=numeric,sorting=none,natbib=true]{biblatex}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{csquotes}
\begin{filecontents}{\jobname.bib}
@Electronic{unintentional,
Title = {Accidents or Unintentional Injuries},
Author = {{National Center for Health Statistics}},
URL = {http://www.cdc.gov/nchs/fastats/accidental- injury.htm},
urldate = {2016-08-10},}
@Book{HP,
Title = {Harry Potter and the Philosopher's Stone},
Author = {{Rowling,J. K. }},
Date = {1997}}
@Misc{ASH,
Title = {Automotive Safety Handbook},
Author = {{Seiffert, Ulrich; Wech, Lothar}},
Date = {2003},
Editor = {SAE International},
Note = {pp. 91, 96, 97}}
\end{filecontents}
\DeclareCiteCommand{\footpartcite}[\mkbibfootnote]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\mkbibbrackets{\usebibmacro{cite}}%
\setunit{\addnbspace}
\printnames{labelname}%
\setunit{\labelnamepunct}
\printfield[citetitle]{title}}%
{\addsemicolon\space}
{\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\footpartcites}[\mkbibfootnote]{\footpartcite} {\addsemicolon\space}
\DeclareCiteCommand{\partcite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\mkbibbrackets{\usebibmacro{cite}}%
\setunit{\addnbspace}
\printnames{labelname}%
\setunit{\labelnamepunct}
\printfield[citetitle]{title}%
\newunit
\printfield{year}}
{\addsemicolon\space}
{\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\partcites}{\partcite}{\addsemicolon\space}
\usepackage{remreset}
\makeatletter
\@removefromreset{footnote}{chapter}
\newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}
\@footnotemark}
\makeatother
\addbibresource{\jobname.bib}
\begin{document}
Q1: Each citation has two numbers. \footnoteref{ftn:unintentional} How to remove the number in front of the squared brackets. \footnoteref{ftn:unintentional}
Q2: know how to list the bibliography alphabetically. \footnote{\label{ftn:unintentional}\partcite{unintentional}}
Q3: how to put a footnoteref inside of a caption? because if I put it inside a caption of a table or figure, it will show error, but if I put it outside the caption bracket, \footpartcite{ASH} the footnoteref will show in the next line rather than as superscript of the caption. \footnote{\label{ftn:HP}\partcite{HP}}
\begin{figure}[h]
\includegraphics[width=\textwidth]{example-image-a}
\caption{I am a figure}\footnoteref{ftn:HP}
\end{figure}
Does anyone know how to solve them? Thank you very much!
\printbibliography
\end{document}
答案1
好吧,也许你误解了 1[2] 中的前导数字 1?第一个数字是脚注的编号,第二个数字(此处为 [2])是参考书目的标签...
对您问题的回答:
Q2:使用sorting=nyt
或类似方法获取已排序的参考书目。然后您将更好地看到脚注编号和书目标签之间的区别...
Q1:每个引用都有两个数字。第一个数字是脚注的编号,第二个 [x] 是该条目在参考书目中的标签。
Q3:如何将 footnoteref 放在标题内?只需使用它\caption[I am a figure]{I am a figure\footnoteref{ftn:HP}}
即可避免出现错误(部分[text]
用于图表列表,部分 {text} 打印在图表下方)。
完成 MWE:
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Electronic{unintentional,
Title = {Accidents or Unintentional Injuries},
Author = {{National Center for Health Statistics}},
URL = {http://www.cdc.gov/nchs/fastats/accidental-injury.htm},
urldate = {2016-08-10},
}
@Book{HP,
Title = {Harry Potter and the Philosopher's Stone},
Author = {{Rowling,J. K. }},
Date = {1997},
}
@Misc{ASH,
Title = {Automotive Safety Handbook},
Author = {{Seiffert, Ulrich; Wech, Lothar}},
Date = {2003},
Editor = {SAE International},
Note = {pp. 91, 96, 97},
}
\end{filecontents}
\documentclass[a4paper, 12pt, headsepline, DIV=12,twoside]{report}
\usepackage[english]{babel}
\usepackage{mathptmx}
\usepackage{textcomp}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{parskip}
\usepackage{csquotes}
\usepackage[%
backend=bibtex,
style=numeric,
sorting=nyt, % <======================================================
natbib=true
]{biblatex}
\addbibresource{\jobname.bib}
\usepackage[demo]{graphicx}
\DeclareCiteCommand{\footpartcite}[\mkbibfootnote]%
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\mkbibbrackets{\usebibmacro{cite}}%
\setunit{\addnbspace}
\printnames{labelname}%
\setunit{\labelnamepunct}
\printfield[citetitle]{title}}%
{\addsemicolon\space}
{\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\footpartcites}[\mkbibfootnote]{\footpartcite} {\addsemicolon\space}
\DeclareCiteCommand{\partcite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\mkbibbrackets{\usebibmacro{cite}}%
\setunit{\addnbspace}
\printnames{labelname}%
\setunit{\labelnamepunct}
\printfield[citetitle]{title}%
\newunit
\printfield{year}}
{\addsemicolon\space}
{\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\partcites}{\partcite}{\addsemicolon\space}
\usepackage{remreset}
\makeatletter
\@removefromreset{footnote}{chapter}
\newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}
\@footnotemark}
\makeatother
\begin{document}
Q1: Each citation has two numbers.\footnoteref{ftn:unintentional}
How to remove the number in front of the squared brackets.\footnoteref{ftn:unintentional}
Q2: know how to list the bibliography alphabetically.\footnote{\label{ftn:unintentional}\partcite{unintentional}}
Q3: how to put a footnoteref inside of a caption? because if I put it
inside a caption of a table or figure, it will show error, but if I put
it outside the caption bracket,\footpartcite{ASH} the footnoteref will
show in the next line rather than as superscript of the
caption.\footnote{\label{ftn:HP}\partcite{HP}}
\begin{figure}[h]
\includegraphics[width=\textwidth]{example-image-a}
\caption[I am a figure]{I am a figure\footnoteref{ftn:HP}}
\end{figure}
Does anyone know how to solve them? Thank you very much!
\printbibliography
\end{document}
结果如下: