What is best practice re. handling legal sources with Biblatex/Biber for disciplines other than law?How can I create entirely new data types with BibLaTeX/Biber?Add field “tome” to biblatex entriesBiblatex's bibmacros, bibliography drivers, formats - patch or redefine?Creating Entry in Bibtex for Executive OrdersBiblatex - xpatch bibmacro with unbalanced bracesHow to cite a UN treaty (BibTex entry)How do I get square brackets around year?How do I modify @misc entry to allow for no year-field?Redefine cite commands after first citation in biberFirst full title, then short title in autocite: biblatex-chicago authordate with entrysubtype=classicalBibliography in LaTeX with Biblatex and Biber as backendCiting (author, journalabbr., year) neededHow do I occasionally use standard style citation instead of shorthandCiting from an Encyclopedia with sub voce@MastersThesis entry results in “MA thesis” output instead of “Master's thesis” with biblatexBiblatex changes my citation keys. Can I reverse that?Tweaking the style of the elements of the bibliography (using biblatex/biber)Modifying in-text citation and bibliography with biblatex/biber (apa-style)

Was Spock the First Vulcan in Starfleet?

Trouble understanding the speech of overseas colleagues

How do I extract a value from a time formatted value in excel?

A Rare Riley Riddle

Is there a korbon needed for conversion?

Implement the Thanos sorting algorithm

Shortcut for value of this indefinite integral?

How does the UK government determine the size of a mandate?

What is the difference between "behavior" and "behaviour"?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races

Was a professor correct to chastise me for writing "Dear Prof. X" rather than "Dear Professor X"?

How does buying out courses with grant money work?

How to Reset Passwords on Multiple Websites Easily?

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

Hostile work environment after whistle-blowing on coworker and our boss. What do I do?

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

What is paid subscription needed for in Mortal Kombat 11?

Method to test if a number is a perfect power?

How did Arya survive the stabbing?

How to pronounce the slash sign

Valid Badminton Score?

How do we know the LHC results are robust?

Applicability of Single Responsibility Principle

Return the Closest Prime Number



What is best practice re. handling legal sources with Biblatex/Biber for disciplines other than law?


How can I create entirely new data types with BibLaTeX/Biber?Add field “tome” to biblatex entriesBiblatex's bibmacros, bibliography drivers, formats - patch or redefine?Creating Entry in Bibtex for Executive OrdersBiblatex - xpatch bibmacro with unbalanced bracesHow to cite a UN treaty (BibTex entry)How do I get square brackets around year?How do I modify @misc entry to allow for no year-field?Redefine cite commands after first citation in biberFirst full title, then short title in autocite: biblatex-chicago authordate with entrysubtype=classicalBibliography in LaTeX with Biblatex and Biber as backendCiting (author, journalabbr., year) neededHow do I occasionally use standard style citation instead of shorthandCiting from an Encyclopedia with sub voce@MastersThesis entry results in “MA thesis” output instead of “Master's thesis” with biblatexBiblatex changes my citation keys. Can I reverse that?Tweaking the style of the elements of the bibliography (using biblatex/biber)Modifying in-text citation and bibliography with biblatex/biber (apa-style)













5















This is partly a 'before I reinvent the wheel' question and partly a question about best practice.




  • Do any existing solutions handle legal sources appropriately in documents using Biblatex/Biber which require a non-legal default style such as author-year for most sources?



    • If so, what solutions are available and do any use OSCLA for specifically legal sources only?



  • If not, what approach to configuring Biblatex/Biber to do this would constitute best practice? I'm not asking for somebody to do this - the author-year style in my example actually differs somewhat from the one I'm using, so code addressing the problem here might not work well for me anyway. I'm more asking, what configuration tasks are required? Is there a parallel process somewhere I could apply to this case? Where should the configuration happen?



    • The closest question I found was Creating Entry in Bibtex for Executive Orders, but that question and answer is quite old and I'm not sure whether it is a useful model for current Biblatex/Biber. (For example, it doesn't use bib strings and predates the more recent deprecation of the BibTeX backend.)


OSCLA



MWEB:



beginfilecontentsjobname.bib
@jurisdictioncase,
title = Somebody v Somebody Else and Others (No 4),
note = [2016] AC 100,
pages = 100--178,
date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01


@legislationdeddf,
title = Deddf Ardderchog (Cymru) 2014,
year = 2014,
author = Cynulliad Cenedlaethol Cymru,
languageid = cy

@articlearticle,
title = Fantastic Findings and Where to Find Them,
author = Vark, Aar D.,
journal = Diligent Discoveries,
volume = 45,
number = 3,
pages = 23--32,
year = 2010

@bookbook,
title = Brilliant Baths,
author = Allard, M.,
publisher = Empire Books,
address = Alpha Centauri,
year = 1998

endfilecontents

documentclass[welsh,british,a4paper]article
usepackage[utf8]inputenc
usepackagegeometry
usepackagecfr-lm
usepackagebabel
usepackagecsquotes
usepackage[style=authoryear-comp,backend=biber]biblatex
bibliographyjobname

begindocument

Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
Textcitearticle and textcitebook are cited using the author-year system.

However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
Nonetheless, these need to be cited appropriately.
Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
Hence, the standard styles do not handle these cases well:
beginquote
Textcitededdf is a law autocitededdf.
Textcitecase is a case autocitecase.
endquote
I emphthink that these should be cited rather differently, although I'm not certain exactly how they should look.
I suspect something like the following is needed
beginquote
Deddf Ardderchog (Cymru) 2014 is a law (Deddf Ardderchog (Cymru) 2014).
emphSomebody v Somebody Else and Others (No 4) [2016] AC 100 is a case (emphSomebody v Somebody Else and Others (No 4) [2016] AC 100).
endquote
That is, specifically legal sources should follow the Oxford Standard for the Citation of Legal authorities (OSCOLA), except that inline rather than footnote citations are used.

Similar principles will also apply to the entries in the bibliography.

printbibliography

The entries for the book and the article are as desired.
The entries for the law and the case are not.

The year of legislation is part of the name of the act and shouldn't be separated from it.
The title should come first.
Probably I should not have an author but just a publisher or URL, but if I don't have an author, author-year citations go wrong.

I should not have `n.d.' in the entry for the case, but nor should I have the year in round brackets.
No full-stop should follow the year.
Not sure about the full-stops at the end of entries, but OSCLA doesn't use them, I don't think.

In some cases, citations and entries for cases are more complex, though I haven't yet got to grips with all the nuances.

What is the best way to configure Biblatex for legal sources, when using a non-legal style for all others?

enddocument









share|improve this question

















  • 1





    cfr, I cannot really say anything about best practices here, but I do have some "home brew recipes" for non typical sources. Normally, it involves proper structure for supporting it: a custom driver for bibliography, some hacking for citation commands in parallel with standard styles, and eventually some data model customization. (You probably know all this, and likely, the only plus there is the link which is how I do to handle the citation in "mixed style", without tampering its workings for regular entry types).

    – gusbrs
    Jun 24 '18 at 22:56











  • @gusbrs Thanks. I guess 'data model customisation' is going to be a challenge, as I'm not sure what that means (although I've seen it mentioned in looking for relevant Q&As).

    – cfr
    Jun 24 '18 at 23:04






  • 2





    I guess you will have to write dedicated drivers for @legislation and @jurisdiction. You may also have to define new fields if some bits of information don't fit into the default fields. Alan's answer to the executive order question is still overall valid, although new entry types and fields need to be registered using a custom data model to work properly now (see tex.stackexchange.com/q/175776/35864 and tex.stackexchange.com/q/163303/35864). ...

    – moewe
    Jun 25 '18 at 14:36






  • 2





    ... A few details could probably be done differently: You mention bibstrings yourself, I would avoid printtext and would try to use field formats instead. In principle I would favour a cite that automatically deals with @jurisdiction and @legislation over a dedicated lawcite command. But the implementation becomes more messy if you have to check for the entry type - and authoryear-comp is not for the faint-hearted already.

    – moewe
    Jun 25 '18 at 14:41






  • 1





    @cfr I didn't read the discussion. Bear in mind when refering to legislation that it is subject to more or less frequent changes and how to deal with that depends a great deal on the legal system of your country. In Germany even today it can take hours to find out for sure the wording of of a section in a certain year. Here you don't put the name of an act into your bibliography, for these reasons.

    – Keks Dose
    Jun 26 '18 at 16:58















5















This is partly a 'before I reinvent the wheel' question and partly a question about best practice.




  • Do any existing solutions handle legal sources appropriately in documents using Biblatex/Biber which require a non-legal default style such as author-year for most sources?



    • If so, what solutions are available and do any use OSCLA for specifically legal sources only?



  • If not, what approach to configuring Biblatex/Biber to do this would constitute best practice? I'm not asking for somebody to do this - the author-year style in my example actually differs somewhat from the one I'm using, so code addressing the problem here might not work well for me anyway. I'm more asking, what configuration tasks are required? Is there a parallel process somewhere I could apply to this case? Where should the configuration happen?



    • The closest question I found was Creating Entry in Bibtex for Executive Orders, but that question and answer is quite old and I'm not sure whether it is a useful model for current Biblatex/Biber. (For example, it doesn't use bib strings and predates the more recent deprecation of the BibTeX backend.)


OSCLA



MWEB:



beginfilecontentsjobname.bib
@jurisdictioncase,
title = Somebody v Somebody Else and Others (No 4),
note = [2016] AC 100,
pages = 100--178,
date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01


@legislationdeddf,
title = Deddf Ardderchog (Cymru) 2014,
year = 2014,
author = Cynulliad Cenedlaethol Cymru,
languageid = cy

@articlearticle,
title = Fantastic Findings and Where to Find Them,
author = Vark, Aar D.,
journal = Diligent Discoveries,
volume = 45,
number = 3,
pages = 23--32,
year = 2010

@bookbook,
title = Brilliant Baths,
author = Allard, M.,
publisher = Empire Books,
address = Alpha Centauri,
year = 1998

endfilecontents

documentclass[welsh,british,a4paper]article
usepackage[utf8]inputenc
usepackagegeometry
usepackagecfr-lm
usepackagebabel
usepackagecsquotes
usepackage[style=authoryear-comp,backend=biber]biblatex
bibliographyjobname

begindocument

Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
Textcitearticle and textcitebook are cited using the author-year system.

However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
Nonetheless, these need to be cited appropriately.
Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
Hence, the standard styles do not handle these cases well:
beginquote
Textcitededdf is a law autocitededdf.
Textcitecase is a case autocitecase.
endquote
I emphthink that these should be cited rather differently, although I'm not certain exactly how they should look.
I suspect something like the following is needed
beginquote
Deddf Ardderchog (Cymru) 2014 is a law (Deddf Ardderchog (Cymru) 2014).
emphSomebody v Somebody Else and Others (No 4) [2016] AC 100 is a case (emphSomebody v Somebody Else and Others (No 4) [2016] AC 100).
endquote
That is, specifically legal sources should follow the Oxford Standard for the Citation of Legal authorities (OSCOLA), except that inline rather than footnote citations are used.

Similar principles will also apply to the entries in the bibliography.

printbibliography

The entries for the book and the article are as desired.
The entries for the law and the case are not.

The year of legislation is part of the name of the act and shouldn't be separated from it.
The title should come first.
Probably I should not have an author but just a publisher or URL, but if I don't have an author, author-year citations go wrong.

I should not have `n.d.' in the entry for the case, but nor should I have the year in round brackets.
No full-stop should follow the year.
Not sure about the full-stops at the end of entries, but OSCLA doesn't use them, I don't think.

In some cases, citations and entries for cases are more complex, though I haven't yet got to grips with all the nuances.

What is the best way to configure Biblatex for legal sources, when using a non-legal style for all others?

enddocument









share|improve this question

















  • 1





    cfr, I cannot really say anything about best practices here, but I do have some "home brew recipes" for non typical sources. Normally, it involves proper structure for supporting it: a custom driver for bibliography, some hacking for citation commands in parallel with standard styles, and eventually some data model customization. (You probably know all this, and likely, the only plus there is the link which is how I do to handle the citation in "mixed style", without tampering its workings for regular entry types).

    – gusbrs
    Jun 24 '18 at 22:56











  • @gusbrs Thanks. I guess 'data model customisation' is going to be a challenge, as I'm not sure what that means (although I've seen it mentioned in looking for relevant Q&As).

    – cfr
    Jun 24 '18 at 23:04






  • 2





    I guess you will have to write dedicated drivers for @legislation and @jurisdiction. You may also have to define new fields if some bits of information don't fit into the default fields. Alan's answer to the executive order question is still overall valid, although new entry types and fields need to be registered using a custom data model to work properly now (see tex.stackexchange.com/q/175776/35864 and tex.stackexchange.com/q/163303/35864). ...

    – moewe
    Jun 25 '18 at 14:36






  • 2





    ... A few details could probably be done differently: You mention bibstrings yourself, I would avoid printtext and would try to use field formats instead. In principle I would favour a cite that automatically deals with @jurisdiction and @legislation over a dedicated lawcite command. But the implementation becomes more messy if you have to check for the entry type - and authoryear-comp is not for the faint-hearted already.

    – moewe
    Jun 25 '18 at 14:41






  • 1





    @cfr I didn't read the discussion. Bear in mind when refering to legislation that it is subject to more or less frequent changes and how to deal with that depends a great deal on the legal system of your country. In Germany even today it can take hours to find out for sure the wording of of a section in a certain year. Here you don't put the name of an act into your bibliography, for these reasons.

    – Keks Dose
    Jun 26 '18 at 16:58













5












5








5


1






This is partly a 'before I reinvent the wheel' question and partly a question about best practice.




  • Do any existing solutions handle legal sources appropriately in documents using Biblatex/Biber which require a non-legal default style such as author-year for most sources?



    • If so, what solutions are available and do any use OSCLA for specifically legal sources only?



  • If not, what approach to configuring Biblatex/Biber to do this would constitute best practice? I'm not asking for somebody to do this - the author-year style in my example actually differs somewhat from the one I'm using, so code addressing the problem here might not work well for me anyway. I'm more asking, what configuration tasks are required? Is there a parallel process somewhere I could apply to this case? Where should the configuration happen?



    • The closest question I found was Creating Entry in Bibtex for Executive Orders, but that question and answer is quite old and I'm not sure whether it is a useful model for current Biblatex/Biber. (For example, it doesn't use bib strings and predates the more recent deprecation of the BibTeX backend.)


OSCLA



MWEB:



beginfilecontentsjobname.bib
@jurisdictioncase,
title = Somebody v Somebody Else and Others (No 4),
note = [2016] AC 100,
pages = 100--178,
date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01


@legislationdeddf,
title = Deddf Ardderchog (Cymru) 2014,
year = 2014,
author = Cynulliad Cenedlaethol Cymru,
languageid = cy

@articlearticle,
title = Fantastic Findings and Where to Find Them,
author = Vark, Aar D.,
journal = Diligent Discoveries,
volume = 45,
number = 3,
pages = 23--32,
year = 2010

@bookbook,
title = Brilliant Baths,
author = Allard, M.,
publisher = Empire Books,
address = Alpha Centauri,
year = 1998

endfilecontents

documentclass[welsh,british,a4paper]article
usepackage[utf8]inputenc
usepackagegeometry
usepackagecfr-lm
usepackagebabel
usepackagecsquotes
usepackage[style=authoryear-comp,backend=biber]biblatex
bibliographyjobname

begindocument

Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
Textcitearticle and textcitebook are cited using the author-year system.

However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
Nonetheless, these need to be cited appropriately.
Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
Hence, the standard styles do not handle these cases well:
beginquote
Textcitededdf is a law autocitededdf.
Textcitecase is a case autocitecase.
endquote
I emphthink that these should be cited rather differently, although I'm not certain exactly how they should look.
I suspect something like the following is needed
beginquote
Deddf Ardderchog (Cymru) 2014 is a law (Deddf Ardderchog (Cymru) 2014).
emphSomebody v Somebody Else and Others (No 4) [2016] AC 100 is a case (emphSomebody v Somebody Else and Others (No 4) [2016] AC 100).
endquote
That is, specifically legal sources should follow the Oxford Standard for the Citation of Legal authorities (OSCOLA), except that inline rather than footnote citations are used.

Similar principles will also apply to the entries in the bibliography.

printbibliography

The entries for the book and the article are as desired.
The entries for the law and the case are not.

The year of legislation is part of the name of the act and shouldn't be separated from it.
The title should come first.
Probably I should not have an author but just a publisher or URL, but if I don't have an author, author-year citations go wrong.

