3

I have read the posts related to bibliography topic, but they cant really help me. I hope someone can really help me for these questions, as I have to hand it in on next monday...

I have also written all my questions in my MWE, so if you want to, you can read my script directly to save sometime!

In order to keep reference citation work, I keep the script for footpartcite, partcite, and footnote.

How to list the bibliography alphabetically? Now I got the correct way of showing the citation in footnote, but each citation has 2 numbers, it comes out like

1[1], 2[2], 3[3], 4[4] 

I want it show as

[1],[2],[3],[4]

how to remove the number 1 before [1]?

I have used \footnoteref instead of \ref, because \ref doesnt appear as superscript in the text, if you know how to set it as a superscript of the text, then it will be even better, because it can be written inside a caption directly!

Solution for single question is also really appreciated! Thank you very much!

\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}
2
  • 1
    you can change the sorting option to nyt or something like this (look at the documentation for the defined default sorting schemes. And in the caption you can use the option argument \caption[I am a figure]{I am a figure\footnoteref...}. I don't understand why you define so special cite commands and don't have the time to look at it. – Ulrike Fischer Jan 6 '17 at 18:13
  • Thank you, i forgot to use this option, it´s so easy. Thank you @UlrikeFischer – Vivian Jan 7 '17 at 14:22
2

Well, perhaps you missunderstand the leading number 1 of 1[2]? The first number is the numbering of the footnote, the second number (here [2]) is the label for the bibliography ...

Answers to your questions:

Q2: use sorting=nyt or simular to get an sorted bibliography. Then you will see better the difference between footnote number and bib lable ...

Q1: Each citation has two numbers.The first number is the number of the footenote, the second [x] is the label in the bibliography for that entry.

Q3: how to put a footnoteref inside of a caption? Just use \caption[I am a figure]{I am a figure\footnoteref{ftn:HP}} to avoid the error you get (the part [text] is used in the list of figures, the part {text} is printed beneth the figure).

Complete 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}

with the result:

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.