Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

A Few Minor Suggestions #19

Open
moewew opened this issue Sep 7, 2015 · 7 comments
Open

A Few Minor Suggestions #19

moewew opened this issue Sep 7, 2015 · 7 comments
Labels

Comments

@moewew
Copy link
Collaborator

moewew commented Sep 7, 2015

Thank you for this very nice ISO 690 style (I myself don't particularly like the style imposed by ISO here, but this is an entirely different matter).

I thought I would share some thoughts on your code containing a few minor changes.

iso.cbx

iso.cbx can be made even more compact by not redefining cite:labelyear+extrayear to include a comma, but using the appropriate command \renewcommand*{\nameyeardelim}{\addcomma\addspace} otherwise things go pear shaped when using \textcite (See #16). Unfortunately then if one has a label there is no comma between the label and the date, that would need to be solved by

\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}}
       {\printnames{labelname}}
     \setunit{\nameyeardelim}
     \usebibmacro{cite:labelyear+extrayear}}
    {\usebibmacro{cite:shorthand}}}

The file would then look like

\ProvidesFile{iso.cbx}
  [Id: iso.cbx]

\providebool{cbx@numeric}
\ifthenelse{\boolean{cbx@numeric}}
  {\RequireCitationStyle{authoryear}
   \renewcommand*{\nameyeardelim}{\addcomma\addspace}%
   \renewbibmacro*{cite}{%
     \iffieldundef{shorthand}
       {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
          {\usebibmacro{cite:label}}
          {\printnames{labelname}}
        \setunit{\nameyeardelim}
        \usebibmacro{cite:labelyear+extrayear}}
       {\usebibmacro{cite:shorthand}}}}
  {\RequireCitationStyle{numeric}}
\endinput

BTW: I'm not sure about the purpose of iso.cbx, I don't think one is supposed to use style=iso, so iso.bbx is essentially your version of standard.bbx (which does not come with a standard.cbx). Maybe you can get rid of it.

authoryear-iso.cbx

Same goes for authoryear-iso.cbx. There I find \DeclareNameFormat{labelname}{#1} very destructive (it essentially disables all of biblatex's thought-through name features, one of the effects can be seen in #12). If you just want no small caps, there are far less intrusive ways to do that. (Change \mkbibnamelast to small caps in \AtBegiBibliography and leave it on #1 in the document.)

\ProvidesFile{iso-authoryear.cbx}[2011/06/08]
\ExecuteBibliographyOptions{%
   maxcitenames=1
  ,mincitenames=1
}

\RequireCitationStyle{authoryear}

\renewcommand*{\nameyeardelim}{\addcomma\addspace}

\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}}
       {\printnames{labelname}}
     \setunit{\nameyeardelim}
     \usebibmacro{cite:labelyear+extrayear}}
    {\usebibmacro{cite:shorthand}}}

authoryear-iso.bbx

I'm always wary of commands such as \printextrayear bringing their own punctuation. I think it to be cleaner to add punctuation using the "surrounding" macros. (That would require a bit more reworking.)

The check in

\newbibmacro*{year-label}{%
  \ifnameundef{author}
    {\ifnameundef{editor}
       {}
       {\printextrayear}}
    {\printextrayear}}

could probably be gotten rid of by placing the macro inside the conditionals in names:primary, I also think it could have adverse effects for @inbook entries.

iso.bbx

I'm not sure what exactly \mainsstring and friends should do, but maybe there is another way possible that uses more of biblatex's standard commands.

The code used to display the colons with spaces in front seems to introduce a full stop at times (cite the entry ctan of biblatex-examples.bib to see an example; that entry reveals another problem: missing support for label in the bibliography). Maybe you can be inspired by http://tex.stackexchange.com/q/130448/35864.

I'm no friend of \MakeUppercase for last names, I find \textsc far more aesthetically pleasing, but then don't know exactly what the norm asks for here.

Are the \do implementations in

\DeclareFieldFormat{issn}{%
\renewcommand*{\do}[1]{\printtext{ISSN}\addnbspace#1\adddot\addspace}%
\docsvfield{issn}}

to support multiple ISSNs?

In \printfield{pagetotal}\usebibmacro{loc:pages} I think an appropriate field format for pagetotal should make the macro loc:pages superfluous (and it will also be more flexible, what if there is a language that has the string in front of the number here?)

\DeclareFieldFormat{pagetotal}{\mkpagetotal[bookpagination]{#1}}
\newbibmacro{pagecount}{\printfield{pagetotal}}

should be enough to do the same thing, but making use of biblatex's localisation machinery.

The use of \setunit{\labelnamepunct}\newblock instead of \newunit\newblock after the author in standard.bbx is a nice feature that iso.bbx could also benefit from (after the names:primary macro).

Regardless of what one thinks of back-references, it could not hurt to support them by having \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% close to the end of the drivers (just as standard.bbx does).

I would expect drivers to end in \usebibmacro{finentry} and not \finentry. (Where normally we have \newbibmacro*{finentry}{\finentry}, but it can be useful to be able to hook into the end of an entry)

@michal-h21
Copy link
Owner

Thank you for this very nice ISO 690 style (I myself don't
particularly like the style imposed by ISO here, but this is an
entirely different matter).

I myself don't like this style as well, I created the style mainly
because only biblatex offers features needed in order to support some
insane requirements (my source of the requirements was a professor of
information and library science, which inclines towards really rigid
interpretation).

Also note that this was my first LaTeX package and was originally
written five years ago, so many issues are to be expected, mainly as I
haven't followed recent Biblatex changes and best practices (it was
written in time where there were no resources about writing styles, at
least not some I knew about).

I thought I would share some thoughts on your code containing a few minor changes.

iso.cbx

BTW: I'm not sure about the purpose of iso.cbx, I don't think one is
supposed to use style=iso, so iso.bbx is essentially your version
of standard.bbx (which does not come with a standard.cbx). Maybe
you can get rid of it.

I think it isn't used anymore, I've just removed it.

authoryear-iso.cbx

Same goes for authoryear-iso.cbx. There I find
\DeclareNameFormat{labelname}{#1} very destructive (it essentially
disables all of biblatex's thought-through name features). If you
just want no small caps, there are far less intrusive ways to do that.
(Change \mkbibnamelast to small caps in \AtBegiBibliography and
leave it on #1 in the document.)

Thanks, I must admit that I can no longer understand all internal
biblatex macros used in cbx files, so everything here are basically
hacks. I've installed your version and also put \mkbibnamelast in
\AtBeginBibliography. It seems nice so far, only thing which isn't
working is \fullcite, which is understandable.

authoryear-iso.bbx

I'm always wary of commands such as \printextrayear bringing their
own punctuation. I think it to be cleaner to add punctuation using the
"surrounding" macros. (That would require a bit more reworking.)

\printextrayear shouldn't print any punctuation, it just set block
punctuation to ", ", which is printed between author name and year.

The check in

\newbibmacro*{year-label}{%
  \ifnameundef{author}
    {\ifnameundef{editor}
       {}
       {\printextrayear}}
    {\printextrayear}}

could probably be gotten rid of by placing the macro inside the
conditionals in names:primary, I also think it could have adverse
effects for @inbook entries.

Probably yes, I can take a look at this.

iso.bbx

I'm not sure what exactly \mainsstring and friends should do, but
maybe there is another way possible that uses more of biblatex's
standard commands.

It should print localization string in the main document language. It
wasn't available at the time I wrote this and various hacks which
produced spurious spaces were used over time. It seems that it is
possible to use \bibsstring[mainlang]{} now, so I switched these
macros to this form.

This is one of insanities of ISO 690, or it's Czech interpretation, that
you should have some data in language of main document and other data in
language of cited document, all of this in one bibliographic entry.

The code used to display the colons with spaces in front seems to
introduce a full stop at times (cite the entry ctan of
biblatex-examples.bib to see an example; that entry reveals another
problem: missing support for label in the bibliography). Maybe you
can be inspired by http://tex.stackexchange.com/q/130448/35864.

Ah I see. The code to print titles and subtitles seems pretty hacky, it
surely needs new implementation. See

\DeclareFieldFormat{emph-colon}{\printtext[emphatize]{\printtext[colon]{#1}}}

and macros titles and pub:title.

I'm no friend of \MakeUppercase for last names, I find \textsc far
more aesthetically pleasing, but then don't know exactly what the norm
asks for here.

It is requested by the norm, but maybe we could provide option for
switching to small caps.

Are the \do implementations in

\DeclareFieldFormat{issn}{%
\renewcommand*{\do}[1]{\printtext{ISSN}\addnbspace#1\adddot\addspace}%
\docsvfield{issn}}

to support multiple ISSNs?

Probably yes. Maybe some better way to support it exists now?

In \printfield{pagetotal}\usebibmacro{loc:pages} I think an
appropriate field format for pagetotal should make the macro
loc:pages superfluous (and it will also be more flexible, what if
there is a language that has the string in front of the number here?)

\DeclareFieldFormat{pagetotal}{\mkpagetotal[bookpagination]{#1}}
\newbibmacro{pagecount}{\printfield{pagetotal}}

should be enough to do the same thing, but making use of biblatex's localisation machinery.

pages should be printed in main document language, so we want to
suppress localisation machinery.

The use of \setunit{\labelnamepunct}\newblock instead of
\newunit\newblock after the author in standard.bbx is a nice
feature that iso.bbx could also benefit from (after the
names:primary macro).

What is the purpose of this?

Regardless of what one thinks of back-references, it could not hurt to support them by having \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% close to the end of the drivers (just as standard.bbx does).

I've added that. I think it should be in main document language and I
don't like formatting, so I will take a look at it tomorrow.

I would expect drivers to end in \usebibmacro{finentry} and not
\finentry. (Where normally we have
\newbibmacro*{finentry}{\finentry}, but it can be useful to be able
to hook into the end of an entry)

OK

Thanks for all your input, it was really useful.

@moewew
Copy link
Collaborator Author

moewew commented Sep 8, 2015

Thank you for the nice response, I'm very impressed by the swiftness with which you implemented the suggestions.

It seems nice so far, only thing which isn't working is \fullcite, which is understandable.

To get \fullcite back on track (I suppose you want small/all caps there, mirroring the bibliography output as best as possible) we would probably need something like

\DeclareCiteCommand{\fullcite}
  {\usebibmacro{prenote}%
   \renewcommand*\mkbibnamelast{\textsc}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\footfullcite}[\mkbibfootnote]
  {\usebibmacro{prenote}%
   \renewcommand*\mkbibnamelast{\textsc}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

(Yes I have used small caps again, I just can't bring myself to use all caps.)

\printextrayear shouldn't print any punctuation, it just set block punctuation to ", ", which is printed between author name and year.

I think you are right, technically it doesn't print punctuation, but it alters the punctuation tracker, which I find undesirable, if I were to write a macro using \setunit{\addspace}\printextrayear I would get a comma and I would have no idea where it just came from.

I consider it cleaner to not let \printextrayear let change the punctuation tracker, but set the punctuation when the macro is used, for example

\newbibmacro*{names:primary}{%
  \ifnameundef{author}%
    {\usebibmacro{editor}}%
    {\printnames{author}}%
  \setunit{\addcomma\space}%
  \usebibmacro{year-label}%
}

This is one of insanities of ISO 690, or it's Czech interpretation, that you should have some data in language of main document and other data in language of cited document, all of this in one bibliographic entry.

OK that is just horrible, I had no idea how to deal with that in an sufficiently elegant way. But your solution with \mainlang looks very good.

Ah I see. The code to print titles and subtitles seems pretty hacky, it surely needs new implementation. See \DeclareFieldFormat{emph-colon}{\printtext[emphatize]{\printtext[colon]{#1}}} and macros titles and pub:title.

I'm not a big fan of putting punctuation into the \DeclareFieldFormat, I think something like

\newbibmacro{titles}[1]{%
  \printtext[emph]{%
    \printfield{#1title}%
    \setunit{\addspace\addspcolon\space}
    \printfield{#1subtitle}%
    \printfield{#1addon}}}

together with

\makeatletter
% see biblatex2.sty for these macros
\blx@regimcs{% let biblatex know the new macros
  \addspsemicolon \addspcolon \addspcomma}
\def\blx@addsppunct#1{% <---- new name for spaced punctuation
  %\unspace <----- commented out
  \ifnum\blx@spacefactor<\blx@sf@threshold@low
    \csuse{blx@qp@#1}\csuse{abx@#1}%
  \else
    \ifnum\blx@spacefactor>\blx@sf@threshold@high
      \csuse{blx@qp@#1}\csuse{abx@#1}%
    \else
      \ifcsdef{blx@pp@\the\csname blx@sf@#1\endcsname @\blx@spacefactor}
        {\csuse{blx@qp@#1}\csuse{abx@#1}}
        {\csuse{blx@qp@#1}}%
    \fi
  \fi
  \csuse{blx@pq@#1}}
% define new macros  
\protected\def\blx@imc@addspsemicolon{\blx@addsppunct{semicolon}}
\protected\def\blx@imc@addspcolon{\blx@addsppunct{colon}}
\protected\def\blx@imc@addspcomma{\blx@addsppunct{comma}}
\makeatother

from the TeX.SX question above gives a more biblatex-y feel for me (it mirrors the bibmacro maintitle from biblatex.def).

A similar scheme would have to be introduced for those drivers (article for example) where you have the bare \printfield{title}\printfield{subtitle} in the driver (I think that could be wrapped into a macro as well).

It is requested by the norm, but maybe we could provide option for switching to small caps.

Ugh, they require all caps? (Is that because they can't get their typesetting system to support proper small caps? ;-)) Switching is easy enough now, so there is probably no need to have an option. If you are interested though you might want to be inspired by biblatex-dw where a whole name font scheme is implemented.

[RE the ISSN code] Probably yes. Maybe some better way to support it exists now?

No, I don't know of a more elegant solution, I was quite impressed by this after I found out what it does. Normally people requesting support for multiple ISSNs/ISBNs are fobbed off saying that one should cite the exact source one has, which should only have one ISBN (leave aside the issue of ISBN-10 vs ISBN-13 for a second).

[RE \setunit{\labelnamepunct}\newblock] What is the purpose of this?

It allows people to switch the punctuation between the name and title very efficiently (i.e. by redefining \labelnamepunct which defaults to \newunitpunct). In a very strict style such as ISO it might not be necessary (after all people shouldn't deviate from the norm), but I still think it is a nice move.

One thing I only just noticed is that some drivers and macros introduce additional unwanted white space, you can see this very clearly in a fullcite which is followed by text, e.g. \fullcite[5]{sigfridsson}.

Some of the offending macros are

\renewbibmacro*{online}{%
  %\def\online{}%
  \iffieldundef{urlyear}{}{\printtext[sbrackets]{online}}%
  %\usebibmacro{online-test}{}{\online}%
}

\renewbibmacro{book:vol}{%
  \printfield{edition}%
  %\iffieldundef{edition}{}%
    %{\printfield{edition}\usebibmacro{loc:bookvol}}%
}

\renewbibmacro{jour:title}{%
  \usebibmacro{titles}{journal}%
  \usebibmacro{online}%
}

But I think the biggest part of spaces is introduced by the drivers. Where we need a % after every \usebibmacro{...} to avoid adverse effects.

@michal-h21
Copy link
Owner

Excerpts from moewew's message of 2015-09-08 08:52:55 +0200:

Thank you for the nice response, I'm very impressed by the swiftness
with which you implemented my suggestions.

Thanks for the suggestions, it really helped me to fix many issues

To get \fullcite back on track (I suppose you want small/all caps
there, mirroring the bibliography output as best as possible) we would
probably need something like

...
(Yes I have used small caps again, I just can't bring myself to use all caps.)

Thanks, this seems to work nice. I've defined new command
\lastnameformat, which expands to \MakeUppercase by default, but it
can be easily redefined to small caps.

I think you are right, technically it doesn't print punctuation, but
it alters the punctuation tracker, which I find undesirable, if I were
to write a macro using \setunit{\addspace}\printextrayear I would
get a comma and I would have no idea where it just came from.

I consider it cleaner to not let \printextrayear let change the
punctuation tracker, but set the punctuation when the macro is used,
for example

\newbibmacro*{names:primary}{%
  \ifnameundef{author}%
    {\usebibmacro{editor}}%
    {\printnames{author}}%
  \setunit{\addcomma\space}%
  \usebibmacro{year-label}%
}

I'm not a big fan of putting punctuation into the
\DeclareFieldFormat, I think something like

\newbibmacro{titles}[1]{%
  \printtext[emph]{%
    \printfield{#1title}%
    \setunit{\addspace\addspcolon\space}
    \printfield{#1subtitle}%
    \printfield{#1addon}}}

together with

\makeatletter
% see biblatex2.sty for these macros
\blx@regimcs{% let biblatex know the new macros
  \addspsemicolon \addspcolon \addspcomma}
\def\blx@addsppunct#1{% <---- new name for spaced punctuation
  %\unspace <----- commented out
  \ifnum\blx@spacefactor<\blx@sf@threshold@low
    \csuse{blx@qp@#1}\csuse{abx@#1}%
  \else
    \ifnum\blx@spacefactor>\blx@sf@threshold@high
      \csuse{blx@qp@#1}\csuse{abx@#1}%
    \else
      \ifcsdef{blx@pp@\the\csname blx@sf@#1\endcsname @\blx@spacefactor}
        {\csuse{blx@qp@#1}\csuse{abx@#1}}
        {\csuse{blx@qp@#1}}%
    \fi
  \fi
  \csuse{blx@pq@#1}}
% define new macros  
\protected\def\blx@imc@addspsemicolon{\blx@addsppunct{semicolon}}
\protected\def\blx@imc@addspcolon{\blx@addsppunct{colon}}
\protected\def\blx@imc@addspcomma{\blx@addsppunct{comma}}
\makeatother

from the TeX.SX question above gives a more biblatex-y feel for me
(it mirrors the bibmacro maintitle from biblatex.def).

A similar scheme would have to be introduced for those drivers
(article for example) where you have the bare
\printfield{title}\printfield{subtitle} in the driver (I think that
could be wrapped into a macro as well).

Thanks, I modified this code a little bit and it works nice. It is
definitely better to use features provided by punctuation tracker than
some hacks :)

Ugh, they require all caps? (Is that because they can't get their
typesetting system to support proper small caps? ;-)) Switching is
easy enough now, so there is probably no need to have an option. If
you are interested though you might want to be inspired by
biblatex-dw where a whole name font scheme is implemented.

I don't know why they require all caps, but I suspect it is the same
reason why in older ISO revision space before colon was required. They
just still live in the typewriter era :)

[RE the ISSN code] Probably yes. Maybe some better way to support it
exists now?

No, I don't know of a more elegant solution, I was quite impressed by
this after I found out what it does. Normally people requesting
support for multiple ISSNs/ISBNs are fobbed off saying that one should
cite the exact source one has, which should only have one ISBN (leave
aside the issue of ISBN-10 vs ISBN-13 for a second).

I was probably influenced by the fact that my source was librarian
interpretation of the norm and it mistakes bibliographic citation with
bibliographic record in a library catalog.

[RE \setunit{\labelnamepunct}\newblock] What is the purpose of this?

It allows people to switch the punctuation between the name and title
very efficiently (i.e. by redefining \labelnamepunct which defaults
to \newunitpunct). In a very strict style such as ISO it might not
be necessary (after all people shouldn't deviate from the norm), but I
still think it is a nice move.

Ok, I suspect more similar biblatex macros should be used somewhere :)

One thing I only just noticed is that some drivers and macros
introduce additional unwanted white space, you can see this very
clearly in a fullcite which is followed by text, e.g.
\fullcite[5]{sigfridsson}.

But I think the biggest part of spaces is introduced by the drivers.
Where we need a % after every \usebibmacro{...} to avoid adverse
effects.

Yeah, there was some unwanted white space. I've commented out linebreaks
on suspect lines, it seems much better now.

There are still many issues when I try to compile biblatex-examples.bib,
but it looks much better now.

@moewew
Copy link
Collaborator Author

moewew commented Sep 12, 2015

[Re colons with spaces] Thanks, I modified this code a little bit and it works nice. It is definitely better to use features provided by punctuation tracker than some hacks :)

It seems like you can get rid of the colon format and a few other things now, the \tcolon macro, for example. It would of course have been better to suggest

\renewcommand*\subtitlepunct{addspace\addspcolon\space}
\newbibmacro{titles}[1]{%
  \printtext[emph]{%
    \printfield{#1title}%
    \setunit{\subtitlepunct}
    \printfield{#1subtitle}%
    \printfield{#1addon}}}

I would have liked it better not to redefine \blx@imc@addspcolon depending on \boolean{bbx@tcolon}, but use some intermediate macro (\addisocolon) everywhere and change that one depending on the toggle.

With the change, the formats \DeclareFieldFormat{colon}{\printtext{\tcolon}\addspace#1} and
\DeclareFieldFormat{emph-colon}{\printtext[emphatize]{\printtext[colon]{#1}}} have become unused.

[Re \labelnamepunct] Ok, I suspect more similar biblatex macros should be used somewhere :)

There are not that many special punctuation macros (off the top of my head I can only think of labelnamepunct, \subtitlepunct, \intitlepunct [the punctuation after the "in": \newbibmacro{in}{\printtext{\mainsstring{in}\intitlepunct}} mirrors the standard definition], \bibpagespunct and \bibpagerefpunct.) If I were to write a style though, I would probably add a few more named punctuation marks to allow users to change things easier. (Especially around the "publisher"/"location"/"date" area - some people prefer colons, some commas here.)

Instead of defining loc:pages to have the pages in the main language, I would go through the more arduous way of trying to get a version of \mkpageprefix to use mainlanguage.

\newrobustcmd*{\blx@imc@mkmlpageprefix}[1][pagination]{%
  \begingroup
  \def\blx@tempa{\blx@mkmlpageprefix{page}}%
  \iffieldundef{#1}
    {}
    {\iffieldequalstr{#1}{none}
       {\def\blx@tempa{\blx@mkmlpageprefix}}
       {\iffieldbibstring{#1}
          {\edef\blx@tempa{\blx@mkmlpageprefix{\thefield{#1}}}}
          {\blx@warning@entry{%
             Unknown pagination type '\strfield{#1}'}}}}%
  \@ifnextchar[%]
    {\blx@tempa}
    {\blx@tempa[\@firstofone]}}

\protected\long\def\blx@mkmlpageprefix#1[#2]#3{%
  \ifnumeral{#3}
    {\mainsstring{#1}\ppspace}
    {\ifnumerals{#3}
       {\mainsstring{#1s}\ppspace}
       {\def\pno{\mainsstring{#1}}%
        \def\ppno{\mainsstring{#1s}}}}%
  \blx@mkmlpageprefix@i[#2]{#3}}

\long\def\blx@mkmlpageprefix@i[#1]#2{#1{#2}\endgroup}

\blx@regimcs{\mkmlpageprefix}

and then \DeclareFieldFormat*{pages}{\mkmlpageprefix[bookpagination]{#1}}
(Not tested extensively)

As well as

\newrobustcmd*{\blx@imc@mkmlpagetotal}[1][bookpagination]{%
  \begingroup
  \def\blx@tempa{\blx@mkmlpagetotal{page}}%
  \iffieldundef{#1}
    {}
    {\iffieldequalstr{#1}{none}
       {\def\blx@tempa{\blx@mkmlpagetotal@i}}
       {\iffieldbibstring{#1}
          {\edef\blx@tempa{\blx@mkmlpagetotal{\thefield{#1}}}}
          {\blx@warning@entry{%
             Unknown pagination type '\strfield{#1}'}}}}%
  \@ifnextchar[%]
    {\blx@tempa}
    {\blx@tempa[\@firstofone]}}

\protected\long\def\blx@mkmlpagetotal#1[#2]#3{%
  \ifnumeral{#3}
    {\setbox\@tempboxa=\hbox{%
       \blx@tempcnta0#3\relax
       \ifnum\blx@tempcnta=\@ne
         \aftergroup\@firstoftwo
       \else
         \aftergroup\@secondoftwo
       \fi}%
     {#2{#3}\ppspace\mainsstring{#1}}
     {#2{#3}\ppspace\mainsstring{#1s}}}
    {\def\pno{\mainsstring{#1}}%
     \def\ppno{\mainsstring{#1s}}%
     #2{#3}}%
  \endgroup}

\long\def\blx@mkmlpagetotal@i[#1]#2{#1{#2}\endgroup}

\blx@regimcs{\mkmlpagetotal}

\DeclareFieldFormat*{pagetotal}{\mkmlpagetotal[bookpagination]{#1}}

It seems that the two lines

\def\addhyphen{\printtext{-}}%
\DeclareFieldFormat{urldate}{\printfield{urlyear}\addhyphen\printfield{urlmonth}\addhyphen\printfield{urlday}}%

do nothing. The standard definition is \DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}, so you probably want
Instead of the slightly longer current definition of \newbibmacro*{urldate} we can just have

\DeclareFieldFormat{urldate}{\printtext[sbrackets]{\mainsstring{urlseen}\space#1}}
\newbibmacro*{urldate}{\printurldate}%

then.

I did some checks with the full biblatex-examples.bib and think the output actually looks presentable. The problem of spurious spaces seems resolved.

One thing you could add is a "catch-all" entry type. Right now if an entry types is not known, because it doesn't have a driver, we get an error. That could be prevented by re-routing all unknown types to @misc with \DeclareBibliographyAlias{*}{misc} (at the end of the \DeclareBibliographyAlias section). (I see that currently there is no @misc implemented and it is an alias of @book, but that does not matter greatly.)

I noted some problems with @inbook entries. A comma is missing after the bookauthor. And then I'm not sure whether the order of bookauthor and author is correctly reflected (no idea what the standard says here). It also seems weird to me that the title of the @inbook is only mentioned at the end. (@incollections look better in that respect, though they are similar in some respects.)

The @periodicals entry type seems not really supported, the entry jcg in biblatex-examples.bib prints merely ". ISSN 0097-8493."

With URL entries it seems weird to me that one gets

CTAN: The Comprehensive TeX Archive Network [online]. [besucht am 2006-10-01]. Adresse: http://www.ctan.org.

The punctuation around "[besucht am 2006-10-01]" seems excessive, in this case I would at least expect capitalisation of the text in brackets.

For @books it seems that if a maintitle is present, the title is not printed, which leads to seven books with the same title with all the knuth:ct works.

biblatex's "related" mechanism is also not supported in, which shows in some entries (all kullback's look pretty much the same). It seems to work fairly well to steal the "related"-machinery from the end of standard.bbx and add the

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

block to the end of each driver.

@moewew
Copy link
Collaborator Author

moewew commented Dec 5, 2015

I'm currently doing some clean-up of the code and found

\DeclareNameFormat{labelname}{%
  \ifthenelse{\value{listcount}=1}
    {#1%
     \ifblank{#3}{}{\addcomma\space #3}}
    {\ifblank{#3}{}{#3\space}%
     #1}%
  \ifthenelse{\value{listcount}<\value{liststop}}
    {\addcomma\space}
    {}}

in iso-authortitle.cbx.

I would like to use the standard definition of labelname, but I'm not sure what ISO author-title imposes on the presentation of author names in citations. Would only the last name be OK (+ initials or full name to avoid ambiguities - that feature can be turned off, though)?

The entire file seems a bit weird since iso-authortitle still implements some author-year style because of

\RequireCitationStyle{authoryear}

should that be \RequireCitationStyle{authortitle}?

What about the delimiters between names in citations? In the bibliography one should use a semicolon, I gather, but how about citations, would a comma be OK there?

@michal-h21
Copy link
Owner

I've added author-title mainly for completeness, it doesn't seem to be officially recommended. so if we want to keep it, it should be definitely based on standard authortitle.

@DavidLuptak
Copy link
Collaborator

biblatex's "related" mechanism is also not supported in, which shows in some entries (all kullback's look pretty much the same). It seems to work fairly well to steal the "related"-machinery from the end of standard.bbx and add the

(the end of comment #19 (comment))

The last bit from this comprehensive issue is probably the "related" mechanism, but I suppose it won't be as easy as adding a few lines of code at the end of each driver, since macros related:init and related are not part of biblatex.def, but standard.bbx (which is not inherited by this style). At least, I would mark it as nice-to-have feature for this style.

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

No branches or pull requests

3 participants