I should not have `n.d.' in the entry for the case, but nor should I have the year in round brackets.
No full-stop should follow the year.
Not sure about the full-stops at the end of entries, but OSCLA doesn't use them, I don't think.

In some cases, citations and entries for cases are more complex, though I haven't yet got to grips with all the nuances.

What is the best way to configure Biblatex for legal sources, when using a non-legal style for all others?

enddocument









share|improve this question














This is partly a 'before I reinvent the wheel' question and partly a question about best practice.




  • Do any existing solutions handle legal sources appropriately in documents using Biblatex/Biber which require a non-legal default style such as author-year for most sources?



    • If so, what solutions are available and do any use OSCLA for specifically legal sources only?



  • If not, what approach to configuring Biblatex/Biber to do this would constitute best practice? I'm not asking for somebody to do this - the author-year style in my example actually differs somewhat from the one I'm using, so code addressing the problem here might not work well for me anyway. I'm more asking, what configuration tasks are required? Is there a parallel process somewhere I could apply to this case? Where should the configuration happen?



    • The closest question I found was Creating Entry in Bibtex for Executive Orders, but that question and answer is quite old and I'm not sure whether it is a useful model for current Biblatex/Biber. (For example, it doesn't use bib strings and predates the more recent deprecation of the BibTeX backend.)


OSCLA



MWEB:



beginfilecontentsjobname.bib
@jurisdictioncase,
title = Somebody v Somebody Else and Others (No 4),
note = [2016] AC 100,
pages = 100--178,
date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01


@legislationdeddf,
title = Deddf Ardderchog (Cymru) 2014,
year = 2014,
author = Cynulliad Cenedlaethol Cymru,
languageid = cy

@articlearticle,
title = Fantastic Findings and Where to Find Them,
author = Vark, Aar D.,
journal = Diligent Discoveries,
volume = 45,
number = 3,
pages = 23--32,
year = 2010

@bookbook,
title = Brilliant Baths,
author = Allard, M.,
publisher = Empire Books,
address = Alpha Centauri,
year = 1998

endfilecontents

documentclass[welsh,british,a4paper]article
usepackage[utf8]inputenc
usepackagegeometry
usepackagecfr-lm
usepackagebabel
usepackagecsquotes
usepackage[style=authoryear-comp,backend=biber]biblatex
bibliographyjobname

begindocument

Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
Textcitearticle and textcitebook are cited using the author-year system.

However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
Nonetheless, these need to be cited appropriately.
Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
Hence, the standard styles do not handle these cases well:
beginquote
Textcitededdf is a law autocitededdf.
Textcitecase is a case autocitecase.
endquote
I emphthink that these should be cited rather differently, although I'm not certain exactly how they should look.
I suspect something like the following is needed
beginquote
Deddf Ardderchog (Cymru) 2014 is a law (Deddf Ardderchog (Cymru) 2014).
emphSomebody v Somebody Else and Others (No 4) [2016] AC 100 is a case (emphSomebody v Somebody Else and Others (No 4) [2016] AC 100).
endquote
That is, specifically legal sources should follow the Oxford Standard for the Citation of Legal authorities (OSCOLA), except that inline rather than footnote citations are used.

Similar principles will also apply to the entries in the bibliography.

printbibliography

The entries for the book and the article are as desired.
The entries for the law and the case are not.

The year of legislation is part of the name of the act and shouldn't be separated from it.
The title should come first.
Probably I should not have an author but just a publisher or URL, but if I don't have an author, author-year citations go wrong.

I should not have `n.d.' in the entry for the case, but nor should I have the year in round brackets.
No full-stop should follow the year.
Not sure about the full-stops at the end of entries, but OSCLA doesn't use them, I don't think.

In some cases, citations and entries for cases are more complex, though I haven't yet got to grips with all the nuances.

What is the best way to configure Biblatex for legal sources, when using a non-legal style for all others?

enddocument






biblatex bibliographies citing biber






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 24 '18 at 22:40









cfrcfr

158k8191391




158k8191391







  • 1





    cfr, I cannot really say anything about best practices here, but I do have some "home brew recipes" for non typical sources. Normally, it involves proper structure for supporting it: a custom driver for bibliography, some hacking for citation commands in parallel with standard styles, and eventually some data model customization. (You probably know all this, and likely, the only plus there is the link which is how I do to handle the citation in "mixed style", without tampering its workings for regular entry types).

    – gusbrs
    Jun 24 '18 at 22:56











  • @gusbrs Thanks. I guess 'data model customisation' is going to be a challenge, as I'm not sure what that means (although I've seen it mentioned in looking for relevant Q&As).

    – cfr
    Jun 24 '18 at 23:04






  • 2





    I guess you will have to write dedicated drivers for @legislation and @jurisdiction. You may also have to define new fields if some bits of information don't fit into the default fields. Alan's answer to the executive order question is still overall valid, although new entry types and fields need to be registered using a custom data model to work properly now (see tex.stackexchange.com/q/175776/35864 and tex.stackexchange.com/q/163303/35864). ...

    – moewe
    Jun 25 '18 at 14:36






  • 2





    ... A few details could probably be done differently: You mention bibstrings yourself, I would avoid printtext and would try to use field formats instead. In principle I would favour a cite that automatically deals with @jurisdiction and @legislation over a dedicated lawcite command. But the implementation becomes more messy if you have to check for the entry type - and authoryear-comp is not for the faint-hearted already.

    – moewe
    Jun 25 '18 at 14:41






  • 1





    @cfr I didn't read the discussion. Bear in mind when refering to legislation that it is subject to more or less frequent changes and how to deal with that depends a great deal on the legal system of your country. In Germany even today it can take hours to find out for sure the wording of of a section in a certain year. Here you don't put the name of an act into your bibliography, for these reasons.

    – Keks Dose
    Jun 26 '18 at 16:58












  • 1





    cfr, I cannot really say anything about best practices here, but I do have some "home brew recipes" for non typical sources. Normally, it involves proper structure for supporting it: a custom driver for bibliography, some hacking for citation commands in parallel with standard styles, and eventually some data model customization. (You probably know all this, and likely, the only plus there is the link which is how I do to handle the citation in "mixed style", without tampering its workings for regular entry types).

    – gusbrs
    Jun 24 '18 at 22:56











  • @gusbrs Thanks. I guess 'data model customisation' is going to be a challenge, as I'm not sure what that means (although I've seen it mentioned in looking for relevant Q&As).

    – cfr
    Jun 24 '18 at 23:04






  • 2





    I guess you will have to write dedicated drivers for @legislation and @jurisdiction. You may also have to define new fields if some bits of information don't fit into the default fields. Alan's answer to the executive order question is still overall valid, although new entry types and fields need to be registered using a custom data model to work properly now (see tex.stackexchange.com/q/175776/35864 and tex.stackexchange.com/q/163303/35864). ...

    – moewe
    Jun 25 '18 at 14:36






  • 2





    ... A few details could probably be done differently: You mention bibstrings yourself, I would avoid printtext and would try to use field formats instead. In principle I would favour a cite that automatically deals with @jurisdiction and @legislation over a dedicated lawcite command. But the implementation becomes more messy if you have to check for the entry type - and authoryear-comp is not for the faint-hearted already.

    – moewe
    Jun 25 '18 at 14:41






  • 1





    @cfr I didn't read the discussion. Bear in mind when refering to legislation that it is subject to more or less frequent changes and how to deal with that depends a great deal on the legal system of your country. In Germany even today it can take hours to find out for sure the wording of of a section in a certain year. Here you don't put the name of an act into your bibliography, for these reasons.

    – Keks Dose
    Jun 26 '18 at 16:58







1




1





cfr, I cannot really say anything about best practices here, but I do have some "home brew recipes" for non typical sources. Normally, it involves proper structure for supporting it: a custom driver for bibliography, some hacking for citation commands in parallel with standard styles, and eventually some data model customization. (You probably know all this, and likely, the only plus there is the link which is how I do to handle the citation in "mixed style", without tampering its workings for regular entry types).

– gusbrs
Jun 24 '18 at 22:56





cfr, I cannot really say anything about best practices here, but I do have some "home brew recipes" for non typical sources. Normally, it involves proper structure for supporting it: a custom driver for bibliography, some hacking for citation commands in parallel with standard styles, and eventually some data model customization. (You probably know all this, and likely, the only plus there is the link which is how I do to handle the citation in "mixed style", without tampering its workings for regular entry types).

– gusbrs
Jun 24 '18 at 22:56













@gusbrs Thanks. I guess 'data model customisation' is going to be a challenge, as I'm not sure what that means (although I've seen it mentioned in looking for relevant Q&As).

– cfr
Jun 24 '18 at 23:04





@gusbrs Thanks. I guess 'data model customisation' is going to be a challenge, as I'm not sure what that means (although I've seen it mentioned in looking for relevant Q&As).

– cfr
Jun 24 '18 at 23:04




2




2





I guess you will have to write dedicated drivers for @legislation and @jurisdiction. You may also have to define new fields if some bits of information don't fit into the default fields. Alan's answer to the executive order question is still overall valid, although new entry types and fields need to be registered using a custom data model to work properly now (see tex.stackexchange.com/q/175776/35864 and tex.stackexchange.com/q/163303/35864). ...

– moewe
Jun 25 '18 at 14:36





I guess you will have to write dedicated drivers for @legislation and @jurisdiction. You may also have to define new fields if some bits of information don't fit into the default fields. Alan's answer to the executive order question is still overall valid, although new entry types and fields need to be registered using a custom data model to work properly now (see tex.stackexchange.com/q/175776/35864 and tex.stackexchange.com/q/163303/35864). ...

– moewe
Jun 25 '18 at 14:36




2




2





... A few details could probably be done differently: You mention bibstrings yourself, I would avoid printtext and would try to use field formats instead. In principle I would favour a cite that automatically deals with @jurisdiction and @legislation over a dedicated lawcite command. But the implementation becomes more messy if you have to check for the entry type - and authoryear-comp is not for the faint-hearted already.

– moewe
Jun 25 '18 at 14:41





... A few details could probably be done differently: You mention bibstrings yourself, I would avoid printtext and would try to use field formats instead. In principle I would favour a cite that automatically deals with @jurisdiction and @legislation over a dedicated lawcite command. But the implementation becomes more messy if you have to check for the entry type - and authoryear-comp is not for the faint-hearted already.

– moewe
Jun 25 '18 at 14:41




1




1





@cfr I didn't read the discussion. Bear in mind when refering to legislation that it is subject to more or less frequent changes and how to deal with that depends a great deal on the legal system of your country. In Germany even today it can take hours to find out for sure the wording of of a section in a certain year. Here you don't put the name of an act into your bibliography, for these reasons.

– Keks Dose
Jun 26 '18 at 16:58





@cfr I didn't read the discussion. Bear in mind when refering to legislation that it is subject to more or less frequent changes and how to deal with that depends a great deal on the legal system of your country. In Germany even today it can take hours to find out for sure the wording of of a section in a certain year. Here you don't put the name of an act into your bibliography, for these reasons.

– Keks Dose
Jun 26 '18 at 16:58










3 Answers
3






active

oldest

votes


















5















Keks Dose makes the good point in the comments that not only do the legal systems differ from country to country so do their citation practices.



The styles listed below come mainly from an English/American common law perspective.




Styles with support for legal citations



A handful of biblatex styles have some kind of support for legal citations with @jurisdiction and @legislation (I only listed styles that I consider to be of recent vintage, i.e. updated after the release of biblatex v3.3 in 2016)




  • biblatex-abnt aliases both to @article.


  • biblatex-bath has support for UK legislation and parliamentary reports (@legislation) as well as EU legislation and reports (as @legislation) and case reports (@jurisdiction). See §§4.8-4.10 of the documentation.


  • biblatex-chicago offers the types @jurisdiction, @legal and @legislation following CMS/Bluebook recommendations.


  • biblatex-oxref (by the author of biblatex-bath) also offers support for legal sources mimicking OSCOLA with a few minor differences. See §10 Legal references of the style documentations (here oxyear) For the author-year style oxyear the author notes




    Since legal references are usually cited using footnotes, how oxyear should behave is not well defined. As a result, I have not configured it to do anything fancy: the full reference will be formatted just the same as with oxnotes, and citations will typically be title–year using parentheses in the usual way.




  • biblatex-philosophy has experimental support for @jurisdiction.



  • oscola has support for much of the English-speaking world.

biblatex-bath, biblatex-oxref's oxyear style and biblatex-chicago's authordate will be of particular interest since those styles usually follow an autho-year scheme and are otherwise not focused on legal citations.



As far as I can see biblatex-bath and biblatex-oxref can get away with not modifying the citation commands significantly (a few delimiters are modified but the cite bibmacro itself not), biblatex-chicago has has dedicated macros set up for legal citations. All styles have dedicated drivers and supporting infrastructure for the accepted entry types.



There were also dedicated styles for German legal citations, Swiss legal style and French legal citations, but these styles have not been updated recently and will probably not work as intended any more. A more recent French style is https://github.com/ienissei/frenchlaw




Write your own legal references



Depending on the output you expect and the input you find reasonable the work you may have to do can vary.



Bibliography



I think it is fair to assume that you will have to write a dedicated bibliography driver for @legislation and @jurisdiction. Mapping to a standard driver like @article, @misc or @book is probably not enough for you.
The general approach to writing a bibliography driver as shown in Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber? is still valid. I would definitely prefer bibstrings over hard-coded text in macros and would usually try to avoid printtext and try to use DeclareFieldFormat as much as possible (but I guess to some extent that is just a matter of taste). As we are all painfully aware there are no comprehensive "introduction to writing a biblatex style" or "my first bibdriver" available (yet?), so I would usually recommend to learn by looking at examples. Naturally you would start with the standard drivers, but I believe most of the styles listed above can also be used to learn best practices - if you keep in mind that some of them need to implement a complicated set of rules and so some tricks are required once in a while.



You may also have to add certain fields to the default data model if you feel that the available fields don't cover everything you need. (biblatex-oxref adds a few non-standard fields for case reporting for example.) See Add field "tome" to biblatex entries.



With a bit of care those two things can happen almost independent of the style that is later used.



Citation



For citations the situation is not as clear.



As biblatex-oxref and biblatex-bath demonstrate it might not actually be necessary to modify the cite macros, it can be enough to use existing features like labeltitle, labeldate and a few modifications of their behaviour to obtain acceptable citation output. But depending on the rest of your style and your input it may be necessary to change the cite macro to incorporate legal citations. This gets harder to pull off in a way that is independent of the used citation style. If you use a complicated style such as authoryear-icomp some care needs to be taken to make sure legal citations interact with the various features of the style in a reasonable way.



A dedicated lawcite command might be an option that avoids messing with heavily style-dependent citation commands, but it does not feel as nice to me.






share|improve this answer

























  • Very useful, though I'm not sure it bears much relation to what I've done. Basically, this involves AtEveryCitekey and will go horribly wrong for something like citelaw,article. However, that's probably a really bad thing to do anyway. I have a very simple set-up for handling cases and laws. It almost works in a reasonable way, but textcite either gives me laws with no dates or other citation commands give me laws with the date twice. Very annoying! I'm surprised it compiles at all, though. It hacks oscola horribly.

    – cfr
    Jul 3 '18 at 1:02











  • Managed to put the years back, but not sure why other attempts failed. But, hey, years are in.

    – cfr
    Jul 3 '18 at 1:48


















4














I cannot really say much about best practices on the matter, and neither on
legal sources in particular. So I guess technically I shouldn’t be
answering. But I do think I have some input that might be of interest. However, I intend to tackle the question from a somewhat specific perspective: Sharing my thoughts on how to handle non-regular entry types with biblatex, of which legal sources can be considered a particular case.



My own relation to the problem comes from the need to cite/reference primary
sources for Economic History research, which means mostly archive sources but may actually be quite diverse stuff. This includes legal sources, but I never really worried much about specific requirements of this type of source. I mention this because some of my choices here do stem from the requirements implied by this, but I do think most of the suggestions bellow are quite flexible (Indeed, "flexibility" is one of my key requirements, for I usually cannot predict in advance the required style for submission of any given work when I start it).



There is always a range of alternatives to deal with less than standard types of sources. moewe covers this very well in his
answer, so there is no need for me to reiterate. But a comment on a natural choice may be worth it. Indeed, one of the obvious ways would be to choose a style that handles the particular type of source that we need. My view is that, unless there is a general reason to go for a specialized or heavily customized style, I feel it to be too much to choose it just to support a particular entry type we need. I prefer to stick to my style of choice (usually one of the standard ones), which provides me well with the desired results for regular entry types and layer on top of it the necessary structure to deal with the non regular ones. Normally regular entry types will comprise a large share of the sources anyway, so why change everything, for all entry types, just to be able to handle one or another kind of special source?



Given this, in the most general case, handling non-standard entry type entails three basic issues:



  • Providing the data structure (entry types, entry fields)


  • Specifying how the entry types should appear in the bibliography (bibdrivers, filtering)


  • Specifying how the citation for these entry types should behave.


As for the first two, moewe also covers them in the second part of his answer,
pointing to two good sources on the matter here on the site (Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber?).
That’s about it. And it is a testimony to biblatex’s capabilities, which was
designed to be both customizable and extensible.



But some comments. It is hard to escape from defining a bibdriver for your
special entry type(s). Well, at least if you want things nicely done
(theoretically you could always try to hammer / (ab)use one or another existing entry type). Anyway, biblatex offers us a nice user interface with which this can be done without much fuss, so it is highly recommendable to do so.



As to extending or not the datamodel, the choices are not as clear and will
depend on your requirements (and taste). In particular, biblatex has some entry types and entry fields readily available for such purposes (entrytypes custom[a-f], entry fields name[a-c], list[a-f], user[a-f] etc.). So, if you only need some few of those, a proper extension of the datamodel may not be needed. Furthermore, if you’d like to use meaningful names for your types and fields, you can map the names of your choice to the existing ones with a sourcemap.



Another consideration regarding the extension of the data structure to support a special type of source is the portability of your (.bib) data. And, related to this, how much support you will be able to get from existing software for management of your bibliography data (JabRef, Zotero, Mendeley and equivalents and related software) if you like or need those. My view on this matter is that, for less standard types of sources, portability (and software support) is not granted anyway, so I might as well leave portability behind (for these types of entries only!), and go for a meaningful data structure. Time and again I found myself "tayloring" the bibentry data to achieve desired end results for a particular style, resulting in, let’s say, "less than semantic and less than portable" bib data. In my experience, this is particularly true with heavily customized styles or specialized styles, which will be the ones that support your special source type to start with. Every time you resort to this, your data is not really portable anymore. So I choose to separate regular entry types, and keep them portable, letting standard styles handle them, and for the non standard sources/entry types, assuming they will not be portable anyway, I tend to a meaningful / semantic data structure. I keep "portable" and "non portable" data in separate .bib files. However, notice that once you can carry the parallel structure for your special entry types to the style of your choice, that is not particularly restrictive (This is not unrestricted though. To start with, you won’t carry it outside biblatex, which means you won’t carry it outside LaTeX and thus will only be able to achieve pdf, or similar, output).



