moewew / biblatex-trad

traditional bibliography styles with biblatex
LaTeX Project Public License v1.3c
31 stars 7 forks source link

extra comma if @article doesn't have a year #6

Closed djsutherland closed 12 years ago

djsutherland commented 12 years ago

For example, here's a bibtex entry:

@article{c-hilasso,
    author = {Sprechmann, Pablo and Ramirez, Ignacio and Sapiro, Guillermo and Eldar, Yonina C},
    title = {{C-HiLasso}: A Collaborative Hierarchical Sparse Modeling Framework},
    journal = {IEEE Transactions on Signal Processing},
    volume = {59},
    number = {9},
    pages = {4183--4198},
}

Note it doesn't have a year (purely by accident, but this should be supported).

The output looks like:

using the trad-unsrt style.

Adding the year put 2011. on the end there, as desired, but if there isn't a year that last comma should be a period instead.

marcodaniel commented 12 years ago

HI,

thanks for your feedback. I found the error and it can be fixed by:

\renewbibmacro*{issue+date-parens}{%
    \iffieldundef{issue}%
      {\usebibmacro{date}}%
      {\printfield{issue}%
       \setunit*{\addcomma\space}%
       \usebibmacro{date}}%
   \newunit}

Of course I will upload the new version.

regards Marco