Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with the biblatex "related entries" system? #24

Closed
russella opened this issue Jan 5, 2015 · 4 comments
Closed

Incompatibility with the biblatex "related entries" system? #24

russella opened this issue Jan 5, 2015 · 4 comments

Comments

@russella
Copy link
Contributor

russella commented Jan 5, 2015

Dear Marco,

Thanks again for all your work on the trad-* system. I've used it for several articles now.

I would like to to deploy trad-plain for all articles in the Journal "Theory of Computing," but I have run in to a snag. I would be really grateful for some advice. For Theory of Computing, I'll need to use the "related entries" system in order to refer to previous versions of an article. Consider the minimal example posted below.

  1. If you typeset it as written, it works fine, showing the related entries for both articles.
  2. If you comment out the \usepackage[*]{biblatex} line, and uncomment the following one, you will see that the system only shows the related entries for the /first/ entry.

What's going wrong?

Any help very, very appreciated!

Best, Alex

---------EXAMPLE CODE BELOW---------
\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}

%%%%% Try with each of the following lines uncommented!
\usepackage[backend=biber]{biblatex}
%\usepackage[backend=biber,bibstyle=trad-plain]{biblatex}
%%%%% End part to edit

\usepackage[colorlinks]{hyperref}

\renewcommand_{\relatedpunct}{\addcolon\space}
\renewcommand_{\relateddelim}{\addcomma\space}

\newbibmacro_{related:prelim}[1]{%
\renewcommand_{\newunitpunct}{\addcomma\space}%
\entrydata{#1}{\usebibmacro{doi+eprint+url}}}

\NewBibliographyString{prelim,prelims}
\DefineBibliographyStrings{american}{%
prelim = {Preliminary version},
prelims = {Preliminary versions}}

\begin{filecontents}{\jobname.bib}
@Article{v008a021,
author = {Roy Kasher and Julia Kempe},
title = {Two-Source Extractors Secure Against Quantum Adversaries},
year = {2012},
pages = {461-486},
doi = {10.4086/toc.2012.v008a021},
journal = {Theory of Computing},
volume = {8},
related = {kasher/arxiv,kasher/approx},
relatedtype = {prelim}}
@Article{v008a021alt,
author = {Roy Lasher and Julia Lempe},
title = {Two-Source Extractors Secure Against Quantum Adversaries},
year = {2012},
pages = {461-486},
doi = {10.4086/toc.2012.v008a021},
journal = {Theory of Computing},
volume = {8},
related = {lasher/arxiv,lasher/approx},
relatedtype = {prelim}}
@online{kasher/arxiv,
author = {Kasher, Roy and Kempe, Julia},
title = {Two-Source Extractors Secure Against Quantum Adversaries},
eprinttype = {arxiv},
eprintclass = {quant-ph},
eprint = {1005.0512},
month = may,
year = {2010}}
@inproceedings{kasher/approx,
author = {Kasher, Roy and Kempe, Julia},
title = {Two-source extractors secure against quantum adversaries},
booktitle = {Proceedings of the 13th international conference on Approximation,
and the 14th International conference on Randomization, and combinatorial
optimization: algorithms and techniques},
series = {APPROX/RANDOM'10},
year = {2010},
pages = {656--669},
url = {http://dl.acm.org/citation.cfm?id=1886521.1886572},
publisher = {Springer-Verlag},
location = {Berlin, Heidelberg}}
@online{lasher/arxiv,
author = {Lasher, Roy and Lempe, Julia},
title = {Two-Source Extractors Secure Against Quantum Adversaries},
eprinttype = {arxiv},
eprintclass = {quant-ph},
eprint = {1005.0512.LA},
month = may,
year = {2010}}
@inproceedings{lasher/approx,
author = {Lasher, Roy and Lempe, Julia},
title = {Two-source extractors secure against quantum adversaries},
booktitle = {Proceedings of the 13th international conference on Approximation,
and the 14th International conference on Randomization, and combinatorial
optimization: algorithms and techniques},
series = {APPROX/RANDOM'10},
year = {2010},
pages = {656--669},
url = {http://dl.acm.org/citation.cfm?id=LA1886521.1886572},
publisher = {Springer-Verlag},
location = {Berlin, Heidelberg}}
\end{filecontents}

\addbibresource{\jobname.bib}
\begin{document}
\cite{v008a021,v008a021alt}
\printbibliography
\end{document}

@moewew
Copy link
Owner

moewew commented Sep 9, 2015

It seems to me that a call to \usebibmacro{related:init}% is missing just before \usebibmacro{related}% in the drivers. It might not be a bad idea to also allow for the related feature to be toggled on and off as in standard.bbx:

  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%

@moewew
Copy link
Owner

moewew commented May 27, 2016

I have merged the pull request. If you could confirm that the issue is solved, we can close this issue.

@russella
Copy link
Contributor Author

Yes, this solves the issue!

@moewew
Copy link
Owner

moewew commented May 28, 2016

Brilliant!

@moewew moewew closed this as completed May 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants