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

Printing of journal issue numbers #42

Closed
mutlusun opened this issue Sep 7, 2017 · 3 comments
Closed

Printing of journal issue numbers #42

mutlusun opened this issue Sep 7, 2017 · 3 comments

Comments

@mutlusun
Copy link

mutlusun commented Sep 7, 2017

Hello,

thanks for providing the apa style in biblatex! Recently I discovered that this style is always printing the journal issue number after the volume number. According to APA v6 this should only be done if the journal is paginated seperately by issue (see page 199 of the manual as well):

apa0

So I created some little workaround:

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addcomma\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}
     \setunit{\addcomma\space}}%
  \printfield{volume}%
  \ifboolexpr{ test{\iffieldequalstr{journaltitle}{The Academy of Management Executive}} or
               test{\iffieldequalstr{journaltitle}{Another Journal}}}
    {\printfield{number}}%
    {}%
  \setunit{\addspace}\newblock
  \usebibmacro{issuename}%
  \newunit}

It is only checking for journals that have issues paginated seperately by issue. Before doing a real pull request I wanted to ask what do you think about this extension? I see following issues right now:

  • only journaltitle is checked and not journal
  • the jounals here are hardcoded. Is it possible to check a user created list instead? (Sorry, I'm no tex expert.)

Thanks!

@plk
Copy link
Owner

plk commented Sep 7, 2017

A better way to do this is by using the biber sourcemap feature. Simply always include number in your journal entries and then add this to your preamble:

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
       \step[fieldsource=journaltitle,
             match=\regexp{(?:journal\stitle\sone|journal\stitle\stwo)}]
       \step[fieldset=number, null]
    }
  }
}

Where "journal title one" and "journal title two" are journals known to paginate across complete volumes. It will remove the number field where it is not necessary before biblatex sees the data. You don't need to care about the field journal as the default biblatex driver sourcemaps automatically convert this to journaltitle anyway.

I will add a note about how to do this in the next release documentation.

@mutlusun
Copy link
Author

Hello,

thanks for your help and your suggestion! As I copied your example, it removed the number from all journals (regardless of the regex). But this solved my issue:

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
       \step[fieldsource=journaltitle,
             notmatch=\regexp{(?:The\sAcademy\sof\sManagement\sExecutive|My\sOther\sJournal)},
             final]
       \step[fieldset=number, null]
    }
  }
}

If I got the biblatex manual right, your \step was missing a final argument to jump out of the map directive. Or I missed something else ;-)

Regards
mutlusun

@plk
Copy link
Owner

plk commented Sep 12, 2017

You are probably right, thanks for checking.

@plk plk closed this as completed Sep 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants