KWARC / LaTeX-proposal

The Proposal package for LaTeX
66 stars 34 forks source link

Allow user to choose citation style #27

Closed romangrothausmann closed 7 years ago

romangrothausmann commented 7 years ago

Using:

\PassOptionsToPackage{style= numeric}{biblatex}
\documentclass{dfgproposal}

to overwrite the citation style does not work (in contrast to e.g. backend= biber or natbib= true). Therefore, I removed the style specification from the DTX, making \PassOptionsToPackage{style=numeric}{biblatex} possible. Using \PassOptionsToPackage{style=alphabetic}{biblatex} corresponds to the former default.

kohlhase commented 7 years ago

(apart from the fact that I cannot understand how one could prefer numeric over alphabetic) I like the idea to make things more configurable. Is there a way to give a default? What is the default for biblatex BTW? I think I chose alphabetic to distinguish the general references from the DFG-mandated ones.

kohlhase commented 7 years ago

You enable \PassOptionsToPackage, is this for writing more customization files (EU or DFG?). Where would you use it? I think we need to update the documentation for this as well.

romangrothausmann commented 7 years ago

With the proposed changes I get numeric style by default for biblatex. If I add \PassOptionsToPackage{style=alphabetic}{biblatex} I get the exact same output as before. The only infos on citation style for DFG I could find were: "listed in standard format; book publications (fach- üblicher Gliederung; Buchveröffentlichungen)" on page 2 1_91_en.pdf (1_91_de.pdf), which seems not to forbid numeric style. I found no other way to change the citation style without modifying package files. It seems the style option cannot be overwritten like backend=biber which do not need package modifications.

The other occurrences of alphabetic in base/proposal.dtx, dfg/dfgproposal.dtx, eu/euproposal.dtx are only for the documentation PDF, aren't they?

sieversMartin commented 7 years ago

The style option has to be given as an optional argument to \usepackage (cf. 3.1.1 in the documentation). \ExecuteBibliographyOptions does not work.

kohlhase commented 7 years ago

Yes, that was also what I was contemplating.

sieversMartin commented 7 years ago

However, technically speaking using \PassOptionsToPackage should work as expected (did not test myself).

kohlhase commented 7 years ago

I will accept this pull request and then introduce an option numericcites to the three classes.

kohlhase commented 7 years ago

The new version has the numericcites option now.

romangrothausmann commented 7 years ago

Thanks for accepting. Using the new numericcites option works for me (and is all I need). My reason to remove the specification of the citation style (not replacing it) was, that it cannot be changed/overwritten, not even by \PassOptionsToPackage (nor \ExecuteBibliographyOptions). However, if the style is not specified in the proposal.sty it can be set by \PassOptionsToPackage. I don't know why overwriting the style option of biblatex does not work while overwriting e.g. backend=biber or natbib=true does work.