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

Feature request: different citation style in different refsections #592

Closed
djsutherland opened this issue Jun 13, 2017 · 2 comments
Closed

Comments

@djsutherland
Copy link

djsutherland commented Jun 13, 2017

I'd like to be able to use a different citation style in different refsections. (I don't think this is possible currently, but if there's a clever workaround I'd love to hear that too.)

MWE of how it might look:

\RequirePackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@article{a,
author = {Person, A.},
title = {On a subject},
journal = {International Journal on a Topic},
year = {1997}
}
\end{filecontents*}

\documentclass{article}
\usepackage[style=numeric]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
\begin{refsection}
\Textcite{a} should be numeric.

\printbibliography
\end{refsection}

\begin{refsection}
% some kind of way to change the style
If \textcite{a} could be alphabetic, that'd be super cool.

\printbibliography
\end{refsection}
\end{document}

Reasoning:

I fairly often end up writing papers that have a main body plus an appendix, where the appendix refers to a different set of references: usually not disjoint, but not a subset either. Usually I think the best way to handle this is to have the main body in one refsection, and the appendix in another, with separate bibliographies.

When using a numeric citation style, though, it's not necessarily obvious to the reader that [1] in the appendix is a different source than [1] in the main body. (And I'm often constrained, for conference style or for space reasons, to use a numeric style in the main body.) So if the appendix could use [Aut97] or Author (1997), I think it would be much more obvious to the reader that we've switched bibliographic contexts.

Current possibilities:

It looks like this tex.SE question gives a way to change the way the bibliography is printed (though not the citation style); one could maybe dig through the citation code to do a similar thing, though I haven't looked at that yet.

There's a similar thing here, where @plk commented that "It will never be possible to arbitrarily switch styles in a document - the styles determine too many possible things." So, maybe this feature request has already been turned down as too complicated....

@plk
Copy link
Owner

plk commented Jun 13, 2017

I am afraid that is impossible as a style sets up many things very early on and switching them would be very complicated in the biblatex code. This is unlikely to be implemented. However, there are some workarounds I believe - the best place to ask is on tex.stackexchange.com.

@plk plk closed this as completed Jun 13, 2017
@moewew moewew added the wontfix label Jun 14, 2017
@djsutherland
Copy link
Author

A note in case anyone finds this issue in the future: I was able to hack this specifically for numeric and alphabetic by making a custom joint style, here, and checking the value of a boolean flag for which output to use inside the relevant bibenvironment/bibmacros. Those two are fairly similar, so it was pretty easy to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants