4

I am preparing an article for a journal that currently does not have a LaTeX template, but all of my material is in LaTeX. It has a somewhat special reference citation guide I have not seen yet, so maybe my question has an easy answer and there is already a package available since I am not an expert on all styles, so I did not know what to search for. If that does not exist, I'd like to create one either in bibtex or biblatex.

The rule is that each \cite{} generates a new entry [x] in the text and in the References section. If a citation key was already referenced in the past, then it simply refers to the first citation with a comment. For the MWE below, this should result in the References list to be rendered as (with proper inline numbering of course, where [1, Lemelisk et. al, Chapter 3, p. 123] should be replaced with [2]):

References

[1] B. Lemelisk, W. Tarkin, D. Vader, and D. Sidious. Death Star. Alderaan and Yavin 4, 0 BBY.

[2] Lemelisk et al., Chapter 3, p. 123 [1]

[3] B. Lemelisk, W. Tarkin, D. Vader, and D. Sidious. Death Star II. Endor, 4 ABY.

MWE

\documentclass{article}

\usepackage{lipsum}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc
{
  death-star,
  author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
  title        = {{Death Star}},
  howpublished = {Alderaan and Yavin 4},
  year         = {0 BBY}
}
@misc
{
  death-star-2,
  author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
  title        = {{Death Star II}},
  howpublished = {Endor},
  year         = {4 ABY}
}
\end{filecontents}

\begin{document}

They first built \emph{Death Star}~\cite{death-star}.

\lipsum[1]

The design flaw was found in \cite[Lemelisk et al., Chapter 3, p. 123]{death-star}.

\lipsum[2]

To address the flaw, they designed \emph{Death Star 2}~\cite{death-star-2}
that featured many smaller diameter heat exhaust vents.

\bibliographystyle{abbrv}
\bibliography{\jobname}

\end{document}
Serguei
  • 325
  • Maybe think of the bibliography as a set of endnotes containing full references and then think of footnotes as converting to endnotes. Just this seems sufficiently similar to some footnote-referencing styles for it to potentially be useful to think about their approach. biblatex is generally a lot easier to adapt so, unless you can find a good match in terms of a .bst file, you might want to go in the biblatex direction, since that's an option. What's the journal? – cfr Dec 26 '14 at 03:26
  • The journal is Leonardo and they are expressly against footnotes though. However, they do treat them as endnotes indeed. What would be the styles you refer to? While I am more familiar with bibtex, biblatex is certainly an option if it's easier to do what I need in it. – Serguei Dec 26 '14 at 03:33
  • @cfr Hinted by your comment I came across this. Now I see better what you are saying is to somehow "merge" endnotes and bibliography, by treating the the latter as special type of endnotes... I'll see what I can come up with. – Serguei Dec 26 '14 at 04:02
  • This could indeed be done with biblatex's xref, a separate entry for the second citation \cite[Lemelisk et al., Chapter 3, p. 123]{death-star} and some modification (quite some modification actually, I think) to the cite macros. – moewe Dec 26 '14 at 11:59
  • Another possible way might be to use the notes2bib package (see here, for example). – moewe Dec 26 '14 at 12:02
  • @moewe I'll check out xref and notes2bib. The latter seems a bit more manual, but definitively a plausible workaround. Thanks. – Serguei Dec 26 '14 at 15:24
  • Yes, I would definitely prefer a solution using xref. A notes2bib solution is a bit more manual, but not much more than your example above, I would have thought. – moewe Dec 27 '14 at 05:51

2 Answers2

5

This is not a complete solution but I hope that it will give you the basis of one. To tweak the formatting (e.g., if you want just first initials or whatever), see the biblatex manual.

\documentclass{article}

\usepackage{lipsum}
\usepackage{filecontents}
\usepackage{endnotes}
\usepackage[citestyle=verbose-note, notetype=endonly, singletitle=false, backend=biber]{biblatex}    
% I haven't tested with BibTeX, so I don't want this code uncommented here. However, I gather from an edit that Serguei has determined it to work with the BibTeX backend. To use this, comment the previous line and uncomment the next. Note, however, that some features are not supported by the legacy backend.  
% \usepackage[citestyle=verbose-note, notetype=endonly, singletitle=false, backend=bibtex]{biblatex}

\bibliography{\jobname}
\begin{filecontents}{\jobname.bib}
    @misc
    {
        death-star,
        author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
        title        = {{Death Star}},
        howpublished = {Alderaan and Yavin 4},
        year         = {0 BBY}
    }
    @misc
    {
        death-star-2,
        author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
        title        = {{Death Star II}},
        howpublished = {Endor},
        year         = {4 ABY}
    }
\end{filecontents}

\def\enotesize{\normalsize}
\renewcommand{\notesname}{References}
\renewcommand{\makeenmark}{\mkbibbrackets{\theenmark}}

\makeatletter
\renewbibmacro*{footcite:note}{% adapted from verbose-note.cbx
    \ifnameundef{labelname}
    {\printfield{label}}{}%
    \setunit*{\addspace}%
    \printtext{%
        \mkbibbrackets{%
            \ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}%
        \iftoggle{cbx:pageref}
        {\ifsamepage{\the\value{instcount}}
            {\csuse{cbx@f@\thefield{entrykey}}}
            {}
            {\addcomma\space\bibstring{page}\addnbspace
                \pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
        {}}}
\makeatother

\begin{document}

    They first built \emph{Death Star}~\autocite{death-star}.

    \lipsum[1]

    The design flaw was found in \autocite[Lemelisk et al., Chapter 3, p. 123][]{death-star}.

    \lipsum[2]

    To address the flaw, they designed \emph{Death Star 2}~\autocite{death-star-2}
    that featured many smaller diameter heat exhaust vents.

    \renewcommand{\makeenmark}{\mkbibbrackets{\theenmark}\addspace}
    \theendnotes

\end{document}

tweaked references as endnotes

EDIT [by Serguei]

  • A GitHub style project for leonardo.cls was started and used in a couple of article submissions based on this answer. Further contributions are welcome.
cfr
  • 198,882
1

I think the crossref field of bibtex is what you are looking for. with crossref, the bibitem copies fields it's missing from the parent (which thus makes a very bad job with the misc here...), adds the fields added in the reference (the 'comment'), and reference it in the biblio.

With your example:

\documentclass{article}

\usepackage{lipsum}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
    @misc{death-star-a,
      author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
      title        = {{Death Star}},
      howpublished = {Alderaan and Yavin 4},
      year         = {0 BBY}
    }
    @misc{death-star-b,
      crossref     = {death-star-a},
      chapter      = {3},
      pages        = {123}
    }
    @misc{death-star-2,
      title        = {{Death Star II}},
      howpublished = {Endor},
      year         = {4 ABY}
    }
\end{filecontents}

\begin{document}

They first built \emph{Death Star}~\cite{death-star-a}.

\lipsum[1]

The design flaw was found in \cite{death-star-b}.

\lipsum[2]

To address the flaw, they designed \emph{Death Star 2}~\cite{death-star-2}
that featured many smaller diameter heat exhaust vents.

\bibliographystyle{abbrv}
\bibliography{\jobname}

\end{document}
luneart
  • 534
  • (1) this solution does not scale for many citations unfortunately additionally forcing the addition of rarely used bib-entries in the bib file, and (2) the issue with crossref is that it would only generate one entry in References and in the body not necessarily sequentially. For example, if I \cite[Foo]{death-star}, \cite[Bar]{death-star}, and \cite[Baz]{death-star} in the body after the last cite in MWE, I'd expect [4] Foo [1], [5] Bar [1], [6] Baz [1], crossref might mess up with this if I switch to something more actual than abbrv. Though the main problem is the scale here. – Serguei Dec 26 '14 at 15:31
  • (2) is solved with @PREAMBLE{"\newcommand{\noopsort}[1]{}"} as explained in Bibtex doc p4-5.

    (1) It is not very scalable indeed, but at least it's both correct and not that complex, particularly as the style require some comment, specifying the content 'location' within the whole reference (I'm guessing).

    – luneart Dec 26 '14 at 15:51