Closed bastien-roucaries closed 2 years ago
If ok with the principle I can cook a better patch and made a pull request
This looks like a cool idea, but I'm wondering how useful it is in general. If people are defining lots of eprint
types like you and feel that they are duplicating a lot of work, they can probably whip up a helper macro that works for them (just as you did). But for the occasional use this might be overkill and if people define very exotic eprint
fields, something formulaic like this might not be enough (even though this approach looks quite customisable).
From the developer standpoint adding this also means that it has to be documented extensively and I'm just not sure if the effort of documenting all this properly is really worth the gain for power users with many eprint
definitions.
@moewew I will try to simplify the macro.
They are two part:
simpler:
\NewDocumentCommand{\DeclareEprintGeneric}{m O{always} m O{\thefield{eprint}} m}{
\DeclareFieldFormat{eprint:#1}{%
#3\addcolon\space%
\hrefeprint{#5}{#4}%
}%
\IfNoValueF{#2}%
{\DeclareOpenAccessEprintUrl[#2]{#1}{#5}}%
}
\DeclareEprintGeneric{ark}{ARK}[ark:/\thefield{eprint}]{https://identifiers.org/ark:/\thefield{eprint}}
\DeclareEprintGeneric{archive.org}{archive.org}{https://archive.org/details/\thefield{eprint}}
\DeclareEprintGeneric{BHL}{BHL}{https://www.biodiversitylibrary.org/bibliography/\thefield{eprint}}
\DeclareEprintGeneric{Caltech}{Caltech}{https://resolver.caltech.edu/\thefield{eprint}}
\DeclareEprintGeneric{DTIC}{DTIC}{https://apps.dtic.mil/docs/citations/\thefield{eprint}}
\DeclareEprintGeneric{DurhamEThese}{Durham E-These}{http://etheses.dur.ac.uk/\thefield{eprint}}
\DeclareEprintGeneric{DSpace@MIT}{DSpace{@}MIT}{https://dspace.mit.edu/handle/\thefield{eprint}}
\DeclareEprintGeneric{dtu.dk}{DTU.dk}{https://orbit.dtu.dk/files/\thefield{eprint}}
\DeclareEprintGeneric{EThOS}{EThOS}{https://ethos.bl.uk/OrderDetails.do?uin=\thefield{eprint}}
\DeclareEprintGeneric{HAL}{HAL~Id}{https://hal.archives-ouvertes.fr/\thefield{eprint}}
\DeclareEprintGeneric{hdl}{HDL}{http://hdl.handle.net/\thefield{eprint}}
\DeclareEprintGeneric{iastate}{iastate}{https://lib.dr.iastate.edu/\thefield{eprint}}
\DeclareEprintGeneric{LUT}{LUT}{http://lutpub.lut.fi/handle/\thefield{eprint}}
\DeclareEprintGeneric{KITopen-ID}{KITopen-ID}{https://publikationen.bibliothek.kit.edu/\thefield{eprint}}
\DeclareEprintGeneric{Manchester}{Manchester}{https://www.research.manchester.ac.uk/portal/files/\thefield{eprint}/FULL_TEXT.PDF}
\DeclareEprintGeneric{ResearchGate}{ResearchGate}{https://www.researchgate.net/publication/\thefield{eprint}}
\DeclareEprintGeneric{Tampere}{Tampere}{https://trepo.tuni.fi//handle/\thefield{eprint}}
\DeclareEprintGeneric{TUDelft}{TUDelft}{https://repository.tudelft.nl/islandora/object/uuid\%3A\thefield{eprint}}
\DeclareEprintGeneric{soton}{Soton}{https://eprints.soton.ac.uk/id/eprint/\thefield{eprint}}
\DeclareEprintGeneric{WhiteRose}{WhiteRose}{https://eprints.whiterose.ac.uk/\thefield{eprint}}
Sorry, I don't quite understand what you say about bibmacro eprint+eprintclass
. There is no such bibmacro. eprintclass
formatting is currently handled within the relevant field format (and only for arXiv
).
Now with the simplified macro I'd be even more tempted to say that it is fairly easy for people who want something like this to quickly define it themselves at exactly the level they need. As general macro implemented in the package here, I'm currently inclined to believe that it is almost impossible to strike a good balance between useful, generally applicable, customisable on the one hand and usability, 'documentability' on the other hand.
@moewew in fact in 99% of case eprint is always: eprintname: eprintfiledwithurl [optional eprintclass] so a eprint:* bibmacro with 3 parameter and one optional will be better and will even simplify biblatex code
Hmmm. Making this macro less complex obviously makes it easier to document and use, but at the same time it becomes almost trivial to replicate for people who want this (and possibly with additional bells and whistles people may want on a case-by-case basis). So I'm wondering how useful this is going to be. I guess on the whole biblatex
does not need to define all utility commands anyone would ever want to use. It is enough if the building blocks are there.
I'm going to close this and will not implement a macro like this in biblatex-ext
. As I said above, I don't believe that I can find a satisfying balance between usefulness on the one hand and usability/documentability on the other hand. Plus, this is going to be fairly niche stuff anyway. If you think this could be useful you can always share your code via question and self-answer on TeX.SX or other TeX forums, or you can create your own biblatex
utility package and send it off to CTAN.
Hi,
May be some part of the bug are better in biblatex, but in order to implement eprint effeciently I use: