josephwright / biblatex-ieee

A biblatex implementation of the IEEE bibliography style
LaTeX Project Public License v1.3c
47 stars 14 forks source link

Provide the option for abbreviated titles #4

Closed josephwright closed 11 years ago

josephwright commented 11 years ago

[Reported by sappjw]

It would be nice to be able to select the field to use for an abbreviated title of a journal on load of the module. I'd like to keep the whole name and abbreviated name in the same reference. I'm not sure what the right field is for this would be, but I'm using the shorttitle field in a conference proceedings reference as an example. I've hacked together the following in my preamble, but I'm sure there's a better way.

\renewbibmacro*{maintitle+booktitle(inproceedings)}{%
  \iffieldundef{maintitle}
  {%
    \iffieldundef{booktitle}
      {}
    {%
      \renewbibmacro{booktitle}{\emph{\iffieldundef{shorttitle}{\printfield{booktitle}}{\printfield{shorttitle}}}}%
      \usebibmacro{in:}%
      \usebibmacro{maintitle+booktitle}%
      \clearfield{eventtitle}%
      \clearfield{number}%
    }%
  }
  {%
    \renewbibmacro{booktitle}{\emph{\iffieldundef{shorttitle}{\printfield{booktitle}}{\printfield{shorttitle}}}}%
    \usebibmacro{in:}%
    \usebibmacro{maintitle+booktitle}%
    \clearfield{eventtitle}%
    \clearfield{number}%
  }%
}
josephwright commented 11 years ago

I'm very keen to stick as far as possible to 'standard' biblatex methods. Abbreviated titles are not really automatically handled by biblatex (that I know of). So for the moment I will leave this open as a feature request.

josephwright commented 11 years ago

With biblatex 2 this can be done using a dynamic replacement of one field by another at the biber level.