Add biblatex numeric bibliography style#10
Conversation
There was a problem hiding this comment.
Thanks for your contribution!
Could you also update the Makefile targets such as dist to include these new files? It might also help to have an example-biblatex.tex that demonstrates how to use the template along with a new make target.
I noticed a few discrepancies in the rendering of References:
- Organization is missing in
@inproceedingsand@proceedings, also note the difference in the entries vs the original:
Original:
PR:
Specifically, @proceedings should include the editors not authors.
@phdthesis,@mastersthesis, and@manualall print the number field (PhD thesis 21, Master's thesis 21, Type 21), whereas the existing EPTCS BibTeX style does not treat them as numbered technical reports. See
Original:
PR:
- Some initials are incorrect, e.g. "Stack Exchange" -> "S.E." and "R.J. van Glabbeek" -> "R. van Glabbeek".
There might be other variations but these are the ones that stood out to me. Could you ensure these and other discrepancies from the original are fixed and I will take another pass at reviewing?
* Add organization in proceedings-like entry types * Remove number from theses and manuals
|
Thank you for the comments. I fixed issues 1 and 2 in the style file (I thought I had already fixed 2 previously, but I had used a wrong What is your opinion on the doi, eprint and url font? |
|
Sorry, it will take me some time to review the changes in detail.
I personally prefer them to be |
|
Hi K4rtik, thanks for alerting me; I had not spotted this conversation yet. No, I do not have any objections to the use of monospace fonts for doi, eprint and url. |
|
I am also including a patch with all the suggestions: fix_alignment.patch |
* Resolve warnings * Correct author rendering for collections (ignore author) * Mandate author for articles, incollections, theses * Do abbreviate page/pages * Add organization and edition to manuals
|
1, 4, 5, 8, 9: Solved 2, 3: Hallucinated. However, there is an underlying issue, I don't print the chapter field yet; it is a bit problematic for reasons I'll follow up on. 6, 7: The biblatex documentation indicates that the number within a series for a book must be given in the |
|
So to comment on the chapter issue: In the biblatex documentation, the chapter field is documented as follows:
So it can refer to a part, chapter, section, subsection, etc. The field is literal and there is no field for describing the chapter kind (part, chapter, section, ...), so it could for example be or Now, if you specify this on a but in the latter case it should be part of the second part, i.e. Note that for pages we have the same problem. Citing the EPTCS bibliography style webpage:
My proposal would be to only allow The reason to assume chapter indicates which chapter the inbook is in a book is that the other use is controversial. Citing the biblatex manual:
(This would be consistent with how I handle pages currently, and the rendering of pages gives the same output as the bibtex style on the test file.) (Maybe cc @rvglabbeek since this is a question about style.) |
There was a problem hiding this comment.
I am including a patch that handles all the issues I identified and fixed with the help of Gemini/Antigravity.
If you choose to apply this patch, you can ignore my inline suggestions as part of the review.
Here's the final rendering:
Changes Made
1. Style Package Enhancements (eptcs-base.bbx)
- Dedicated Modern Drivers (
@online,@software,@dataset): Instead of aliasing modern entry types to@misc(which would ignore key fields), we implemented dedicated drivers to render them naturally:@online: Correctly prints author/editor, title, date, URL, and the formatted access date (urldate).@software: Supports printing theversion,organization, andpublisherlists, as well as URL/DOI details.@dataset: Supports printingversion,publisher, and DOI/URL details.
- Sourcemap Correction: Fixed the
\DeclareSourcemapconfiguration to use\pertype{proceedings}and\pertype{mvproceedings}instead of atypesourcestep. The previous configuration was clearing the entry type completely in Biber's output, generating thePackage biblatex Warning: No driver for ''warning and fallback errors. - Dedicated
@bookletDriver: Created a dedicated@bookletdriver that properly prints thehowpublishedandaddress(location) fields, matching the original BibTeX booklet behavior. - Dedicated
@unpublishedDriver: Created a dedicated@unpublisheddriver that ignores thehowpublishedfield (which is not supported on unpublished entries ineptcs.bst). @inbookDriver Field Order & Punctuation: Corrected theinbookdriver field order to print pages immediately afterchapter+type(separated by a comma), followed by a block period and the series/publisher details, aligning exactly with theinbookfunction ineptcs.bst.- Chapter Formatting & Double Prefixing: Redefined the
chapterfield format to raw (#1) and created a customchapter+typemacro to format the fields sequentially, preventing double-prefixing. - Dedicated Drivers for Book/Collection Sections: Created dedicated
@inproceedingsand@incollectiondrivers, separating them from the previous combined alias. This correctly restricts edition and chapter fields from@inproceedingswhile enabling them on@incollection. - Editor Fallback for
@inbook: Added support forinbooklikeauthor formatting in theentryauthormacro, which falls back to editors when the author field is empty (matchinginbookErendering). - Volume to Number Fallback: Redefined
series+numberto fall back to thevolumefield ifnumberis missing. This prevents LNCS-style volume numbers from disappearing. - Dedicated
@manualDriver: Implemented a dedicated driver for@manualentries to properly print theorganizationlist and address fields, while omitting theseriesandnumberfields to match the BibTeX template behaviour. - Dedicated
@proceedingsDriver: Defined a dedicated@proceedingsdriver separate from@collectionto omit printing theeditionfield, matching the original BibTeX template behavior. - Misc Driver Conditional Type Check: Added a conditional check so that the
typefield is only printed for actual@miscentries. - Eprint Format Typo Correction: Discovered that lines 105 to 110 in
eptcs-base.bbxhad prefixing colons in eprint types (e.g.:arxiv), causing double colons during macro generation. We removed the colon prefix from the type names and updated the\DeclareEprintFieldFormatmacro definition to use\ifstrempty{#1}for properly mapping empty formatting fallbacks.
2. Database Cleanup & Example Expansion
- Modern Entries in
generic-biblatex.bib: Appended three modern example entries (latexprojectof type@online,numpyof type@software, andclimate_dataof type@dataset) to demonstrate correct formatting of modern BibLaTeX features. - Citations in
example-biblatex.tex: Added a "Modern Entry Types" section and cited all three new entries to verify they render correctly in the bibliography. - Security Improvements: Replaced insecure
http://URLs withhttps://for bothbibliographystylewebpageandmultipleauthorsentries. - Removed Workarounds: Reverted the database workarounds in
inbookA,inbookE,proceedings,inproceedings, andincollectionback to the originalVOLUMEfields.
|
|
||
| @MISC{multipleauthors, | ||
| TITLE = "Centering issues with multiple authors with the same affiliation, {EPTCS} format", | ||
| URL = "http://tex.stackexchange.com/q/344794/63917", |
There was a problem hiding this comment.
| URL = "http://tex.stackexchange.com/q/344794/63917", | |
| URL = "https://tex.stackexchange.com/q/344794/63917", |
| ORGANIZATION = "EPTCS", | ||
| TITLE = "The EPTCS bibliography style", | ||
| YEAR = "2010", | ||
| url = "http://biblio.eptcs.org", |
There was a problem hiding this comment.
| url = "http://biblio.eptcs.org", | |
| url = "https://biblio.eptcs.org", |
| @INBOOK{inbookE, | ||
| noAUTHOR = "A. Ut and H. Or and Co Author", | ||
| EDITOR = "E. D. I. Thor and E. di Thor", |
There was a problem hiding this comment.
I believe this entry should list the editors first:
Add inbooklike author logic in eptcs-base.bbx in entryauthor macro (see my inline comment there) so that @inbook entries with empty authors can fall back to editors at the start of the reference, matching the behavior of BibTeX:
Also note other discrepancies.
| \DeclareEprintFieldFormat{:arxiv}{arXiv}{\mkarxivurl}{ bool{true} } | ||
| \DeclareEprintFieldFormat{:hdl}{HDL}{\mkhdlurl}{ bool{true} } | ||
| \DeclareEprintFieldFormat{:jstor}{JSTOR}{\mkjstorurl}{ bool{true} } | ||
| \DeclareEprintFieldFormat{:pubmed}{PMID}{\mkpubmedurl}{ bool{true} } | ||
| \DeclareEprintFieldFormat{:googlebooks}{Google Books}{\mkgooglebooksurl}{ bool{true} } |
There was a problem hiding this comment.
| \DeclareEprintFieldFormat{:arxiv}{arXiv}{\mkarxivurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{:hdl}{HDL}{\mkhdlurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{:jstor}{JSTOR}{\mkjstorurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{:pubmed}{PMID}{\mkpubmedurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{:googlebooks}{Google Books}{\mkgooglebooksurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{arxiv}{arXiv}{\mkarxivurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{hdl}{HDL}{\mkhdlurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{jstor}{JSTOR}{\mkjstorurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{pubmed}{PMID}{\mkpubmedurl}{ bool{true} } | |
| \DeclareEprintFieldFormat{googlebooks}{Google Books}{\mkgooglebooksurl}{ bool{true} } |
| \newunitblock | ||
| \newunit | ||
| \ifentrytype{manual} | ||
| {\printfield{organization}} |
There was a problem hiding this comment.
Ignore this suggestion if you add a dedicated manual driver:
| {\printfield{organization}} | |
| {% | |
| \printlist{organization}% | |
| \newunit | |
| \printlist{location}% | |
| } |
| }{}% | ||
| \ifstrequal{#1}{incollectionlike}{% | ||
| \usebibmacro{author}% | ||
| }{}% |
There was a problem hiding this comment.
| }{}% | |
| }{}% | |
| \ifstrequal{#1}{inbooklike}{% | |
| \usebibmacro{author/editor+others}% | |
| }{}% |
| \usebibmacro{finentry}% | ||
| } | ||
| \DeclareBibliographyAlias{thesis}{report} | ||
| \DeclareBibliographyAlias{manual}{report} |
There was a problem hiding this comment.
Consider a dedicated manual driver instead of aliasing to report.
-
Aliasing it incorrectly prints the type field (which is ignored in BibTeX).
-
\printfield{organization}was being used (see suggestion on line 395 above), but organization is a list, not a field, in BibLaTeX (so it fails to print). Implementing a dedicated manual driver solves both issues.
| \DeclareBibliographyAlias{inbook}{incollection} | ||
| \DeclareBibliographyAlias{bookinbook}{inbook} | ||
| \DeclareBibliographyAlias{inproceedings}{incollection} |
There was a problem hiding this comment.
Instead of aliasing inbook and inproceedings to incollection, we should define them separately. This keeps @inproceedings clean (since conference papers in EPTCS do not print edition or chapter fields) while enabling those fields on @incollection and @inbook.
|
Addressing the concerns you raised: On While it is correct that the BibLaTeX datamodel uses On To implement your proposal for chapter formatting while preventing double-prefixing (e.g., rendering \DeclareFieldFormat{chapter}{#1}
\newbibmacro*{chapter+type}{%
\iffieldundef{chapter}
{}
{%
\iffieldundef{type}
{\bibstring{chapter}}
{\printfield{type}}%
\setunit{\addspace}%
\printfield{chapter}%
}%
}When we print this in the |
An attempt at issue #6.
Adds a BibLaTeX numeric bibliography style based the EPTCS bibliography documentation https://biblio.eptcs.org/ and the example output of the BibTeX implementation https://cgi.cse.unsw.edu.au/~eptcs/example.pdf#page.4.
Deviations from BibTeX style
I focused on the spirit of the bibliography style; bit-for-bit compatibility is not possible anyway due to differences between the bibtex and biblatex datamodel.
For example, in the biblatex datamodel an
@inbookis like an@inproceedings: an independent part of a book, with its own title and (usually) its own authors. Thus, I implemented it as an alias to@inproceedings.There is one main difference between my implementation and what the documentation specifies: I did put all links (that is dois, eprints and urls) in
\texttt. I can change this if you like, but I really suggest you consider putting these items in typewriter (\texttt) or sans serif (\textsf) font; a url or long doi in standard font looks pretty ugly to me, and, more importantly, is quite unreadable, in my opinion.Usage
Pass
bibstyle=eptcs-numericto BibLaTeX. For automatically turning first names into initials, passgiveninits.Example output
For
generic.bibthe output is attached. I modified the.bibfile slightly; most importantlykeyshould not be used (since in BibLaTeX it is the sortkey, so it overrides the default sorting), andeditionshould be either an integer or a full textual description (so2for a second edition, but"The Second and Revised Edition"), but never"Second". The modifiedgeneric.bibis also attached.Future
The BibLaTeX datamodel vastly extends the BibTeX one, and currently only very little extra information is rendered. I implemented subtitles (and journalsubtitles, booksubtitles), and in the notes part of the reference I render translation information (e.g. "Translated from the Russian by J. Doe", using
origlanguageandtranslator) (since I have a need for this feature). I suppose the style can be extended and modified as needs occur.