plk / biblatex-apa

APA style for BibLaTeX
88 stars 48 forks source link

eprint fields are ignored (?) #198

Closed nkr0 closed 1 year ago

nkr0 commented 1 year ago

Are eprint fields ignored in apa style?

@article{test,
 author = "author",
 journal = "journal",
 title = "Title",
 eprinttype = "jstor",
 eprint = "1",
 url = "https://www.jstor.org/stable/1",
 year = "2000"
}

In the default style the eprint info gets formatted as "JSTOR: 1". In APA style this is completely ignored.

In APA, a DOI is shown as a regular url. Perhaps, we could also show eprint info as regular urls. So for the JSTOR eprint in APA we could add

\DeclareFieldFormat{eprint:jstor}{%
  \ifhyperref
    {\href{https://www.jstor.org/stable/#1}{\nolinkurl{https://www.jstor.org/stable/#1}}}
    {\nolinkurl{https://www.jstor.org/stable/#1}}}
\DeclareFieldAlias{eprint:JSTOR}{eprint:jstor}
plk commented 1 year ago

EPRINT is only used in ONLINE entry types in the style (see the examples .bib files that come with the style. APA style now basically allows URLs for any type and doesn't have any special syntax for known online repositories like JSTOR.

nkr0 commented 1 year ago

I didn't know that EPRINT is used only in ONLINE. However, I don't like the result when I use EPRINTs and URLs together for a bib entry. When using APA style only the URL is printed. Because EPRINT fields are ignored. image But in the regular style, both the EPRINT and URL prints repetitive info. I could remove EPRINT altogether but sometimes that is the output you want to have, and not a full URL image It's a bit of a hassle to add/remove fields when switching between styles.

plk commented 1 year ago

You can use sourcemaps to delete data dynamically based on various conditionals, see the biblatex manual.