How to handle citations then? Citation call-outs are creatures more delicate
than bibdrivers. To start with because bibdrivers let you have a specific
structure for each entry type, while citations (normally) require a single
overall standard structure, whatever the entrytype may be. This point is
interesting because the first temptation here would be: I can simply redefine
the relevant citation commands or citation macros to get them to handle my
special source types. Technically that is true, but it’s not the crux of the
problem. First we have to figure how our citation call outs should be displayed, and if there is any meaningful way to fit our special sources within the current style citation structure. E.g. would it make any sense to try to fit a decree or a law in an author-year structure? Out of this dilemma, I eventually converged to what I call a "mixed citation style". My usual kind of special sources practically requires a long citation in footnotes, both because the amount of information is usually long enough not to fit the flow of text and because primary/archive sources do not usually reach individually the bibliography (their "container" does). This blends organically with the verbose style (or variants) but also works pretty well with, e.g. authoryear style for the regular entry types, provided I choose properly the citation command for each occasion. I’m not claiming this is the only approach to the problem, quite the contrary would be true, but only that this is the most expedient way to do so I was able to find for my current needs in dealing with non standard sources.



From a technical point of view, given this perspective, how to deal with
citations? Given my flexibility requirements, I’ve opted for patching (well, sort of) the cite bibmacro, which offers a reasonable hook for the purpose. This allows us to get the job done for whatever style we happen to choose ex post. (Ok, "whatever" is not completely true, more on this later). My current setup for this is in the form:



letbibmacrocite:origcite

renewbibmacro*cite%
ifcategoryprimary%
usebibmacroprimary%
usebibmacrocite:orig


Of course, you could substitute primary there for legal (or whatever you may choose), just taking care that your set of legal sources entry types are duly added to the corresponding category. (For other techniques for the same
purpose, see Biblatex - xpatch bibmacro with unbalanced braces).



This essentially, redefines the cite bibmacro in a way that lets biblatex do what it usually does for regular entry types, but allows you to control separately what happens for your special entry types. That given, you now can exert full control of the citation call-outs, for your special entry types only, through the primary (legal) bibmacro, leaving citations for regular entry types untouched. That’s no small feat, but comes at a cost.



