PaulStanley / oscola-biblatex

Oscola is a style file for the biblatex bibliography system.
9 stars 7 forks source link

A few comments #5

Closed moewew closed 7 years ago

moewew commented 7 years ago

Your biblatex guide sparked my interest in your other biblatex project, and so I thought I might leave a few nit-picking remarks here as well.

The name macro in https://github.com/PaulStanley/oscola-biblatex/blob/master/oscola.bbx#L74 uses the outdated command \ifpunctmark{'} which has been superseded by \ifprefchar. You also use \ifblank, but the version of name:family-given in biblatex.def uses \ifdefvoid (this is necessary due to changes to name handling and the type of the arguments passes to the macros). I might be mistaken, but your definition looks just like the normal definition except that you deleted \revsdnamepunct. So you should get the same result if you don't redefine the macro and instead do \renewcommand*{\revsdnamepunct}{}.

The code you use starting from https://github.com/PaulStanley/oscola-biblatex/blob/master/oscola.bbx#L98 to obtain terse initials could probably just be replaced with the terseinits=true option. (I did not compare output, but in theory it should do the same.)

It might be a matter of taste, but I would not use commands in string comparisons as in https://github.com/PaulStanley/oscola-biblatex/blob/master/oscola.bbx#L213 (\newcommand*\subtypesecondarylegislation{secondary} and then \iffieldequals{entrysubtype}{\subtypesecondarylegislation}), as I explained in http://tex.stackexchange.com/a/290935/ I prefer \iffieldequalstr instead of \iffieldequals for fixed strings. That does not create the overhead of macros, and I don't need to think about \long commands (i.e. using \newcommand* so I don't get \long).

Is there a reason why there is a literal comma in https://github.com/PaulStanley/oscola-biblatex/blob/master/oscola.bbx#L296's \newcommand{\extracitedelim}{,\space}?

PaulStanley commented 7 years ago

Many thanks for those. This was (as you may have guessed) very much a "learn by doing" exercise, and there are many nits to pick: it's very useful to have them. Also, in the several years since I originally did this, and then rather laid it aside, things did change! I tend to wait until something breaks, I'm afraid.

The two points I'm not sure about (I'll need to test) are the terseinits point and the use of commands in comparisons. As to the first, my recollection is that when I originally wrote this at least, terseinits didnt give me what I needed -- something to do with adding full points, I think, which OSCOLA doesn't want. I'll have to look again. I think the problem was that I could get standard biblatex to give me P.M. Stanley or P M Stanley but not PM Stanley (or perhaps it was P M Stanley but not PM Stanley, I need to check -- anyway it was something like that, because at the time it caused me a certain amount of annoyance)!

The use of commands was because I have to make the relevant comparisons in several places, and I wanted to use a command (which I could then change) so that if I changed my mind about what the string should be so I could change it. I suppose that logically I could now get rid of that, since the string is now fixed, and it's true that expansion and so forth gave me trouble.

The worst part of the code is the indexing stuff, which is very hairy, and largely a matter of trial and error. There were, later, some facilities added (designed IIRC by Audrey Boruvka), but I now hardly dare touch it for fear it all falls to pieces in my hands. So please, whatever you do, don't start looking at that, because I don't want to be shamed into "improving" it and then find I can't make it work!

PaulStanley commented 7 years ago

@moewew I have experimented with the initials, and found the method in my madness.

terseinits=true is fine for the bibliography. But in the text, if I have a name like Williams, John J., I need to print Williams, John J --- not terse, but no dot. If I just have terseinits=true I don't have a problem making the in-text citations full and the bibliographical ones terse, but the in-text citations acquire a dot. So what (IIRC) all this code is doing is preventing those dots being printed!