Some comments on this approach. The patch allows one to have style flexibility
for the regular entry types, which may or may not be a requirement for
you. However, even if it’s not, I suggest it still may be interesting because,
if the structure of the call out is not really adjustable within the current
citation style logic, you’ll probably see the need to resort to a similar
conditional (wherever you choose to place it). And, if so, there will not be much difference in
requirements/limitations at the end of the day. So the patch may well be convenient.
Any way, as mentioned, redefining the relevant bibmacros and/or the relevant
citation commands are also options to consider. Defining dedicated citation
commands too. Patching the citation commands is not, though (See discussion in
the comments at Biblatex's bibmacros, bibliography drivers, formats - patch or redefine?). This is relevant because the cite bibmacro is not a perfect universal hook, particularly not for comp variants of the standard citation styles (not to mention contributed ones).



This approach gives us a reasonable flexibility in the choice of the underlying citation style (for regular entrytypes), but it is not quite "style agnostic", and this for two reasons.



First, given we hijacked the core citation bibmacro in this fashion, it means we are responsible for reimplementing any special features of the citation style on our own for the special entry types (e.g. ibid handling, short vs long formats and so on). And it is hard to do this in a way which is independent of the style...



Second, not all styles get to build the full citation based solely in the cite bibmacro, not even the standard ones, the comp variants being the most conspicuous examples. (Though I still think this should be quite viable,
provided you don’t mix regular and non regular entry types in any single
citation command. This is untested though). Though, in principle, this approach may work with the standard styles and likely with (many?) contributed styles, whether it does or not hangs on this same issue. It must also be sensible (e.g. I don't think this would blend well with numeric or alphabetic, even if it technically works). Anyway, I have been using this with authoryear, authortitle and verbose, alongside their ibid variants quite successfully, without needing to get paranoid when citing any given source (due care is needed of course) and without worrying with any other adjustments beyond the choice of citation style.



A final touch. If you are like me, you may stumble upon some case where one of
your non regular source type(s) happens to be published within a regular one, and you’d like to treat it as a special type, because that’s meaningful/important, but still acknowledge the published version. You can do that in a way that is responsive to the citation style being used for the regular entry types by using the cite bibmacro for the regular type within the citation of the non regular one within an entrydata fed with a proper crossref. (moewe, now you know why I was so interested in nested entrydatas a while ago).



Conceptually, those are my main points. To be somewhat less abstract, I include some key pieces in concrete form. The primary bibmacro, which handles my citations for my primary sources uses mixed interfaces of biblatex (that is, uses a bibdriver to render the citation), and is something similar to:



newbibmacro*primary%
ifciteseen
ifboolexpr
test ifciteibid
and
not test iffirstonpage
usebibmacrocite:ibid
ifdriverthefieldentrytype:short
usedriverthefieldentrytype:short
usedriverthefieldentrytype
usedriverthefieldentrytype


Of course, you don’t have to use mixed interfaces, and could well go with
regular bibmacros. I happen to think this is specially convenient to be able to get citation call outs for each of my special entry types by simply defining the relevant bibdrivers. Note that the above structure handles both short/long citation forms and ibid, doing so automatically with the corresponding citation styles without any further intervention, given biblatex turns on or off the relevant trackers according to the chosen style.



My legislation drivers are the following:



DeclareBibliographyDriverlegislation%
usebibmacrobibindex%
usebibmacrobegentry%
usebibmacrolegislation:typenumber%
setunitaddcommaspace%
printdate%
setunitaddcommaspace%
printfieldleggov%
setunitaddcommaspace%
iffieldundefshorttitle
printfield[title]title
printfield[title]shorttitle%
setunitaddcommaspace%
iffieldundefpubin

%
bibstringin%
setunitaddspace%
usebibmacroprimpublishedin%
%
newunit
ifcitation

printfieldaddendum%
usebibmacrofinentry

DeclareBibliographyDriverlegislation:short%
usebibmacrobibindex%
usebibmacrobegentry%
usebibmacrolegislation:typenumber%
setunitaddcommaspace%
printshortdate%
setunitaddcommaspace%
iffieldundefshortleggov
printfieldleggov
printfieldshortleggovisdot%
setunitaddcommaspace%
iffieldundefpubin

%
bibstringin%
setunitaddspace%
usebibmacroprimpublishedin%
%
usebibmacrofinentry


Which require:



newbibmacro*legislation:typenumber%
ifboolexpr
test iffieldundefpubin
and
test ifcitation
and not
test iffieldundefcrossref
%
printtext[bibhyperref:crossref]%
printfieldlegtype%
setunitaddspace%
bibstringnumber%
setunitaddnbspace%
printfieldlegnumber%
%
printfieldlegtype%
setunitaddspace%
bibstringnumber%
setunitaddnbspace%
printfieldlegnumber

newbibmacro*primpublishedin%
entrydata*strfieldpubin%
ifentrytypeprimperiodical%
ifbibliography
clearfieldurlintro%
clearfieldurl%
clearfieldaddendum%
usedriverthefieldentrytype
begingroup%
delimcontextnone%
usebibmacrocite%
endgroup%
setunitaddcommaspace%
iffieldundefsavedvolume

iffieldnumsavedvolume
bibstringjourvoladdnbspace
%
printfieldsavedvolume%
setunitaddcommaspace%
iffieldundefsavednumber

iffieldnumsavednumber
bibstringnumberaddnbspace
%
printfieldsavednumber%
setunitaddcommaspace%
printsavedpubdate%
%
ifbibliography
usedriverthefieldentrytype
begingroup%
delimcontextnone%
usebibmacrocite%
endgroup%
%
%
ifboolexpr
test iffieldpagespostnote
and
not test iffieldundefpages
globaltoggletrueprim:thiscite
%
setunitbibpagespunct%
printfieldpages%



With this (and assuming the relevant fields are defined in your datamodel), you just have to add all entries of type legislation to the category primary (or legal) to get your citation working for the legislation entrytype (the standard AtEveryCitekey hook should suffice for this).



To get things done in practice, I just fill out a proper template:



% legislation
% "legtype", "legnumber" and "date" are mandatory
% If "pubin" is not set, does not automatically crossref to any entry, if that's desired use the "crossref" field directly
@legislationID,
OPTdocid = ,
legtype = ,
legnumber = ,
OPTleggov = ,
OPTshortleggov = ,
date = ,
OPTtitle = ,
OPTshorttitle = ,
OPTpubin = ,
OPTvolume = ,
OPTnumber = ,
OPTpubdate = ,
OPTpages = ,
OPTcrossref = ,
OPTaddendum = ,



This, of course, does not attend OSCLA or any other reputable citation style for legal sources, it is also not self sufficient code, but hopefully can do as an example for how to use this citation approach more concretely.



Well, I think those are my thoughts on the matter, as promised. I hope they get to be useful.






share|improve this answer




















  • 1





    That was an interesting read. Thank you very much.

    – moewe
    Jun 28 '18 at 18:51











  • @moewe I'm glad to share this conceptual structure after demanding so much here on the site (and elsewhere) to get to it. :) I don't think there are any universal answers for this, but I do believe this to be a good summary of the alternatives and trade-offs involved.

    – gusbrs
    Jun 28 '18 at 19:01











  • I really appreciate both your and @moewe taking the time to answer so carefully. Thanks very much!

    – cfr
    Jun 28 '18 at 21:59


















1














Use the oxnotes biblatex style. It does quite a good and robust job and has a sufficiently nuanced presentation. The laser-scapel precision of a full OSCOLA compliance is not really required outside a legal forum.



You were almost there in the MWE. Some additional adjustments:



In the bib file, for cases, put the case reference in the number field. This will handle both hardcopy and electronic law reports. For printed cases, page ranges are not required.



For legislation, do not use an author field. Having the year in the footnote is sufficient.



In the text, use autocite. Part of the clear-writing ethos for lawyers is to de-clutter the page. Reference details go in the footnotes. (Notice in the MWE how textcite wants to treat the legislation name - it should be plain.)



Note that you can put formatting commands (latex code) in the bib field items, emph, etc., if you want.



As to the question of 'should', it is a matter of degree.



If you're feeling tempted to go as far as splitting the bibliography into a legal part and a non-legal part, to help the reader, easiest way is to use keywords. (There are other ways as well: biblatex is a toolkit, in effect.)



MWE:



RequirePackagefilecontents
beginfilecontentsjobname.bib
@jurisdictioncase,
title = Somebody v Somebody Else and Others (No 4),
number = [2016] AC 100,
date=2016,
keywords=legal,case,
% pages = 100--178,
% date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01

@legislationteu,
keywords = legal,legislation,
entrysubtype = eu-treaty,
title = Consolidated Version of the
Treaty on European Union,
date = 2010,
journaltitle = OJ,
series = C,
volume = 83,
pages = 13,
shorthand = TEU,
pagination = article,

@jurisdictionc632,title = Tenacity Investments v Ku-Ring-Gai Council and Ors (No 2),keywords = au,number = [2008] NSWLEC 171,institution = Land and Environment Court of New South Wales,date = 2008-08-22, keywords=legal,case,

@jurisdictionc606,title = Lee-Hirons v Secretary of State for Justice,keywords = au,number = [2016] UKSC 46,institution = United Kingdom Supreme Court,date = 2016-07-27,keywords=legal,case,

@legislationdeddf,
title = Deddf Ardderchog (Cymru),
year = 2014,
institution = Cynulliad Cenedlaethol Cymru,
languageid = cy,
keywords=legal,legislation,


@legislationcansw,
title = Crimes Act (NSW) ,
year = 1900,
languageid = en_AU,
keywords=legal,legislation,


@articlearticle,
title = Fantastic Findings and Where to Find Them,
author = Vark, Aar D.,
journal = Diligent Discoveries,
volume = 45,
number = 3,
pages = 23--32,
year = 2010

@bookbook,
title = Brilliant Baths,
author = Allard, M.,
publisher = Empire Books,
address = Alpha Centauri,
year = 1998

@bookaustrams,
author = Austin, Robert P. and Ramsay, Ian M,
title = Ford, Austin and Ramsay's Principles of Corporations Law,
edition = 16,
publisher = LexisNexis Butterworths,
date = 2015,
pagination = paragraph,
ISBN = 9780409338386,

endfilecontents

documentclass[welsh,british,a4paper]article
%usepackage[utf8]inputenc
%usepackagegeometry
%usepackagecfr-lm
usepackagebabel
usepackagecsquotes
usepackage[style=oxnotes]biblatex
addbibresourcejobname.bib

begindocument

Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
Textcitearticle and textcitebook are cited using the author-year system.

However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
Nonetheless, these need to be cited appropriately.
Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
Hence, the standard styles do not handle these cases well:
beginquote
textcitededdf is a law autocitededdf.
Textcite[at 150]case is a case autocitecase.
A legal textbookautociteaustrams. And another caseautocitec632. And a medium-neutral citation of a case autocite[at para 23]c606. Some EU legislation to play with autociteteu. And a statuteautocitecansw. A law from another jurisdiction: textcitecansw
endquote

printbibheading
printbibliography [
heading=subbibliography,%
keyword=case,
title=Cases
]
printbibliography [
heading=subbibliography,%
keyword=legislation,
title=Statutes
]
printbibliography [
heading=subbibliography,%
notkeyword=case,
notkeyword=legislation,
title=General
]

hrule


enddocument


giving:



text with citations



and the footnotes:



footnotes



and the bibliography:



Regs



P.S.
It took me a few minutes to work out why I couldn't find "Deddf Ardderchog" on BAILII! :)






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f437824%2fwhat-is-best-practice-re-handling-legal-sources-with-biblatex-biber-for-discipl%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5















    Keks Dose makes the good point in the comments that not only do the legal systems differ from country to country so do their citation practices.



    The styles listed below come mainly from an English/American common law perspective.




    Styles with support for legal citations



    A handful of biblatex styles have some kind of support for legal citations with @jurisdiction and @legislation (I only listed styles that I consider to be of recent vintage, i.e. updated after the release of biblatex v3.3 in 2016)




    • biblatex-abnt aliases both to @article.


    • biblatex-bath has support for UK legislation and parliamentary reports (@legislation) as well as EU legislation and reports (as @legislation) and case reports (@jurisdiction). See §§4.8-4.10 of the documentation.


    • biblatex-chicago offers the types @jurisdiction, @legal and @legislation following CMS/Bluebook recommendations.


    • biblatex-oxref (by the author of biblatex-bath) also offers support for legal sources mimicking OSCOLA with a few minor differences. See §10 Legal references of the style documentations (here oxyear) For the author-year style oxyear the author notes




      Since legal references are usually cited using footnotes, how oxyear should behave is not well defined. As a result, I have not configured it to do anything fancy: the full reference will be formatted just the same as with oxnotes, and citations will typically be title–year using parentheses in the usual way.




    • biblatex-philosophy has experimental support for @jurisdiction.



    • oscola has support for much of the English-speaking world.

    biblatex-bath, biblatex-oxref's oxyear style and biblatex-chicago's authordate will be of particular interest since those styles usually follow an autho-year scheme and are otherwise not focused on legal citations.



    As far as I can see biblatex-bath and biblatex-oxref can get away with not modifying the citation commands significantly (a few delimiters are modified but the cite bibmacro itself not), biblatex-chicago has has dedicated macros set up for legal citations. All styles have dedicated drivers and supporting infrastructure for the accepted entry types.



    There were also dedicated styles for German legal citations, Swiss legal style and French legal citations, but these styles have not been updated recently and will probably not work as intended any more. A more recent French style is https://github.com/ienissei/frenchlaw




    Write your own legal references



    Depending on the output you expect and the input you find reasonable the work you may have to do can vary.



    Bibliography



    I think it is fair to assume that you will have to write a dedicated bibliography driver for @legislation and @jurisdiction. Mapping to a standard driver like @article, @misc or @book is probably not enough for you.
    The general approach to writing a bibliography driver as shown in Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber? is still valid. I would definitely prefer bibstrings over hard-coded text in macros and would usually try to avoid printtext and try to use DeclareFieldFormat as much as possible (but I guess to some extent that is just a matter of taste). As we are all painfully aware there are no comprehensive "introduction to writing a biblatex style" or "my first bibdriver" available (yet?), so I would usually recommend to learn by looking at examples. Naturally you would start with the standard drivers, but I believe most of the styles listed above can also be used to learn best practices - if you keep in mind that some of them need to implement a complicated set of rules and so some tricks are required once in a while.



    You may also have to add certain fields to the default data model if you feel that the available fields don't cover everything you need. (biblatex-oxref adds a few non-standard fields for case reporting for example.) See Add field "tome" to biblatex entries.



    With a bit of care those two things can happen almost independent of the style that is later used.



    Citation



    For citations the situation is not as clear.



    As biblatex-oxref and biblatex-bath demonstrate it might not actually be necessary to modify the cite macros, it can be enough to use existing features like labeltitle, labeldate and a few modifications of their behaviour to obtain acceptable citation output. But depending on the rest of your style and your input it may be necessary to change the cite macro to incorporate legal citations. This gets harder to pull off in a way that is independent of the used citation style. If you use a complicated style such as authoryear-icomp some care needs to be taken to make sure legal citations interact with the various features of the style in a reasonable way.



    A dedicated lawcite command might be an option that avoids messing with heavily style-dependent citation commands, but it does not feel as nice to me.






    share|improve this answer

























    • Very useful, though I'm not sure it bears much relation to what I've done. Basically, this involves AtEveryCitekey and will go horribly wrong for something like citelaw,article. However, that's probably a really bad thing to do anyway. I have a very simple set-up for handling cases and laws. It almost works in a reasonable way, but textcite either gives me laws with no dates or other citation commands give me laws with the date twice. Very annoying! I'm surprised it compiles at all, though. It hacks oscola horribly.

      – cfr
      Jul 3 '18 at 1:02











    • Managed to put the years back, but not sure why other attempts failed. But, hey, years are in.

      – cfr
      Jul 3 '18 at 1:48















    5















    Keks Dose makes the good point in the comments that not only do the legal systems differ from country to country so do their citation practices.



    The styles listed below come mainly from an English/American common law perspective.




    Styles with support for legal citations



    A handful of biblatex styles have some kind of support for legal citations with @jurisdiction and @legislation (I only listed styles that I consider to be of recent vintage, i.e. updated after the release of biblatex v3.3 in 2016)




    • biblatex-abnt aliases both to @article.


    • biblatex-bath has support for UK legislation and parliamentary reports (@legislation) as well as EU legislation and reports (as @legislation) and case reports (@jurisdiction). See §§4.8-4.10 of the documentation.


    • biblatex-chicago offers the types @jurisdiction, @legal and @legislation following CMS/Bluebook recommendations.


    • biblatex-oxref (by the author of biblatex-bath) also offers support for legal sources mimicking OSCOLA with a few minor differences. See §10 Legal references of the style documentations (here oxyear) For the author-year style oxyear the author notes




      Since legal references are usually cited using footnotes, how oxyear should behave is not well defined. As a result, I have not configured it to do anything fancy: the full reference will be formatted just the same as with oxnotes, and citations will typically be title–year using parentheses in the usual way.




    • biblatex-philosophy has experimental support for @jurisdiction.



    • oscola has support for much of the English-speaking world.

    biblatex-bath, biblatex-oxref's oxyear style and biblatex-chicago's authordate will be of particular interest since those styles usually follow an autho-year scheme and are otherwise not focused on legal citations.



    As far as I can see biblatex-bath and biblatex-oxref can get away with not modifying the citation commands significantly (a few delimiters are modified but the cite bibmacro itself not), biblatex-chicago has has dedicated macros set up for legal citations. All styles have dedicated drivers and supporting infrastructure for the accepted entry types.



    There were also dedicated styles for German legal citations, Swiss legal style and French legal citations, but these styles have not been updated recently and will probably not work as intended any more. A more recent French style is https://github.com/ienissei/frenchlaw




    Write your own legal references



    Depending on the output you expect and the input you find reasonable the work you may have to do can vary.



    Bibliography



    I think it is fair to assume that you will have to write a dedicated bibliography driver for @legislation and @jurisdiction. Mapping to a standard driver like @article, @misc or @book is probably not enough for you.
    The general approach to writing a bibliography driver as shown in Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber? is still valid. I would definitely prefer bibstrings over hard-coded text in macros and would usually try to avoid printtext and try to use DeclareFieldFormat as much as possible (but I guess to some extent that is just a matter of taste). As we are all painfully aware there are no comprehensive "introduction to writing a biblatex style" or "my first bibdriver" available (yet?), so I would usually recommend to learn by looking at examples. Naturally you would start with the standard drivers, but I believe most of the styles listed above can also be used to learn best practices - if you keep in mind that some of them need to implement a complicated set of rules and so some tricks are required once in a while.



    You may also have to add certain fields to the default data model if you feel that the available fields don't cover everything you need. (biblatex-oxref adds a few non-standard fields for case reporting for example.) See Add field "tome" to biblatex entries.



    With a bit of care those two things can happen almost independent of the style that is later used.



    Citation



    For citations the situation is not as clear.



    As biblatex-oxref and biblatex-bath demonstrate it might not actually be necessary to modify the cite macros, it can be enough to use existing features like labeltitle, labeldate and a few modifications of their behaviour to obtain acceptable citation output. But depending on the rest of your style and your input it may be necessary to change the cite macro to incorporate legal citations. This gets harder to pull off in a way that is independent of the used citation style. If you use a complicated style such as authoryear-icomp some care needs to be taken to make sure legal citations interact with the various features of the style in a reasonable way.



    A dedicated lawcite command might be an option that avoids messing with heavily style-dependent citation commands, but it does not feel as nice to me.






    share|improve this answer

























    • Very useful, though I'm not sure it bears much relation to what I've done. Basically, this involves AtEveryCitekey and will go horribly wrong for something like citelaw,article. However, that's probably a really bad thing to do anyway. I have a very simple set-up for handling cases and laws. It almost works in a reasonable way, but textcite either gives me laws with no dates or other citation commands give me laws with the date twice. Very annoying! I'm surprised it compiles at all, though. It hacks oscola horribly.

      – cfr
      Jul 3 '18 at 1:02











    • Managed to put the years back, but not sure why other attempts failed. But, hey, years are in.

      – cfr
      Jul 3 '18 at 1:48













    5












    5








    5








    Keks Dose makes the good point in the comments that not only do the legal systems differ from country to country so do their citation practices.



    The styles listed below come mainly from an English/American common law perspective.




    Styles with support for legal citations



    A handful of biblatex styles have some kind of support for legal citations with @jurisdiction and @legislation (I only listed styles that I consider to be of recent vintage, i.e. updated after the release of biblatex v3.3 in 2016)




    • biblatex-abnt aliases both to @article.


    • biblatex-bath has support for UK legislation and parliamentary reports (@legislation) as well as EU legislation and reports (as @legislation) and case reports (@jurisdiction). See §§4.8-4.10 of the documentation.


    • biblatex-chicago offers the types @jurisdiction, @legal and @legislation following CMS/Bluebook recommendations.


    • biblatex-oxref (by the author of biblatex-bath) also offers support for legal sources mimicking OSCOLA with a few minor differences. See §10 Legal references of the style documentations (here oxyear) For the author-year style oxyear the author notes




      Since legal references are usually cited using footnotes, how oxyear should behave is not well defined. As a result, I have not configured it to do anything fancy: the full reference will be formatted just the same as with oxnotes, and citations will typically be title–year using parentheses in the usual way.




    • biblatex-philosophy has experimental support for @jurisdiction.



    • oscola has support for much of the English-speaking world.

    biblatex-bath, biblatex-oxref's oxyear style and biblatex-chicago's authordate will be of particular interest since those styles usually follow an autho-year scheme and are otherwise not focused on legal citations.



    As far as I can see biblatex-bath and biblatex-oxref can get away with not modifying the citation commands significantly (a few delimiters are modified but the cite bibmacro itself not), biblatex-chicago has has dedicated macros set up for legal citations. All styles have dedicated drivers and supporting infrastructure for the accepted entry types.



    There were also dedicated styles for German legal citations, Swiss legal style and French legal citations, but these styles have not been updated recently and will probably not work as intended any more. A more recent French style is https://github.com/ienissei/frenchlaw




    Write your own legal references



    Depending on the output you expect and the input you find reasonable the work you may have to do can vary.



    Bibliography



    I think it is fair to assume that you will have to write a dedicated bibliography driver for @legislation and @jurisdiction. Mapping to a standard driver like @article, @misc or @book is probably not enough for you.
    The general approach to writing a bibliography driver as shown in Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber? is still valid. I would definitely prefer bibstrings over hard-coded text in macros and would usually try to avoid printtext and try to use DeclareFieldFormat as much as possible (but I guess to some extent that is just a matter of taste). As we are all painfully aware there are no comprehensive "introduction to writing a biblatex style" or "my first bibdriver" available (yet?), so I would usually recommend to learn by looking at examples. Naturally you would start with the standard drivers, but I believe most of the styles listed above can also be used to learn best practices - if you keep in mind that some of them need to implement a complicated set of rules and so some tricks are required once in a while.



    You may also have to add certain fields to the default data model if you feel that the available fields don't cover everything you need. (biblatex-oxref adds a few non-standard fields for case reporting for example.) See Add field "tome" to biblatex entries.



    With a bit of care those two things can happen almost independent of the style that is later used.



    Citation



    For citations the situation is not as clear.



    As biblatex-oxref and biblatex-bath demonstrate it might not actually be necessary to modify the cite macros, it can be enough to use existing features like labeltitle, labeldate and a few modifications of their behaviour to obtain acceptable citation output. But depending on the rest of your style and your input it may be necessary to change the cite macro to incorporate legal citations. This gets harder to pull off in a way that is independent of the used citation style. If you use a complicated style such as authoryear-icomp some care needs to be taken to make sure legal citations interact with the various features of the style in a reasonable way.



    A dedicated lawcite command might be an option that avoids messing with heavily style-dependent citation commands, but it does not feel as nice to me.






    share|improve this answer
















    Keks Dose makes the good point in the comments that not only do the legal systems differ from country to country so do their citation practices.



    The styles listed below come mainly from an English/American common law perspective.




    Styles with support for legal citations



    A handful of biblatex styles have some kind of support for legal citations with @jurisdiction and @legislation (I only listed styles that I consider to be of recent vintage, i.e. updated after the release of biblatex v3.3 in 2016)




    • biblatex-abnt aliases both to @article.


    • biblatex-bath has support for UK legislation and parliamentary reports (@legislation) as well as EU legislation and reports (as @legislation) and case reports (@jurisdiction). See §§4.8-4.10 of the documentation.


    • biblatex-chicago offers the types @jurisdiction, @legal and @legislation following CMS/Bluebook recommendations.


    • biblatex-oxref (by the author of biblatex-bath) also offers support for legal sources mimicking OSCOLA with a few minor differences. See §10 Legal references of the style documentations (here oxyear) For the author-year style oxyear the author notes




      Since legal references are usually cited using footnotes, how oxyear should behave is not well defined. As a result, I have not configured it to do anything fancy: the full reference will be formatted just the same as with oxnotes, and citations will typically be title–year using parentheses in the usual way.




    • biblatex-philosophy has experimental support for @jurisdiction.



    • oscola has support for much of the English-speaking world.

    biblatex-bath, biblatex-oxref's oxyear style and biblatex-chicago's authordate will be of particular interest since those styles usually follow an autho-year scheme and are otherwise not focused on legal citations.



    As far as I can see biblatex-bath and biblatex-oxref can get away with not modifying the citation commands significantly (a few delimiters are modified but the cite bibmacro itself not), biblatex-chicago has has dedicated macros set up for legal citations. All styles have dedicated drivers and supporting infrastructure for the accepted entry types.



    There were also dedicated styles for German legal citations, Swiss legal style and French legal citations, but these styles have not been updated recently and will probably not work as intended any more. A more recent French style is https://github.com/ienissei/frenchlaw




    Write your own legal references



    Depending on the output you expect and the input you find reasonable the work you may have to do can vary.



    Bibliography



    I think it is fair to assume that you will have to write a dedicated bibliography driver for @legislation and @jurisdiction. Mapping to a standard driver like @article, @misc or @book is probably not enough for you.
    The general approach to writing a bibliography driver as shown in Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber? is still valid. I would definitely prefer bibstrings over hard-coded text in macros and would usually try to avoid printtext and try to use DeclareFieldFormat as much as possible (but I guess to some extent that is just a matter of taste). As we are all painfully aware there are no comprehensive "introduction to writing a biblatex style" or "my first bibdriver" available (yet?), so I would usually recommend to learn by looking at examples. Naturally you would start with the standard drivers, but I believe most of the styles listed above can also be used to learn best practices - if you keep in mind that some of them need to implement a complicated set of rules and so some tricks are required once in a while.



    You may also have to add certain fields to the default data model if you feel that the available fields don't cover everything you need. (biblatex-oxref adds a few non-standard fields for case reporting for example.) See Add field "tome" to biblatex entries.



    With a bit of care those two things can happen almost independent of the style that is later used.



    Citation



    For citations the situation is not as clear.



    As biblatex-oxref and biblatex-bath demonstrate it might not actually be necessary to modify the cite macros, it can be enough to use existing features like labeltitle, labeldate and a few modifications of their behaviour to obtain acceptable citation output. But depending on the rest of your style and your input it may be necessary to change the cite macro to incorporate legal citations. This gets harder to pull off in a way that is independent of the used citation style. If you use a complicated style such as authoryear-icomp some care needs to be taken to make sure legal citations interact with the various features of the style in a reasonable way.



    A dedicated lawcite command might be an option that avoids messing with heavily style-dependent citation commands, but it does not feel as nice to me.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 7 at 21:01

























    answered Jun 26 '18 at 13:39









    moewemoewe

    95.1k10115358




    95.1k10115358












    • Very useful, though I'm not sure it bears much relation to what I've done. Basically, this involves AtEveryCitekey and will go horribly wrong for something like citelaw,article. However, that's probably a really bad thing to do anyway. I have a very simple set-up for handling cases and laws. It almost works in a reasonable way, but textcite either gives me laws with no dates or other citation commands give me laws with the date twice. Very annoying! I'm surprised it compiles at all, though. It hacks oscola horribly.

      – cfr
      Jul 3 '18 at 1:02











    • Managed to put the years back, but not sure why other attempts failed. But, hey, years are in.

      – cfr
      Jul 3 '18 at 1:48

















    • Very useful, though I'm not sure it bears much relation to what I've done. Basically, this involves AtEveryCitekey and will go horribly wrong for something like citelaw,article. However, that's probably a really bad thing to do anyway. I have a very simple set-up for handling cases and laws. It almost works in a reasonable way, but textcite either gives me laws with no dates or other citation commands give me laws with the date twice. Very annoying! I'm surprised it compiles at all, though. It hacks oscola horribly.

      – cfr
      Jul 3 '18 at 1:02











    • Managed to put the years back, but not sure why other attempts failed. But, hey, years are in.

      – cfr
      Jul 3 '18 at 1:48
















    Very useful, though I'm not sure it bears much relation to what I've done. Basically, this involves AtEveryCitekey and will go horribly wrong for something like citelaw,article. However, that's probably a really bad thing to do anyway. I have a very simple set-up for handling cases and laws. It almost works in a reasonable way, but textcite either gives me laws with no dates or other citation commands give me laws with the date twice. Very annoying! I'm surprised it compiles at all, though. It hacks oscola horribly.

    – cfr
    Jul 3 '18 at 1:02





    Very useful, though I'm not sure it bears much relation to what I've done. Basically, this involves AtEveryCitekey and will go horribly wrong for something like citelaw,article. However, that's probably a really bad thing to do anyway. I have a very simple set-up for handling cases and laws. It almost works in a reasonable way, but textcite either gives me laws with no dates or other citation commands give me laws with the date twice. Very annoying! I'm surprised it compiles at all, though. It hacks oscola horribly.

    – cfr
    Jul 3 '18 at 1:02













    Managed to put the years back, but not sure why other attempts failed. But, hey, years are in.

    – cfr
    Jul 3 '18 at 1:48





    Managed to put the years back, but not sure why other attempts failed. But, hey, years are in.

    – cfr
    Jul 3 '18 at 1:48











    4














    I cannot really say much about best practices on the matter, and neither on
    legal sources in particular. So I guess technically I shouldn’t be
    answering. But I do think I have some input that might be of interest. However, I intend to tackle the question from a somewhat specific perspective: Sharing my thoughts on how to handle non-regular entry types with biblatex, of which legal sources can be considered a particular case.



    My own relation to the problem comes from the need to cite/reference primary
    sources for Economic History research, which means mostly archive sources but may actually be quite diverse stuff. This includes legal sources, but I never really worried much about specific requirements of this type of source. I mention this because some of my choices here do stem from the requirements implied by this, but I do think most of the suggestions bellow are quite flexible (Indeed, "flexibility" is one of my key requirements, for I usually cannot predict in advance the required style for submission of any given work when I start it).



    There is always a range of alternatives to deal with less than standard types of sources. moewe covers this very well in his
    answer, so there is no need for me to reiterate. But a comment on a natural choice may be worth it. Indeed, one of the obvious ways would be to choose a style that handles the particular type of source that we need. My view is that, unless there is a general reason to go for a specialized or heavily customized style, I feel it to be too much to choose it just to support a particular entry type we need. I prefer to stick to my style of choice (usually one of the standard ones), which provides me well with the desired results for regular entry types and layer on top of it the necessary structure to deal with the non regular ones. Normally regular entry types will comprise a large share of the sources anyway, so why change everything, for all entry types, just to be able to handle one or another kind of special source?



    Given this, in the most general case, handling non-standard entry type entails three basic issues:



    • Providing the data structure (entry types, entry fields)


    • Specifying how the entry types should appear in the bibliography (bibdrivers, filtering)


    • Specifying how the citation for these entry types should behave.


    As for the first two, moewe also covers them in the second part of his answer,
    pointing to two good sources on the matter here on the site (Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber?).
    That’s about it. And it is a testimony to biblatex’s capabilities, which was
    designed to be both customizable and extensible.



    But some comments. It is hard to escape from defining a bibdriver for your
    special entry type(s). Well, at least if you want things nicely done
    (theoretically you could always try to hammer / (ab)use one or another existing entry type). Anyway, biblatex offers us a nice user interface with which this can be done without much fuss, so it is highly recommendable to do so.



    As to extending or not the datamodel, the choices are not as clear and will
    depend on your requirements (and taste). In particular, biblatex has some entry types and entry fields readily available for such purposes (entrytypes custom[a-f], entry fields name[a-c], list[a-f], user[a-f] etc.). So, if you only need some few of those, a proper extension of the datamodel may not be needed. Furthermore, if you’d like to use meaningful names for your types and fields, you can map the names of your choice to the existing ones with a sourcemap.



    Another consideration regarding the extension of the data structure to support a special type of source is the portability of your (.bib) data. And, related to this, how much support you will be able to get from existing software for management of your bibliography data (JabRef, Zotero, Mendeley and equivalents and related software) if you like or need those. My view on this matter is that, for less standard types of sources, portability (and software support) is not granted anyway, so I might as well leave portability behind (for these types of entries only!), and go for a meaningful data structure. Time and again I found myself "tayloring" the bibentry data to achieve desired end results for a particular style, resulting in, let’s say, "less than semantic and less than portable" bib data. In my experience, this is particularly true with heavily customized styles or specialized styles, which will be the ones that support your special source type to start with. Every time you resort to this, your data is not really portable anymore. So I choose to separate regular entry types, and keep them portable, letting standard styles handle them, and for the non standard sources/entry types, assuming they will not be portable anyway, I tend to a meaningful / semantic data structure. I keep "portable" and "non portable" data in separate .bib files. However, notice that once you can carry the parallel structure for your special entry types to the style of your choice, that is not particularly restrictive (This is not unrestricted though. To start with, you won’t carry it outside biblatex, which means you won’t carry it outside LaTeX and thus will only be able to achieve pdf, or similar, output).



    How to handle citations then? Citation call-outs are creatures more delicate
    than bibdrivers. To start with because bibdrivers let you have a specific
    structure for each entry type, while citations (normally) require a single
    overall standard structure, whatever the entrytype may be. This point is
    interesting because the first temptation here would be: I can simply redefine
    the relevant citation commands or citation macros to get them to handle my
    special source types. Technically that is true, but it’s not the crux of the
    problem. First we have to figure how our citation call outs should be displayed, and if there is any meaningful way to fit our special sources within the current style citation structure. E.g. would it make any sense to try to fit a decree or a law in an author-year structure? Out of this dilemma, I eventually converged to what I call a "mixed citation style". My usual kind of special sources practically requires a long citation in footnotes, both because the amount of information is usually long enough not to fit the flow of text and because primary/archive sources do not usually reach individually the bibliography (their "container" does). This blends organically with the verbose style (or variants) but also works pretty well with, e.g. authoryear style for the regular entry types, provided I choose properly the citation command for each occasion. I’m not claiming this is the only approach to the problem, quite the contrary would be true, but only that this is the most expedient way to do so I was able to find for my current needs in dealing with non standard sources.



    From a technical point of view, given this perspective, how to deal with
    citations? Given my flexibility requirements, I’ve opted for patching (well, sort of) the cite bibmacro, which offers a reasonable hook for the purpose. This allows us to get the job done for whatever style we happen to choose ex post. (Ok, "whatever" is not completely true, more on this later). My current setup for this is in the form:



    letbibmacrocite:origcite

    renewbibmacro*cite%
    ifcategoryprimary%
    usebibmacroprimary%
    usebibmacrocite:orig


    Of course, you could substitute primary there for legal (or whatever you may choose), just taking care that your set of legal sources entry types are duly added to the corresponding category. (For other techniques for the same
    purpose, see Biblatex - xpatch bibmacro with unbalanced braces).



    This essentially, redefines the cite bibmacro in a way that lets biblatex do what it usually does for regular entry types, but allows you to control separately what happens for your special entry types. That given, you now can exert full control of the citation call-outs, for your special entry types only, through the primary (legal) bibmacro, leaving citations for regular entry types untouched. That’s no small feat, but comes at a cost.



    Some comments on this approach. The patch allows one to have style flexibility
    for the regular entry types, which may or may not be a requirement for
    you. However, even if it’s not, I suggest it still may be interesting because,
    if the structure of the call out is not really adjustable within the current
    citation style logic, you’ll probably see the need to resort to a similar
    conditional (wherever you choose to place it). And, if so, there will not be much difference in
    requirements/limitations at the end of the day. So the patch may well be convenient.
    Any way, as mentioned, redefining the relevant bibmacros and/or the relevant
    citation commands are also options to consider. Defining dedicated citation
    commands too. Patching the citation commands is not, though (See discussion in
    the comments at Biblatex's bibmacros, bibliography drivers, formats - patch or redefine?). This is relevant because the cite bibmacro is not a perfect universal hook, particularly not for comp variants of the standard citation styles (not to mention contributed ones).



    This approach gives us a reasonable flexibility in the choice of the underlying citation style (for regular entrytypes), but it is not quite "style agnostic", and this for two reasons.



    First, given we hijacked the core citation bibmacro in this fashion, it means we are responsible for reimplementing any special features of the citation style on our own for the special entry types (e.g. ibid handling, short vs long formats and so on). And it is hard to do this in a way which is independent of the style...



    Second, not all styles get to build the full citation based solely in the cite bibmacro, not even the standard ones, the comp variants being the most conspicuous examples. (Though I still think this should be quite viable,
    provided you don’t mix regular and non regular entry types in any single
    citation command. This is untested though). Though, in principle, this approach may work with the standard styles and likely with (many?) contributed styles, whether it does or not hangs on this same issue. It must also be sensible (e.g. I don't think this would blend well with numeric or alphabetic, even if it technically works). Anyway, I have been using this with authoryear, authortitle and verbose, alongside their ibid variants quite successfully, without needing to get paranoid when citing any given source (due care is needed of course) and without worrying with any other adjustments beyond the choice of citation style.



    A final touch. If you are like me, you may stumble upon some case where one of
    your non regular source type(s) happens to be published within a regular one, and you’d like to treat it as a special type, because that’s meaningful/important, but still acknowledge the published version. You can do that in a way that is responsive to the citation style being used for the regular entry types by using the cite bibmacro for the regular type within the citation of the non regular one within an entrydata fed with a proper crossref. (moewe, now you know why I was so interested in nested entrydatas a while ago).



    Conceptually, those are my main points. To be somewhat less abstract, I include some key pieces in concrete form. The primary bibmacro, which handles my citations for my primary sources uses mixed interfaces of biblatex (that is, uses a bibdriver to render the citation), and is something similar to:



    newbibmacro*primary%
    ifciteseen
    ifboolexpr
    test ifciteibid
    and
    not test iffirstonpage
    usebibmacrocite:ibid
    ifdriverthefieldentrytype:short
    usedriverthefieldentrytype:short
    usedriverthefieldentrytype
    usedriverthefieldentrytype


    Of course, you don’t have to use mixed interfaces, and could well go with
    regular bibmacros. I happen to think this is specially convenient to be able to get citation call outs for each of my special entry types by simply defining the relevant bibdrivers. Note that the above structure handles both short/long citation forms and ibid, doing so automatically with the corresponding citation styles without any further intervention, given biblatex turns on or off the relevant trackers according to the chosen style.



    My legislation drivers are the following:



    DeclareBibliographyDriverlegislation%
    usebibmacrobibindex%
    usebibmacrobegentry%
    usebibmacrolegislation:typenumber%
    setunitaddcommaspace%
    printdate%
    setunitaddcommaspace%
    printfieldleggov%
    setunitaddcommaspace%
    iffieldundefshorttitle
    printfield[title]title
    printfield[title]shorttitle%
    setunitaddcommaspace%
    iffieldundefpubin

    %
    bibstringin%
    setunitaddspace%
    usebibmacroprimpublishedin%
    %
    newunit
    ifcitation

    printfieldaddendum%
    usebibmacrofinentry

    DeclareBibliographyDriverlegislation:short%
    usebibmacrobibindex%
    usebibmacrobegentry%
    usebibmacrolegislation:typenumber%
    setunitaddcommaspace%
    printshortdate%
    setunitaddcommaspace%
    iffieldundefshortleggov
    printfieldleggov
    printfieldshortleggovisdot%
    setunitaddcommaspace%
    iffieldundefpubin

    %
    bibstringin%
    setunitaddspace%
    usebibmacroprimpublishedin%
    %
    usebibmacrofinentry


    Which require:



    newbibmacro*legislation:typenumber%
    ifboolexpr
    test iffieldundefpubin
    and
    test ifcitation
    and not
    test iffieldundefcrossref
    %
    printtext[bibhyperref:crossref]%
    printfieldlegtype%
    setunitaddspace%
    bibstringnumber%
    setunitaddnbspace%
    printfieldlegnumber%
    %
    printfieldlegtype%
    setunitaddspace%
    bibstringnumber%
    setunitaddnbspace%
    printfieldlegnumber

    newbibmacro*primpublishedin%
    entrydata*strfieldpubin%
    ifentrytypeprimperiodical%
    ifbibliography
    clearfieldurlintro%
    clearfieldurl%
    clearfieldaddendum%
    usedriverthefieldentrytype
    begingroup%
    delimcontextnone%
    usebibmacrocite%
    endgroup%
    setunitaddcommaspace%
    iffieldundefsavedvolume

    iffieldnumsavedvolume
    bibstringjourvoladdnbspace
    %
    printfieldsavedvolume%
    setunitaddcommaspace%
    iffieldundefsavednumber

    iffieldnumsavednumber
    bibstringnumberaddnbspace
    %
    printfieldsavednumber%
    setunitaddcommaspace%
    printsavedpubdate%
    %
    ifbibliography
    usedriverthefieldentrytype
    begingroup%
    delimcontextnone%
    usebibmacrocite%
    endgroup%
    %
    %
    ifboolexpr
    test iffieldpagespostnote
    and
    not test iffieldundefpages
    globaltoggletrueprim:thiscite
    %
    setunitbibpagespunct%
    printfieldpages%



    With this (and assuming the relevant fields are defined in your datamodel), you just have to add all entries of type legislation to the category primary (or legal) to get your citation working for the legislation entrytype (the standard AtEveryCitekey hook should suffice for this).



    To get things done in practice, I just fill out a proper template:



    % legislation
    % "legtype", "legnumber" and "date" are mandatory
    % If "pubin" is not set, does not automatically crossref to any entry, if that's desired use the "crossref" field directly
    @legislationID,
    OPTdocid = ,
    legtype = ,
    legnumber = ,
    OPTleggov = ,
    OPTshortleggov = ,
    date = ,
    OPTtitle = ,
    OPTshorttitle = ,
    OPTpubin = ,
    OPTvolume = ,
    OPTnumber = ,
    OPTpubdate = ,
    OPTpages = ,
    OPTcrossref = ,
    OPTaddendum = ,



    This, of course, does not attend OSCLA or any other reputable citation style for legal sources, it is also not self sufficient code, but hopefully can do as an example for how to use this citation approach more concretely.



    Well, I think those are my thoughts on the matter, as promised. I hope they get to be useful.






    share|improve this answer




















    • 1





      That was an interesting read. Thank you very much.

      – moewe
      Jun 28 '18 at 18:51











    • @moewe I'm glad to share this conceptual structure after demanding so much here on the site (and elsewhere) to get to it. :) I don't think there are any universal answers for this, but I do believe this to be a good summary of the alternatives and trade-offs involved.

      – gusbrs
      Jun 28 '18 at 19:01











    • I really appreciate both your and @moewe taking the time to answer so carefully. Thanks very much!

      – cfr
      Jun 28 '18 at 21:59















    4














    I cannot really say much about best practices on the matter, and neither on
    legal sources in particular. So I guess technically I shouldn’t be
    answering. But I do think I have some input that might be of interest. However, I intend to tackle the question from a somewhat specific perspective: Sharing my thoughts on how to handle non-regular entry types with biblatex, of which legal sources can be considered a particular case.



    My own relation to the problem comes from the need to cite/reference primary
    sources for Economic History research, which means mostly archive sources but may actually be quite diverse stuff. This includes legal sources, but I never really worried much about specific requirements of this type of source. I mention this because some of my choices here do stem from the requirements implied by this, but I do think most of the suggestions bellow are quite flexible (Indeed, "flexibility" is one of my key requirements, for I usually cannot predict in advance the required style for submission of any given work when I start it).



    There is always a range of alternatives to deal with less than standard types of sources. moewe covers this very well in his
    answer, so there is no need for me to reiterate. But a comment on a natural choice may be worth it. Indeed, one of the obvious ways would be to choose a style that handles the particular type of source that we need. My view is that, unless there is a general reason to go for a specialized or heavily customized style, I feel it to be too much to choose it just to support a particular entry type we need. I prefer to stick to my style of choice (usually one of the standard ones), which provides me well with the desired results for regular entry types and layer on top of it the necessary structure to deal with the non regular ones. Normally regular entry types will comprise a large share of the sources anyway, so why change everything, for all entry types, just to be able to handle one or another kind of special source?



    Given this, in the most general case, handling non-standard entry type entails three basic issues:



    • Providing the data structure (entry types, entry fields)


    • Specifying how the entry types should appear in the bibliography (bibdrivers, filtering)


    • Specifying how the citation for these entry types should behave.


    As for the first two, moewe also covers them in the second part of his answer,
    pointing to two good sources on the matter here on the site (Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber?).
    That’s about it. And it is a testimony to biblatex’s capabilities, which was
    designed to be both customizable and extensible.



    But some comments. It is hard to escape from defining a bibdriver for your
    special entry type(s). Well, at least if you want things nicely done
    (theoretically you could always try to hammer / (ab)use one or another existing entry type). Anyway, biblatex offers us a nice user interface with which this can be done without much fuss, so it is highly recommendable to do so.



    As to extending or not the datamodel, the choices are not as clear and will
    depend on your requirements (and taste). In particular, biblatex has some entry types and entry fields readily available for such purposes (entrytypes custom[a-f], entry fields name[a-c], list[a-f], user[a-f] etc.). So, if you only need some few of those, a proper extension of the datamodel may not be needed. Furthermore, if you’d like to use meaningful names for your types and fields, you can map the names of your choice to the existing ones with a sourcemap.



    Another consideration regarding the extension of the data structure to support a special type of source is the portability of your (.bib) data. And, related to this, how much support you will be able to get from existing software for management of your bibliography data (JabRef, Zotero, Mendeley and equivalents and related software) if you like or need those. My view on this matter is that, for less standard types of sources, portability (and software support) is not granted anyway, so I might as well leave portability behind (for these types of entries only!), and go for a meaningful data structure. Time and again I found myself "tayloring" the bibentry data to achieve desired end results for a particular style, resulting in, let’s say, "less than semantic and less than portable" bib data. In my experience, this is particularly true with heavily customized styles or specialized styles, which will be the ones that support your special source type to start with. Every time you resort to this, your data is not really portable anymore. So I choose to separate regular entry types, and keep them portable, letting standard styles handle them, and for the non standard sources/entry types, assuming they will not be portable anyway, I tend to a meaningful / semantic data structure. I keep "portable" and "non portable" data in separate .bib files. However, notice that once you can carry the parallel structure for your special entry types to the style of your choice, that is not particularly restrictive (This is not unrestricted though. To start with, you won’t carry it outside biblatex, which means you won’t carry it outside LaTeX and thus will only be able to achieve pdf, or similar, output).



    How to handle citations then? Citation call-outs are creatures more delicate
    than bibdrivers. To start with because bibdrivers let you have a specific
    structure for each entry type, while citations (normally) require a single
    overall standard structure, whatever the entrytype may be. This point is
    interesting because the first temptation here would be: I can simply redefine
    the relevant citation commands or citation macros to get them to handle my
    special source types. Technically that is true, but it’s not the crux of the
    problem. First we have to figure how our citation call outs should be displayed, and if there is any meaningful way to fit our special sources within the current style citation structure. E.g. would it make any sense to try to fit a decree or a law in an author-year structure? Out of this dilemma, I eventually converged to what I call a "mixed citation style". My usual kind of special sources practically requires a long citation in footnotes, both because the amount of information is usually long enough not to fit the flow of text and because primary/archive sources do not usually reach individually the bibliography (their "container" does). This blends organically with the verbose style (or variants) but also works pretty well with, e.g. authoryear style for the regular entry types, provided I choose properly the citation command for each occasion. I’m not claiming this is the only approach to the problem, quite the contrary would be true, but only that this is the most expedient way to do so I was able to find for my current needs in dealing with non standard sources.



    From a technical point of view, given this perspective, how to deal with
    citations? Given my flexibility requirements, I’ve opted for patching (well, sort of) the cite bibmacro, which offers a reasonable hook for the purpose. This allows us to get the job done for whatever style we happen to choose ex post. (Ok, "whatever" is not completely true, more on this later). My current setup for this is in the form:



    letbibmacrocite:origcite

    renewbibmacro*cite%
    ifcategoryprimary%
    usebibmacroprimary%
    usebibmacrocite:orig


    Of course, you could substitute primary there for legal (or whatever you may choose), just taking care that your set of legal sources entry types are duly added to the corresponding category. (For other techniques for the same
    purpose, see Biblatex - xpatch bibmacro with unbalanced braces).



    This essentially, redefines the cite bibmacro in a way that lets biblatex do what it usually does for regular entry types, but allows you to control separately what happens for your special entry types. That given, you now can exert full control of the citation call-outs, for your special entry types only, through the primary (legal) bibmacro, leaving citations for regular entry types untouched. That’s no small feat, but comes at a cost.



    Some comments on this approach. The patch allows one to have style flexibility
    for the regular entry types, which may or may not be a requirement for
    you. However, even if it’s not, I suggest it still may be interesting because,
    if the structure of the call out is not really adjustable within the current
    citation style logic, you’ll probably see the need to resort to a similar
    conditional (wherever you choose to place it). And, if so, there will not be much difference in
    requirements/limitations at the end of the day. So the patch may well be convenient.
    Any way, as mentioned, redefining the relevant bibmacros and/or the relevant
    citation commands are also options to consider. Defining dedicated citation
    commands too. Patching the citation commands is not, though (See discussion in
    the comments at Biblatex's bibmacros, bibliography drivers, formats - patch or redefine?). This is relevant because the cite bibmacro is not a perfect universal hook, particularly not for comp variants of the standard citation styles (not to mention contributed ones).



    This approach gives us a reasonable flexibility in the choice of the underlying citation style (for regular entrytypes), but it is not quite "style agnostic", and this for two reasons.



    First, given we hijacked the core citation bibmacro in this fashion, it means we are responsible for reimplementing any special features of the citation style on our own for the special entry types (e.g. ibid handling, short vs long formats and so on). And it is hard to do this in a way which is independent of the style...



    Second, not all styles get to build the full citation based solely in the cite bibmacro, not even the standard ones, the comp variants being the most conspicuous examples. (Though I still think this should be quite viable,
    provided you don’t mix regular and non regular entry types in any single
    citation command. This is untested though). Though, in principle, this approach may work with the standard styles and likely with (many?) contributed styles, whether it does or not hangs on this same issue. It must also be sensible (e.g. I don't think this would blend well with numeric or alphabetic, even if it technically works). Anyway, I have been using this with authoryear, authortitle and verbose, alongside their ibid variants quite successfully, without needing to get paranoid when citing any given source (due care is needed of course) and without worrying with any other adjustments beyond the choice of citation style.



    A final touch. If you are like me, you may stumble upon some case where one of
    your non regular source type(s) happens to be published within a regular one, and you’d like to treat it as a special type, because that’s meaningful/important, but still acknowledge the published version. You can do that in a way that is responsive to the citation style being used for the regular entry types by using the cite bibmacro for the regular type within the citation of the non regular one within an entrydata fed with a proper crossref. (moewe, now you know why I was so interested in nested entrydatas a while ago).



    Conceptually, those are my main points. To be somewhat less abstract, I include some key pieces in concrete form. The primary bibmacro, which handles my citations for my primary sources uses mixed interfaces of biblatex (that is, uses a bibdriver to render the citation), and is something similar to:



    newbibmacro*primary%
    ifciteseen
    ifboolexpr
    test ifciteibid
    and
    not test iffirstonpage
    usebibmacrocite:ibid
    ifdriverthefieldentrytype:short
    usedriverthefieldentrytype:short
    usedriverthefieldentrytype
    usedriverthefieldentrytype


    Of course, you don’t have to use mixed interfaces, and could well go with
    regular bibmacros. I happen to think this is specially convenient to be able to get citation call outs for each of my special entry types by simply defining the relevant bibdrivers. Note that the above structure handles both short/long citation forms and ibid, doing so automatically with the corresponding citation styles without any further intervention, given biblatex turns on or off the relevant trackers according to the chosen style.



    My legislation drivers are the following:



    DeclareBibliographyDriverlegislation%
    usebibmacrobibindex%
    usebibmacrobegentry%
    usebibmacrolegislation:typenumber%
    setunitaddcommaspace%
    printdate%
    setunitaddcommaspace%
    printfieldleggov%
    setunitaddcommaspace%
    iffieldundefshorttitle
    printfield[title]title
    printfield[title]shorttitle%
    setunitaddcommaspace%
    iffieldundefpubin

    %
    bibstringin%
    setunitaddspace%
    usebibmacroprimpublishedin%
    %
    newunit
    ifcitation

    printfieldaddendum%
    usebibmacrofinentry

    DeclareBibliographyDriverlegislation:short%
    usebibmacrobibindex%
    usebibmacrobegentry%
    usebibmacrolegislation:typenumber%
    setunitaddcommaspace%
    printshortdate%
    setunitaddcommaspace%
    iffieldundefshortleggov
    printfieldleggov
    printfieldshortleggovisdot%
    setunitaddcommaspace%
    iffieldundefpubin

    %
    bibstringin%
    setunitaddspace%
    usebibmacroprimpublishedin%
    %
    usebibmacrofinentry


    Which require:



    newbibmacro*legislation:typenumber%
    ifboolexpr
    test iffieldundefpubin
    and
    test ifcitation
    and not
    test iffieldundefcrossref
    %
    printtext[bibhyperref:crossref]%
    printfieldlegtype%
    setunitaddspace%
    bibstringnumber%
    setunitaddnbspace%
    printfieldlegnumber%
    %
    printfieldlegtype%
    setunitaddspace%
    bibstringnumber%
    setunitaddnbspace%
    printfieldlegnumber

    newbibmacro*primpublishedin%
    entrydata*strfieldpubin%
    ifentrytypeprimperiodical%
    ifbibliography
    clearfieldurlintro%
    clearfieldurl%
    clearfieldaddendum%
    usedriverthefieldentrytype
    begingroup%
    delimcontextnone%
    usebibmacrocite%
    endgroup%
    setunitaddcommaspace%
    iffieldundefsavedvolume

    iffieldnumsavedvolume
    bibstringjourvoladdnbspace
    %
    printfieldsavedvolume%
    setunitaddcommaspace%
    iffieldundefsavednumber

    iffieldnumsavednumber
    bibstringnumberaddnbspace
    %
    printfieldsavednumber%
    setunitaddcommaspace%
    printsavedpubdate%
    %
    ifbibliography
    usedriverthefieldentrytype
    begingroup%
    delimcontextnone%
    usebibmacrocite%
    endgroup%
    %
    %
    ifboolexpr
    test iffieldpagespostnote
    and
    not test iffieldundefpages
    globaltoggletrueprim:thiscite
    %
    setunitbibpagespunct%
    printfieldpages%



    With this (and assuming the relevant fields are defined in your datamodel), you just have to add all entries of type legislation to the category primary (or legal) to get your citation working for the legislation entrytype (the standard AtEveryCitekey hook should suffice for this).



    To get things done in practice, I just fill out a proper template:



    % legislation
    % "legtype", "legnumber" and "date" are mandatory
    % If "pubin" is not set, does not automatically crossref to any entry, if that's desired use the "crossref" field directly
    @legislationID,
    OPTdocid = ,
    legtype = ,
    legnumber = ,
    OPTleggov = ,
    OPTshortleggov = ,
    date = ,
    OPTtitle = ,
    OPTshorttitle = ,
    OPTpubin = ,
    OPTvolume = ,
    OPTnumber = ,
    OPTpubdate = ,
    OPTpages = ,
    OPTcrossref = ,
    OPTaddendum = ,



    This, of course, does not attend OSCLA or any other reputable citation style for legal sources, it is also not self sufficient code, but hopefully can do as an example for how to use this citation approach more concretely.



    Well, I think those are my thoughts on the matter, as promised. I hope they get to be useful.






    share|improve this answer




















    • 1





      That was an interesting read. Thank you very much.

      – moewe
      Jun 28 '18 at 18:51











    • @moewe I'm glad to share this conceptual structure after demanding so much here on the site (and elsewhere) to get to it. :) I don't think there are any universal answers for this, but I do believe this to be a good summary of the alternatives and trade-offs involved.

      – gusbrs
      Jun 28 '18 at 19:01











    • I really appreciate both your and @moewe taking the time to answer so carefully. Thanks very much!

      – cfr
      Jun 28 '18 at 21:59













    4












    4








    4







    I cannot really say much about best practices on the matter, and neither on
    legal sources in particular. So I guess technically I shouldn’t be
    answering. But I do think I have some input that might be of interest. However, I intend to tackle the question from a somewhat specific perspective: Sharing my thoughts on how to handle non-regular entry types with biblatex, of which legal sources can be considered a particular case.



    My own relation to the problem comes from the need to cite/reference primary
    sources for Economic History research, which means mostly archive sources but may actually be quite diverse stuff. This includes legal sources, but I never really worried much about specific requirements of this type of source. I mention this because some of my choices here do stem from the requirements implied by this, but I do think most of the suggestions bellow are quite flexible (Indeed, "flexibility" is one of my key requirements, for I usually cannot predict in advance the required style for submission of any given work when I start it).



    There is always a range of alternatives to deal with less than standard types of sources. moewe covers this very well in his
    answer, so there is no need for me to reiterate. But a comment on a natural choice may be worth it. Indeed, one of the obvious ways would be to choose a style that handles the particular type of source that we need. My view is that, unless there is a general reason to go for a specialized or heavily customized style, I feel it to be too much to choose it just to support a particular entry type we need. I prefer to stick to my style of choice (usually one of the standard ones), which provides me well with the desired results for regular entry types and layer on top of it the necessary structure to deal with the non regular ones. Normally regular entry types will comprise a large share of the sources anyway, so why change everything, for all entry types, just to be able to handle one or another kind of special source?



    Given this, in the most general case, handling non-standard entry type entails three basic issues:



    • Providing the data structure (entry types, entry fields)


    • Specifying how the entry types should appear in the bibliography (bibdrivers, filtering)


    • Specifying how the citation for these entry types should behave.


    As for the first two, moewe also covers them in the second part of his answer,
    pointing to two good sources on the matter here on the site (Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber?).
    That’s about it. And it is a testimony to biblatex’s capabilities, which was
    designed to be both customizable and extensible.



    But some comments. It is hard to escape from defining a bibdriver for your
    special entry type(s). Well, at least if you want things nicely done
    (theoretically you could always try to hammer / (ab)use one or another existing entry type). Anyway, biblatex offers us a nice user interface with which this can be done without much fuss, so it is highly recommendable to do so.



    As to extending or not the datamodel, the choices are not as clear and will
    depend on your requirements (and taste). In particular, biblatex has some entry types and entry fields readily available for such purposes (entrytypes custom[a-f], entry fields name[a-c], list[a-f], user[a-f] etc.). So, if you only need some few of those, a proper extension of the datamodel may not be needed. Furthermore, if you’d like to use meaningful names for your types and fields, you can map the names of your choice to the existing ones with a sourcemap.



    Another consideration regarding the extension of the data structure to support a special type of source is the portability of your (.bib) data. And, related to this, how much support you will be able to get from existing software for management of your bibliography data (JabRef, Zotero, Mendeley and equivalents and related software) if you like or need those. My view on this matter is that, for less standard types of sources, portability (and software support) is not granted anyway, so I might as well leave portability behind (for these types of entries only!), and go for a meaningful data structure. Time and again I found myself "tayloring" the bibentry data to achieve desired end results for a particular style, resulting in, let’s say, "less than semantic and less than portable" bib data. In my experience, this is particularly true with heavily customized styles or specialized styles, which will be the ones that support your special source type to start with. Every time you resort to this, your data is not really portable anymore. So I choose to separate regular entry types, and keep them portable, letting standard styles handle them, and for the non standard sources/entry types, assuming they will not be portable anyway, I tend to a meaningful / semantic data structure. I keep "portable" and "non portable" data in separate .bib files. However, notice that once you can carry the parallel structure for your special entry types to the style of your choice, that is not particularly restrictive (This is not unrestricted though. To start with, you won’t carry it outside biblatex, which means you won’t carry it outside LaTeX and thus will only be able to achieve pdf, or similar, output).



    How to handle citations then? Citation call-outs are creatures more delicate
    than bibdrivers. To start with because bibdrivers let you have a specific
    structure for each entry type, while citations (normally) require a single
    overall standard structure, whatever the entrytype may be. This point is
    interesting because the first temptation here would be: I can simply redefine
    the relevant citation commands or citation macros to get them to handle my
    special source types. Technically that is true, but it’s not the crux of the
    problem. First we have to figure how our citation call outs should be displayed, and if there is any meaningful way to fit our special sources within the current style citation structure. E.g. would it make any sense to try to fit a decree or a law in an author-year structure? Out of this dilemma, I eventually converged to what I call a "mixed citation style". My usual kind of special sources practically requires a long citation in footnotes, both because the amount of information is usually long enough not to fit the flow of text and because primary/archive sources do not usually reach individually the bibliography (their "container" does). This blends organically with the verbose style (or variants) but also works pretty well with, e.g. authoryear style for the regular entry types, provided I choose properly the citation command for each occasion. I’m not claiming this is the only approach to the problem, quite the contrary would be true, but only that this is the most expedient way to do so I was able to find for my current needs in dealing with non standard sources.



    From a technical point of view, given this perspective, how to deal with
    citations? Given my flexibility requirements, I’ve opted for patching (well, sort of) the cite bibmacro, which offers a reasonable hook for the purpose. This allows us to get the job done for whatever style we happen to choose ex post. (Ok, "whatever" is not completely true, more on this later). My current setup for this is in the form:



    letbibmacrocite:origcite

    renewbibmacro*cite%
    ifcategoryprimary%
    usebibmacroprimary%
    usebibmacrocite:orig


    Of course, you could substitute primary there for legal (or whatever you may choose), just taking care that your set of legal sources entry types are duly added to the corresponding category. (For other techniques for the same
    purpose, see Biblatex - xpatch bibmacro with unbalanced braces).



    This essentially, redefines the cite bibmacro in a way that lets biblatex do what it usually does for regular entry types, but allows you to control separately what happens for your special entry types. That given, you now can exert full control of the citation call-outs, for your special entry types only, through the primary (legal) bibmacro, leaving citations for regular entry types untouched. That’s no small feat, but comes at a cost.



    Some comments on this approach. The patch allows one to have style flexibility
    for the regular entry types, which may or may not be a requirement for
    you. However, even if it’s not, I suggest it still may be interesting because,
    if the structure of the call out is not really adjustable within the current
    citation style logic, you’ll probably see the need to resort to a similar
    conditional (wherever you choose to place it). And, if so, there will not be much difference in
    requirements/limitations at the end of the day. So the patch may well be convenient.
    Any way, as mentioned, redefining the relevant bibmacros and/or the relevant
    citation commands are also options to consider. Defining dedicated citation
    commands too. Patching the citation commands is not, though (See discussion in
    the comments at Biblatex's bibmacros, bibliography drivers, formats - patch or redefine?). This is relevant because the cite bibmacro is not a perfect universal hook, particularly not for comp variants of the standard citation styles (not to mention contributed ones).



    This approach gives us a reasonable flexibility in the choice of the underlying citation style (for regular entrytypes), but it is not quite "style agnostic", and this for two reasons.



    First, given we hijacked the core citation bibmacro in this fashion, it means we are responsible for reimplementing any special features of the citation style on our own for the special entry types (e.g. ibid handling, short vs long formats and so on). And it is hard to do this in a way which is independent of the style...



    Second, not all styles get to build the full citation based solely in the cite bibmacro, not even the standard ones, the comp variants being the most conspicuous examples. (Though I still think this should be quite viable,
    provided you don’t mix regular and non regular entry types in any single
    citation command. This is untested though). Though, in principle, this approach may work with the standard styles and likely with (many?) contributed styles, whether it does or not hangs on this same issue. It must also be sensible (e.g. I don't think this would blend well with numeric or alphabetic, even if it technically works). Anyway, I have been using this with authoryear, authortitle and verbose, alongside their ibid variants quite successfully, without needing to get paranoid when citing any given source (due care is needed of course) and without worrying with any other adjustments beyond the choice of citation style.



    A final touch. If you are like me, you may stumble upon some case where one of
    your non regular source type(s) happens to be published within a regular one, and you’d like to treat it as a special type, because that’s meaningful/important, but still acknowledge the published version. You can do that in a way that is responsive to the citation style being used for the regular entry types by using the cite bibmacro for the regular type within the citation of the non regular one within an entrydata fed with a proper crossref. (moewe, now you know why I was so interested in nested entrydatas a while ago).



    Conceptually, those are my main points. To be somewhat less abstract, I include some key pieces in concrete form. The primary bibmacro, which handles my citations for my primary sources uses mixed interfaces of biblatex (that is, uses a bibdriver to render the citation), and is something similar to:



    newbibmacro*primary%
    ifciteseen
    ifboolexpr
    test ifciteibid
    and
    not test iffirstonpage
    usebibmacrocite:ibid
    ifdriverthefieldentrytype:short
    usedriverthefieldentrytype:short
    usedriverthefieldentrytype
    usedriverthefieldentrytype


    Of course, you don’t have to use mixed interfaces, and could well go with
    regular bibmacros. I happen to think this is specially convenient to be able to get citation call outs for each of my special entry types by simply defining the relevant bibdrivers. Note that the above structure handles both short/long citation forms and ibid, doing so automatically with the corresponding citation styles without any further intervention, given biblatex turns on or off the relevant trackers according to the chosen style.



    My legislation drivers are the following:



    DeclareBibliographyDriverlegislation%
    usebibmacrobibindex%
    usebibmacrobegentry%
    usebibmacrolegislation:typenumber%
    setunitaddcommaspace%
    printdate%
    setunitaddcommaspace%
    printfieldleggov%
    setunitaddcommaspace%
    iffieldundefshorttitle
    printfield[title]title
    printfield[title]shorttitle%
    setunitaddcommaspace%
    iffieldundefpubin

    %
    bibstringin%
    setunitaddspace%
    usebibmacroprimpublishedin%
    %
    newunit
    ifcitation

    printfieldaddendum%
    usebibmacrofinentry

    DeclareBibliographyDriverlegislation:short%
    usebibmacrobibindex%
    usebibmacrobegentry%
    usebibmacrolegislation:typenumber%
    setunitaddcommaspace%
    printshortdate%
    setunitaddcommaspace%
    iffieldundefshortleggov
    printfieldleggov
    printfieldshortleggovisdot%
    setunitaddcommaspace%
    iffieldundefpubin

    %
    bibstringin%
    setunitaddspace%
    usebibmacroprimpublishedin%
    %
    usebibmacrofinentry


    Which require:



    newbibmacro*legislation:typenumber%
    ifboolexpr
    test iffieldundefpubin
    and
    test ifcitation
    and not
    test iffieldundefcrossref
    %
    printtext[bibhyperref:crossref]%
    printfieldlegtype%
    setunitaddspace%
    bibstringnumber%
    setunitaddnbspace%
    printfieldlegnumber%
    %
    printfieldlegtype%
    setunitaddspace%
    bibstringnumber%
    setunitaddnbspace%
    printfieldlegnumber

    newbibmacro*primpublishedin%
    entrydata*strfieldpubin%
    ifentrytypeprimperiodical%
    ifbibliography
    clearfieldurlintro%
    clearfieldurl%
    clearfieldaddendum%
    usedriverthefieldentrytype
    begingroup%
    delimcontextnone%
    usebibmacrocite%
    endgroup%
    setunitaddcommaspace%
    iffieldundefsavedvolume

    iffieldnumsavedvolume
    bibstringjourvoladdnbspace
    %
    printfieldsavedvolume%
    setunitaddcommaspace%
    iffieldundefsavednumber

    iffieldnumsavednumber
    bibstringnumberaddnbspace
    %
    printfieldsavednumber%
    setunitaddcommaspace%
    printsavedpubdate%
    %
    ifbibliography
    usedriverthefieldentrytype
    begingroup%
    delimcontextnone%
    usebibmacrocite%
    endgroup%
    %
    %
    ifboolexpr
    test iffieldpagespostnote
    and
    not test iffieldundefpages
    globaltoggletrueprim:thiscite
    %
    setunitbibpagespunct%
    printfieldpages%



    With this (and assuming the relevant fields are defined in your datamodel), you just have to add all entries of type legislation to the category primary (or legal) to get your citation working for the legislation entrytype (the standard AtEveryCitekey hook should suffice for this).



    To get things done in practice, I just fill out a proper template:



    % legislation
    % "legtype", "legnumber" and "date" are mandatory
    % If "pubin" is not set, does not automatically crossref to any entry, if that's desired use the "crossref" field directly
    @legislationID,
    OPTdocid = ,
    legtype = ,
    legnumber = ,
    OPTleggov = ,
    OPTshortleggov = ,
    date = ,
    OPTtitle = ,
    OPTshorttitle = ,
    OPTpubin = ,
    OPTvolume = ,
    OPTnumber = ,
    OPTpubdate = ,
    OPTpages = ,
    OPTcrossref = ,
    OPTaddendum = ,



    This, of course, does not attend OSCLA or any other reputable citation style for legal sources, it is also not self sufficient code, but hopefully can do as an example for how to use this citation approach more concretely.



    Well, I think those are my thoughts on the matter, as promised. I hope they get to be useful.






    share|improve this answer















    I cannot really say much about best practices on the matter, and neither on
    legal sources in particular. So I guess technically I shouldn’t be
    answering. But I do think I have some input that might be of interest. However, I intend to tackle the question from a somewhat specific perspective: Sharing my thoughts on how to handle non-regular entry types with biblatex, of which legal sources can be considered a particular case.



    My own relation to the problem comes from the need to cite/reference primary
    sources for Economic History research, which means mostly archive sources but may actually be quite diverse stuff. This includes legal sources, but I never really worried much about specific requirements of this type of source. I mention this because some of my choices here do stem from the requirements implied by this, but I do think most of the suggestions bellow are quite flexible (Indeed, "flexibility" is one of my key requirements, for I usually cannot predict in advance the required style for submission of any given work when I start it).



    There is always a range of alternatives to deal with less than standard types of sources. moewe covers this very well in his
    answer, so there is no need for me to reiterate. But a comment on a natural choice may be worth it. Indeed, one of the obvious ways would be to choose a style that handles the particular type of source that we need. My view is that, unless there is a general reason to go for a specialized or heavily customized style, I feel it to be too much to choose it just to support a particular entry type we need. I prefer to stick to my style of choice (usually one of the standard ones), which provides me well with the desired results for regular entry types and layer on top of it the necessary structure to deal with the non regular ones. Normally regular entry types will comprise a large share of the sources anyway, so why change everything, for all entry types, just to be able to handle one or another kind of special source?



    Given this, in the most general case, handling non-standard entry type entails three basic issues:



    • Providing the data structure (entry types, entry fields)


    • Specifying how the entry types should appear in the bibliography (bibdrivers, filtering)


    • Specifying how the citation for these entry types should behave.


    As for the first two, moewe also covers them in the second part of his answer,
    pointing to two good sources on the matter here on the site (Creating Entry in Bibtex for Executive Orders and How can I create entirely new data types with BibLaTeX/Biber?).
    That’s about it. And it is a testimony to biblatex’s capabilities, which was
    designed to be both customizable and extensible.



    But some comments. It is hard to escape from defining a bibdriver for your
    special entry type(s). Well, at least if you want things nicely done
    (theoretically you could always try to hammer / (ab)use one or another existing entry type). Anyway, biblatex offers us a nice user interface with which this can be done without much fuss, so it is highly recommendable to do so.



    As to extending or not the datamodel, the choices are not as clear and will
    depend on your requirements (and taste). In particular, biblatex has some entry types and entry fields readily available for such purposes (entrytypes custom[a-f], entry fields name[a-c], list[a-f], user[a-f] etc.). So, if you only need some few of those, a proper extension of the datamodel may not be needed. Furthermore, if you’d like to use meaningful names for your types and fields, you can map the names of your choice to the existing ones with a sourcemap.



    Another consideration regarding the extension of the data structure to support a special type of source is the portability of your (.bib) data. And, related to this, how much support you will be able to get from existing software for management of your bibliography data (JabRef, Zotero, Mendeley and equivalents and related software) if you like or need those. My view on this matter is that, for less standard types of sources, portability (and software support) is not granted anyway, so I might as well leave portability behind (for these types of entries only!), and go for a meaningful data structure. Time and again I found myself "tayloring" the bibentry data to achieve desired end results for a particular style, resulting in, let’s say, "less than semantic and less than portable" bib data. In my experience, this is particularly true with heavily customized styles or specialized styles, which will be the ones that support your special source type to start with. Every time you resort to this, your data is not really portable anymore. So I choose to separate regular entry types, and keep them portable, letting standard styles handle them, and for the non standard sources/entry types, assuming they will not be portable anyway, I tend to a meaningful / semantic data structure. I keep "portable" and "non portable" data in separate .bib files. However, notice that once you can carry the parallel structure for your special entry types to the style of your choice, that is not particularly restrictive (This is not unrestricted though. To start with, you won’t carry it outside biblatex, which means you won’t carry it outside LaTeX and thus will only be able to achieve pdf, or similar, output).



    How to handle citations then? Citation call-outs are creatures more delicate
    than bibdrivers. To start with because bibdrivers let you have a specific
    structure for each entry type, while citations (normally) require a single
    overall standard structure, whatever the entrytype may be. This point is
    interesting because the first temptation here would be: I can simply redefine
    the relevant citation commands or citation macros to get them to handle my
    special source types. Technically that is true, but it’s not the crux of the
    problem. First we have to figure how our citation call outs should be displayed, and if there is any meaningful way to fit our special sources within the current style citation structure. E.g. would it make any sense to try to fit a decree or a law in an author-year structure? Out of this dilemma, I eventually converged to what I call a "mixed citation style". My usual kind of special sources practically requires a long citation in footnotes, both because the amount of information is usually long enough not to fit the flow of text and because primary/archive sources do not usually reach individually the bibliography (their "container" does). This blends organically with the verbose style (or variants) but also works pretty well with, e.g. authoryear style for the regular entry types, provided I choose properly the citation command for each occasion. I’m not claiming this is the only approach to the problem, quite the contrary would be true, but only that this is the most expedient way to do so I was able to find for my current needs in dealing with non standard sources.



    From a technical point of view, given this perspective, how to deal with
    citations? Given my flexibility requirements, I’ve opted for patching (well, sort of) the cite bibmacro, which offers a reasonable hook for the purpose. This allows us to get the job done for whatever style we happen to choose ex post. (Ok, "whatever" is not completely true, more on this later). My current setup for this is in the form:



    letbibmacrocite:origcite

    renewbibmacro*cite%
    ifcategoryprimary%
    usebibmacroprimary%
    usebibmacrocite:orig


    Of course, you could substitute primary there for legal (or whatever you may choose), just taking care that your set of legal sources entry types are duly added to the corresponding category. (For other techniques for the same
    purpose, see Biblatex - xpatch bibmacro with unbalanced braces).



    This essentially, redefines the cite bibmacro in a way that lets biblatex do what it usually does for regular entry types, but allows you to control separately what happens for your special entry types. That given, you now can exert full control of the citation call-outs, for your special entry types only, through the primary (legal) bibmacro, leaving citations for regular entry types untouched. That’s no small feat, but comes at a cost.



    Some comments on this approach. The patch allows one to have style flexibility
    for the regular entry types, which may or may not be a requirement for
    you. However, even if it’s not, I suggest it still may be interesting because,
    if the structure of the call out is not really adjustable within the current
    citation style logic, you’ll probably see the need to resort to a similar
    conditional (wherever you choose to place it). And, if so, there will not be much difference in
    requirements/limitations at the end of the day. So the patch may well be convenient.
    Any way, as mentioned, redefining the relevant bibmacros and/or the relevant
    citation commands are also options to consider. Defining dedicated citation
    commands too. Patching the citation commands is not, though (See discussion in
    the comments at Biblatex's bibmacros, bibliography drivers, formats - patch or redefine?). This is relevant because the cite bibmacro is not a perfect universal hook, particularly not for comp variants of the standard citation styles (not to mention contributed ones).



    This approach gives us a reasonable flexibility in the choice of the underlying citation style (for regular entrytypes), but it is not quite "style agnostic", and this for two reasons.



    First, given we hijacked the core citation bibmacro in this fashion, it means we are responsible for reimplementing any special features of the citation style on our own for the special entry types (e.g. ibid handling, short vs long formats and so on). And it is hard to do this in a way which is independent of the style...



    Second, not all styles get to build the full citation based solely in the cite bibmacro, not even the standard ones, the comp variants being the most conspicuous examples. (Though I still think this should be quite viable,
    provided you don’t mix regular and non regular entry types in any single
    citation command. This is untested though). Though, in principle, this approach may work with the standard styles and likely with (many?) contributed styles, whether it does or not hangs on this same issue. It must also be sensible (e.g. I don't think this would blend well with numeric or alphabetic, even if it technically works). Anyway, I have been using this with authoryear, authortitle and verbose, alongside their ibid variants quite successfully, without needing to get paranoid when citing any given source (due care is needed of course) and without worrying with any other adjustments beyond the choice of citation style.



    A final touch. If you are like me, you may stumble upon some case where one of
    your non regular source type(s) happens to be published within a regular one, and you’d like to treat it as a special type, because that’s meaningful/important, but still acknowledge the published version. You can do that in a way that is responsive to the citation style being used for the regular entry types by using the cite bibmacro for the regular type within the citation of the non regular one within an entrydata fed with a proper crossref. (moewe, now you know why I was so interested in nested entrydatas a while ago).



    Conceptually, those are my main points. To be somewhat less abstract, I include some key pieces in concrete form. The primary bibmacro, which handles my citations for my primary sources uses mixed interfaces of biblatex (that is, uses a bibdriver to render the citation), and is something similar to:



    newbibmacro*primary%
    ifciteseen
    ifboolexpr
    test ifciteibid
    and
    not test iffirstonpage
    usebibmacrocite:ibid
    ifdriverthefieldentrytype:short
    usedriverthefieldentrytype:short
    usedriverthefieldentrytype
    usedriverthefieldentrytype


    Of course, you don’t have to use mixed interfaces, and could well go with
    regular bibmacros. I happen to think this is specially convenient to be able to get citation call outs for each of my special entry types by simply defining the relevant bibdrivers. Note that the above structure handles both short/long citation forms and ibid, doing so automatically with the corresponding citation styles without any further intervention, given biblatex turns on or off the relevant trackers according to the chosen style.



    My legislation drivers are the following:



    DeclareBibliographyDriverlegislation%
    usebibmacrobibindex%
    usebibmacrobegentry%
    usebibmacrolegislation:typenumber%
    setunitaddcommaspace%
    printdate%
    setunitaddcommaspace%
    printfieldleggov%
    setunitaddcommaspace%
    iffieldundefshorttitle
    printfield[title]title
    printfield[title]shorttitle%
    setunitaddcommaspace%
    iffieldundefpubin

    %
    bibstringin%
    setunitaddspace%
    usebibmacroprimpublishedin%
    %
    newunit
    ifcitation

    printfieldaddendum%
    usebibmacrofinentry

    DeclareBibliographyDriverlegislation:short%
    usebibmacrobibindex%
    usebibmacrobegentry%
    usebibmacrolegislation:typenumber%
    setunitaddcommaspace%
    printshortdate%
    setunitaddcommaspace%
    iffieldundefshortleggov
    printfieldleggov
    printfieldshortleggovisdot%
    setunitaddcommaspace%
    iffieldundefpubin

    %
    bibstringin%
    setunitaddspace%
    usebibmacroprimpublishedin%
    %
    usebibmacrofinentry


    Which require:



    newbibmacro*legislation:typenumber%
    ifboolexpr
    test iffieldundefpubin
    and
    test ifcitation
    and not
    test iffieldundefcrossref
    %
    printtext[bibhyperref:crossref]%
    printfieldlegtype%
    setunitaddspace%
    bibstringnumber%
    setunitaddnbspace%
    printfieldlegnumber%
    %
    printfieldlegtype%
    setunitaddspace%
    bibstringnumber%
    setunitaddnbspace%
    printfieldlegnumber

    newbibmacro*primpublishedin%
    entrydata*strfieldpubin%
    ifentrytypeprimperiodical%
    ifbibliography
    clearfieldurlintro%
    clearfieldurl%
    clearfieldaddendum%
    usedriverthefieldentrytype
    begingroup%
    delimcontextnone%
    usebibmacrocite%
    endgroup%
    setunitaddcommaspace%
    iffieldundefsavedvolume

    iffieldnumsavedvolume
    bibstringjourvoladdnbspace
    %
    printfieldsavedvolume%
    setunitaddcommaspace%
    iffieldundefsavednumber

    iffieldnumsavednumber
    bibstringnumberaddnbspace
    %
    printfieldsavednumber%
    setunitaddcommaspace%
    printsavedpubdate%
    %
    ifbibliography
    usedriverthefieldentrytype
    begingroup%
    delimcontextnone%
    usebibmacrocite%
    endgroup%
    %
    %
    ifboolexpr
    test iffieldpagespostnote
    and
    not test iffieldundefpages
    globaltoggletrueprim:thiscite
    %
    setunitbibpagespunct%
    printfieldpages%



    With this (and assuming the relevant fields are defined in your datamodel), you just have to add all entries of type legislation to the category primary (or legal) to get your citation working for the legislation entrytype (the standard AtEveryCitekey hook should suffice for this).



    To get things done in practice, I just fill out a proper template:



    % legislation
    % "legtype", "legnumber" and "date" are mandatory
    % If "pubin" is not set, does not automatically crossref to any entry, if that's desired use the "crossref" field directly
    @legislationID,
    OPTdocid = ,
    legtype = ,
    legnumber = ,
    OPTleggov = ,
    OPTshortleggov = ,
    date = ,
    OPTtitle = ,
    OPTshorttitle = ,
    OPTpubin = ,
    OPTvolume = ,
    OPTnumber = ,
    OPTpubdate = ,
    OPTpages = ,
    OPTcrossref = ,
    OPTaddendum = ,



    This, of course, does not attend OSCLA or any other reputable citation style for legal sources, it is also not self sufficient code, but hopefully can do as an example for how to use this citation approach more concretely.



    Well, I think those are my thoughts on the matter, as promised. I hope they get to be useful.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jun 29 '18 at 0:37

























    answered Jun 28 '18 at 18:45









    gusbrsgusbrs

    8,0342841




    8,0342841







    • 1





      That was an interesting read. Thank you very much.

      – moewe
      Jun 28 '18 at 18:51











    • @moewe I'm glad to share this conceptual structure after demanding so much here on the site (and elsewhere) to get to it. :) I don't think there are any universal answers for this, but I do believe this to be a good summary of the alternatives and trade-offs involved.

      – gusbrs
      Jun 28 '18 at 19:01











    • I really appreciate both your and @moewe taking the time to answer so carefully. Thanks very much!

      – cfr
      Jun 28 '18 at 21:59












    • 1





      That was an interesting read. Thank you very much.

      – moewe
      Jun 28 '18 at 18:51











    • @moewe I'm glad to share this conceptual structure after demanding so much here on the site (and elsewhere) to get to it. :) I don't think there are any universal answers for this, but I do believe this to be a good summary of the alternatives and trade-offs involved.

      – gusbrs
      Jun 28 '18 at 19:01











    • I really appreciate both your and @moewe taking the time to answer so carefully. Thanks very much!

      – cfr
      Jun 28 '18 at 21:59







    1




    1





    That was an interesting read. Thank you very much.

    – moewe
    Jun 28 '18 at 18:51





    That was an interesting read. Thank you very much.

    – moewe
    Jun 28 '18 at 18:51













    @moewe I'm glad to share this conceptual structure after demanding so much here on the site (and elsewhere) to get to it. :) I don't think there are any universal answers for this, but I do believe this to be a good summary of the alternatives and trade-offs involved.

    – gusbrs
    Jun 28 '18 at 19:01





    @moewe I'm glad to share this conceptual structure after demanding so much here on the site (and elsewhere) to get to it. :) I don't think there are any universal answers for this, but I do believe this to be a good summary of the alternatives and trade-offs involved.

    – gusbrs
    Jun 28 '18 at 19:01













    I really appreciate both your and @moewe taking the time to answer so carefully. Thanks very much!

    – cfr
    Jun 28 '18 at 21:59





    I really appreciate both your and @moewe taking the time to answer so carefully. Thanks very much!

    – cfr
    Jun 28 '18 at 21:59











    1














    Use the oxnotes biblatex style. It does quite a good and robust job and has a sufficiently nuanced presentation. The laser-scapel precision of a full OSCOLA compliance is not really required outside a legal forum.



    You were almost there in the MWE. Some additional adjustments:



    In the bib file, for cases, put the case reference in the number field. This will handle both hardcopy and electronic law reports. For printed cases, page ranges are not required.



    For legislation, do not use an author field. Having the year in the footnote is sufficient.



    In the text, use autocite. Part of the clear-writing ethos for lawyers is to de-clutter the page. Reference details go in the footnotes. (Notice in the MWE how textcite wants to treat the legislation name - it should be plain.)



    Note that you can put formatting commands (latex code) in the bib field items, emph, etc., if you want.



    As to the question of 'should', it is a matter of degree.



    If you're feeling tempted to go as far as splitting the bibliography into a legal part and a non-legal part, to help the reader, easiest way is to use keywords. (There are other ways as well: biblatex is a toolkit, in effect.)



    MWE:



    RequirePackagefilecontents
    beginfilecontentsjobname.bib
    @jurisdictioncase,
    title = Somebody v Somebody Else and Others (No 4),
    number = [2016] AC 100,
    date=2016,
    keywords=legal,case,
    % pages = 100--178,
    % date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01

    @legislationteu,
    keywords = legal,legislation,
    entrysubtype = eu-treaty,
    title = Consolidated Version of the
    Treaty on European Union,
    date = 2010,
    journaltitle = OJ,
    series = C,
    volume = 83,
    pages = 13,
    shorthand = TEU,
    pagination = article,

    @jurisdictionc632,title = Tenacity Investments v Ku-Ring-Gai Council and Ors (No 2),keywords = au,number = [2008] NSWLEC 171,institution = Land and Environment Court of New South Wales,date = 2008-08-22, keywords=legal,case,

    @jurisdictionc606,title = Lee-Hirons v Secretary of State for Justice,keywords = au,number = [2016] UKSC 46,institution = United Kingdom Supreme Court,date = 2016-07-27,keywords=legal,case,

    @legislationdeddf,
    title = Deddf Ardderchog (Cymru),
    year = 2014,
    institution = Cynulliad Cenedlaethol Cymru,
    languageid = cy,
    keywords=legal,legislation,


    @legislationcansw,
    title = Crimes Act (NSW) ,
    year = 1900,
    languageid = en_AU,
    keywords=legal,legislation,


    @articlearticle,
    title = Fantastic Findings and Where to Find Them,
    author = Vark, Aar D.,
    journal = Diligent Discoveries,
    volume = 45,
    number = 3,
    pages = 23--32,
    year = 2010

    @bookbook,
    title = Brilliant Baths,
    author = Allard, M.,
    publisher = Empire Books,
    address = Alpha Centauri,
    year = 1998

    @bookaustrams,
    author = Austin, Robert P. and Ramsay, Ian M,
    title = Ford, Austin and Ramsay's Principles of Corporations Law,
    edition = 16,
    publisher = LexisNexis Butterworths,
    date = 2015,
    pagination = paragraph,
    ISBN = 9780409338386,

    endfilecontents

    documentclass[welsh,british,a4paper]article
    %usepackage[utf8]inputenc
    %usepackagegeometry
    %usepackagecfr-lm
    usepackagebabel
    usepackagecsquotes
    usepackage[style=oxnotes]biblatex
    addbibresourcejobname.bib

    begindocument

    Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
    Textcitearticle and textcitebook are cited using the author-year system.

    However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
    Nonetheless, these need to be cited appropriately.
    Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
    Hence, the standard styles do not handle these cases well:
    beginquote
    textcitededdf is a law autocitededdf.
    Textcite[at 150]case is a case autocitecase.
    A legal textbookautociteaustrams. And another caseautocitec632. And a medium-neutral citation of a case autocite[at para 23]c606. Some EU legislation to play with autociteteu. And a statuteautocitecansw. A law from another jurisdiction: textcitecansw
    endquote

    printbibheading
    printbibliography [
    heading=subbibliography,%
    keyword=case,
    title=Cases
    ]
    printbibliography [
    heading=subbibliography,%
    keyword=legislation,
    title=Statutes
    ]
    printbibliography [
    heading=subbibliography,%
    notkeyword=case,
    notkeyword=legislation,
    title=General
    ]

    hrule


    enddocument


    giving:



    text with citations



    and the footnotes:



    footnotes



    and the bibliography:



    Regs



    P.S.
    It took me a few minutes to work out why I couldn't find "Deddf Ardderchog" on BAILII! :)






    share|improve this answer



























      1














      Use the oxnotes biblatex style. It does quite a good and robust job and has a sufficiently nuanced presentation. The laser-scapel precision of a full OSCOLA compliance is not really required outside a legal forum.



      You were almost there in the MWE. Some additional adjustments:



      In the bib file, for cases, put the case reference in the number field. This will handle both hardcopy and electronic law reports. For printed cases, page ranges are not required.



      For legislation, do not use an author field. Having the year in the footnote is sufficient.



      In the text, use autocite. Part of the clear-writing ethos for lawyers is to de-clutter the page. Reference details go in the footnotes. (Notice in the MWE how textcite wants to treat the legislation name - it should be plain.)



      Note that you can put formatting commands (latex code) in the bib field items, emph, etc., if you want.



      As to the question of 'should', it is a matter of degree.



      If you're feeling tempted to go as far as splitting the bibliography into a legal part and a non-legal part, to help the reader, easiest way is to use keywords. (There are other ways as well: biblatex is a toolkit, in effect.)



      MWE:



      RequirePackagefilecontents
      beginfilecontentsjobname.bib
      @jurisdictioncase,
      title = Somebody v Somebody Else and Others (No 4),
      number = [2016] AC 100,
      date=2016,
      keywords=legal,case,
      % pages = 100--178,
      % date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01

      @legislationteu,
      keywords = legal,legislation,
      entrysubtype = eu-treaty,
      title = Consolidated Version of the
      Treaty on European Union,
      date = 2010,
      journaltitle = OJ,
      series = C,
      volume = 83,
      pages = 13,
      shorthand = TEU,
      pagination = article,

      @jurisdictionc632,title = Tenacity Investments v Ku-Ring-Gai Council and Ors (No 2),keywords = au,number = [2008] NSWLEC 171,institution = Land and Environment Court of New South Wales,date = 2008-08-22, keywords=legal,case,

      @jurisdictionc606,title = Lee-Hirons v Secretary of State for Justice,keywords = au,number = [2016] UKSC 46,institution = United Kingdom Supreme Court,date = 2016-07-27,keywords=legal,case,

      @legislationdeddf,
      title = Deddf Ardderchog (Cymru),
      year = 2014,
      institution = Cynulliad Cenedlaethol Cymru,
      languageid = cy,
      keywords=legal,legislation,


      @legislationcansw,
      title = Crimes Act (NSW) ,
      year = 1900,
      languageid = en_AU,
      keywords=legal,legislation,


      @articlearticle,
      title = Fantastic Findings and Where to Find Them,
      author = Vark, Aar D.,
      journal = Diligent Discoveries,
      volume = 45,
      number = 3,
      pages = 23--32,
      year = 2010

      @bookbook,
      title = Brilliant Baths,
      author = Allard, M.,
      publisher = Empire Books,
      address = Alpha Centauri,
      year = 1998

      @bookaustrams,
      author = Austin, Robert P. and Ramsay, Ian M,
      title = Ford, Austin and Ramsay's Principles of Corporations Law,
      edition = 16,
      publisher = LexisNexis Butterworths,
      date = 2015,
      pagination = paragraph,
      ISBN = 9780409338386,

      endfilecontents

      documentclass[welsh,british,a4paper]article
      %usepackage[utf8]inputenc
      %usepackagegeometry
      %usepackagecfr-lm
      usepackagebabel
      usepackagecsquotes
      usepackage[style=oxnotes]biblatex
      addbibresourcejobname.bib

      begindocument

      Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
      Textcitearticle and textcitebook are cited using the author-year system.

      However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
      Nonetheless, these need to be cited appropriately.
      Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
      Hence, the standard styles do not handle these cases well:
      beginquote
      textcitededdf is a law autocitededdf.
      Textcite[at 150]case is a case autocitecase.
      A legal textbookautociteaustrams. And another caseautocitec632. And a medium-neutral citation of a case autocite[at para 23]c606. Some EU legislation to play with autociteteu. And a statuteautocitecansw. A law from another jurisdiction: textcitecansw
      endquote

      printbibheading
      printbibliography [
      heading=subbibliography,%
      keyword=case,
      title=Cases
      ]
      printbibliography [
      heading=subbibliography,%
      keyword=legislation,
      title=Statutes
      ]
      printbibliography [
      heading=subbibliography,%
      notkeyword=case,
      notkeyword=legislation,
      title=General
      ]

      hrule


      enddocument


      giving:



      text with citations



      and the footnotes:



      footnotes



      and the bibliography:



      Regs



      P.S.
      It took me a few minutes to work out why I couldn't find "Deddf Ardderchog" on BAILII! :)






      share|improve this answer

























        1












        1








        1







        Use the oxnotes biblatex style. It does quite a good and robust job and has a sufficiently nuanced presentation. The laser-scapel precision of a full OSCOLA compliance is not really required outside a legal forum.



        You were almost there in the MWE. Some additional adjustments:



        In the bib file, for cases, put the case reference in the number field. This will handle both hardcopy and electronic law reports. For printed cases, page ranges are not required.



        For legislation, do not use an author field. Having the year in the footnote is sufficient.



        In the text, use autocite. Part of the clear-writing ethos for lawyers is to de-clutter the page. Reference details go in the footnotes. (Notice in the MWE how textcite wants to treat the legislation name - it should be plain.)



        Note that you can put formatting commands (latex code) in the bib field items, emph, etc., if you want.



        As to the question of 'should', it is a matter of degree.



        If you're feeling tempted to go as far as splitting the bibliography into a legal part and a non-legal part, to help the reader, easiest way is to use keywords. (There are other ways as well: biblatex is a toolkit, in effect.)



        MWE:



        RequirePackagefilecontents
        beginfilecontentsjobname.bib
        @jurisdictioncase,
        title = Somebody v Somebody Else and Others (No 4),
        number = [2016] AC 100,
        date=2016,
        keywords=legal,case,
        % pages = 100--178,
        % date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01

        @legislationteu,
        keywords = legal,legislation,
        entrysubtype = eu-treaty,
        title = Consolidated Version of the
        Treaty on European Union,
        date = 2010,
        journaltitle = OJ,
        series = C,
        volume = 83,
        pages = 13,
        shorthand = TEU,
        pagination = article,

        @jurisdictionc632,title = Tenacity Investments v Ku-Ring-Gai Council and Ors (No 2),keywords = au,number = [2008] NSWLEC 171,institution = Land and Environment Court of New South Wales,date = 2008-08-22, keywords=legal,case,

        @jurisdictionc606,title = Lee-Hirons v Secretary of State for Justice,keywords = au,number = [2016] UKSC 46,institution = United Kingdom Supreme Court,date = 2016-07-27,keywords=legal,case,

        @legislationdeddf,
        title = Deddf Ardderchog (Cymru),
        year = 2014,
        institution = Cynulliad Cenedlaethol Cymru,
        languageid = cy,
        keywords=legal,legislation,


        @legislationcansw,
        title = Crimes Act (NSW) ,
        year = 1900,
        languageid = en_AU,
        keywords=legal,legislation,


        @articlearticle,
        title = Fantastic Findings and Where to Find Them,
        author = Vark, Aar D.,
        journal = Diligent Discoveries,
        volume = 45,
        number = 3,
        pages = 23--32,
        year = 2010

        @bookbook,
        title = Brilliant Baths,
        author = Allard, M.,
        publisher = Empire Books,
        address = Alpha Centauri,
        year = 1998

        @bookaustrams,
        author = Austin, Robert P. and Ramsay, Ian M,
        title = Ford, Austin and Ramsay's Principles of Corporations Law,
        edition = 16,
        publisher = LexisNexis Butterworths,
        date = 2015,
        pagination = paragraph,
        ISBN = 9780409338386,

        endfilecontents

        documentclass[welsh,british,a4paper]article
        %usepackage[utf8]inputenc
        %usepackagegeometry
        %usepackagecfr-lm
        usepackagebabel
        usepackagecsquotes
        usepackage[style=oxnotes]biblatex
        addbibresourcejobname.bib

        begindocument

        Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
        Textcitearticle and textcitebook are cited using the author-year system.

        However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
        Nonetheless, these need to be cited appropriately.
        Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
        Hence, the standard styles do not handle these cases well:
        beginquote
        textcitededdf is a law autocitededdf.
        Textcite[at 150]case is a case autocitecase.
        A legal textbookautociteaustrams. And another caseautocitec632. And a medium-neutral citation of a case autocite[at para 23]c606. Some EU legislation to play with autociteteu. And a statuteautocitecansw. A law from another jurisdiction: textcitecansw
        endquote

        printbibheading
        printbibliography [
        heading=subbibliography,%
        keyword=case,
        title=Cases
        ]
        printbibliography [
        heading=subbibliography,%
        keyword=legislation,
        title=Statutes
        ]
        printbibliography [
        heading=subbibliography,%
        notkeyword=case,
        notkeyword=legislation,
        title=General
        ]

        hrule


        enddocument


        giving:



        text with citations



        and the footnotes:



        footnotes



        and the bibliography:



        Regs



        P.S.
        It took me a few minutes to work out why I couldn't find "Deddf Ardderchog" on BAILII! :)






        share|improve this answer













        Use the oxnotes biblatex style. It does quite a good and robust job and has a sufficiently nuanced presentation. The laser-scapel precision of a full OSCOLA compliance is not really required outside a legal forum.



        You were almost there in the MWE. Some additional adjustments:



        In the bib file, for cases, put the case reference in the number field. This will handle both hardcopy and electronic law reports. For printed cases, page ranges are not required.



        For legislation, do not use an author field. Having the year in the footnote is sufficient.



        In the text, use autocite. Part of the clear-writing ethos for lawyers is to de-clutter the page. Reference details go in the footnotes. (Notice in the MWE how textcite wants to treat the legislation name - it should be plain.)



        Note that you can put formatting commands (latex code) in the bib field items, emph, etc., if you want.



        As to the question of 'should', it is a matter of degree.



        If you're feeling tempted to go as far as splitting the bibliography into a legal part and a non-legal part, to help the reader, easiest way is to use keywords. (There are other ways as well: biblatex is a toolkit, in effect.)



        MWE:



        RequirePackagefilecontents
        beginfilecontentsjobname.bib
        @jurisdictioncase,
        title = Somebody v Somebody Else and Others (No 4),
        number = [2016] AC 100,
        date=2016,
        keywords=legal,case,
        % pages = 100--178,
        % date = 2015-03-10,2015-03-12,2015-04-25,2015-04-27,2015-05-01

        @legislationteu,
        keywords = legal,legislation,
        entrysubtype = eu-treaty,
        title = Consolidated Version of the
        Treaty on European Union,
        date = 2010,
        journaltitle = OJ,
        series = C,
        volume = 83,
        pages = 13,
        shorthand = TEU,
        pagination = article,

        @jurisdictionc632,title = Tenacity Investments v Ku-Ring-Gai Council and Ors (No 2),keywords = au,number = [2008] NSWLEC 171,institution = Land and Environment Court of New South Wales,date = 2008-08-22, keywords=legal,case,

        @jurisdictionc606,title = Lee-Hirons v Secretary of State for Justice,keywords = au,number = [2016] UKSC 46,institution = United Kingdom Supreme Court,date = 2016-07-27,keywords=legal,case,

        @legislationdeddf,
        title = Deddf Ardderchog (Cymru),
        year = 2014,
        institution = Cynulliad Cenedlaethol Cymru,
        languageid = cy,
        keywords=legal,legislation,


        @legislationcansw,
        title = Crimes Act (NSW) ,
        year = 1900,
        languageid = en_AU,
        keywords=legal,legislation,


        @articlearticle,
        title = Fantastic Findings and Where to Find Them,
        author = Vark, Aar D.,
        journal = Diligent Discoveries,
        volume = 45,
        number = 3,
        pages = 23--32,
        year = 2010

        @bookbook,
        title = Brilliant Baths,
        author = Allard, M.,
        publisher = Empire Books,
        address = Alpha Centauri,
        year = 1998

        @bookaustrams,
        author = Austin, Robert P. and Ramsay, Ian M,
        title = Ford, Austin and Ramsay's Principles of Corporations Law,
        edition = 16,
        publisher = LexisNexis Butterworths,
        date = 2015,
        pagination = paragraph,
        ISBN = 9780409338386,

        endfilecontents

        documentclass[welsh,british,a4paper]article
        %usepackage[utf8]inputenc
        %usepackagegeometry
        %usepackagecfr-lm
        usepackagebabel
        usepackagecsquotes
        usepackage[style=oxnotes]biblatex
        addbibresourcejobname.bib

        begindocument

        Most of my bibliography entries are `normal' sources, such as articles autocite[e.g.][]article and books autocite[e.g.][]book.
        Textcitearticle and textcitebook are cited using the author-year system.

        However, I also need to cite legal sources, even though I'm not working in law or writing in this discipline.
        Nonetheless, these need to be cited appropriately.
        Unfortunately, Biblatex doesn't handle these out-of-the-box and the contributed styles which do are all designed for work in law, as opposed to, say, history, philosophy or quantum mechanics.
        Hence, the standard styles do not handle these cases well:
        beginquote
        textcitededdf is a law autocitededdf.
        Textcite[at 150]case is a case autocitecase.
        A legal textbookautociteaustrams. And another caseautocitec632. And a medium-neutral citation of a case autocite[at para 23]c606. Some EU legislation to play with autociteteu. And a statuteautocitecansw. A law from another jurisdiction: textcitecansw
        endquote

        printbibheading
        printbibliography [
        heading=subbibliography,%
        keyword=case,
        title=Cases
        ]
        printbibliography [
        heading=subbibliography,%
        keyword=legislation,
        title=Statutes
        ]
        printbibliography [
        heading=subbibliography,%
        notkeyword=case,
        notkeyword=legislation,
        title=General
        ]

        hrule


        enddocument


        giving:



        text with citations



        and the footnotes:



        footnotes



        and the bibliography:



        Regs



        P.S.
        It took me a few minutes to work out why I couldn't find "Deddf Ardderchog" on BAILII! :)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 12 mins ago









        CicadaCicada

        112




        112



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f437824%2fwhat-is-best-practice-re-handling-legal-sources-with-biblatex-biber-for-discipl%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

            Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"

            inputenc: Unicode character … not set up for use with LaTeX The Next CEO of Stack OverflowEntering Unicode characters in LaTeXHow to solve the `Package inputenc Error: Unicode char not set up for use with LaTeX` problem?solve “Unicode char is not set up for use with LaTeX” without special handling of every new interesting UTF-8 characterPackage inputenc Error: Unicode character ² (U+B2)(inputenc) not set up for use with LaTeX. acroI2C[I²C]package inputenc error unicode char (u + 190) not set up for use with latexPackage inputenc Error: Unicode char u8:′ not set up for use with LaTeX. 3′inputenc Error: Unicode char u8: not set up for use with LaTeX with G-BriefPackage Inputenc Error: Unicode char u8: not set up for use with LaTeXPackage inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX. includePackage inputenc Error: Unicode char ̂ (U+302)(inputenc) not set up for use with LaTeX. … $widehatleft (OA,AA' right )$Package inputenc Error: Unicode char â„¡ (U+2121)(inputenc) not set up for use with LaTeX. printbibliography[heading=bibintoc]Package inputenc Error: Unicode char − (U+2212)(inputenc) not set up for use with LaTeXPackage inputenc Error: Unicode character α (U+3B1) not set up for use with LaTeXPackage inputenc Error: Unicode characterError: ! Package inputenc Error: Unicode char ⊘ (U+2298)(inputenc) not set up for use with LaTeX