Skip to content

Add biblatex numeric bibliography style#10

Open
nvooijs wants to merge 4 commits into
EPTCS:mainfrom
nvooijs:main
Open

Add biblatex numeric bibliography style#10
nvooijs wants to merge 4 commits into
EPTCS:mainfrom
nvooijs:main

Conversation

@nvooijs
Copy link
Copy Markdown

@nvooijs nvooijs commented Apr 29, 2026

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 @inbook is 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-numeric to BibLaTeX. For automatically turning first names into initials, pass giveninits.

\usepackage[bibstyle=eptcs-numeric,giveninits]{biblatex}
\addbibresource{references.bib}

\begin{document}
    \nocite{*}
    \printbibliography
\end{document}

Example output

For generic.bib the output is attached. I modified the .bib file slightly; most importantly key should not be used (since in BibLaTeX it is the sortkey, so it overrides the default sorting), and edition should be either an integer or a full textual description (so 2 for a second edition, but "The Second and Revised Edition"), but never "Second". The modified generic.bib is 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 origlanguage and translator) (since I have a need for this feature). I suppose the style can be extended and modified as needs occur.

@k4rtik k4rtik self-requested a review May 5, 2026 12:02
Copy link
Copy Markdown
Member

@k4rtik k4rtik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Organization is missing in @inproceedings and @proceedings, also note the difference in the entries vs the original:

Original:

Image

PR:

Image

Specifically, @proceedings should include the editors not authors.

  1. @phdthesis, @mastersthesis, and @manual all 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:

Image

PR:

Image
  1. 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?

Niels and others added 2 commits May 6, 2026 15:46
* Add organization in proceedings-like entry types
* Remove number from theses and manuals
@nvooijs
Copy link
Copy Markdown
Author

nvooijs commented May 7, 2026

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 \if... command). Issue 3 was caused by issues with the .bib file, not the style. I improved the .bib file for use with biblatex and committed it (generic-biblatex.bib) together with an example usage file example-biblatex.tex.

What is your opinion on the doi, eprint and url font?

@k4rtik
Copy link
Copy Markdown
Member

k4rtik commented May 18, 2026

Sorry, it will take me some time to review the changes in detail.

What is your opinion on the doi, eprint and url font?

I personally prefer them to be \texttt. @rvglabbeek do you have any objections to switching to monospace fonts for these fields?

@rvglabbeek
Copy link
Copy Markdown

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.

@k4rtik k4rtik self-requested a review May 20, 2026 09:42
k4rtik

This comment was marked as resolved.

@k4rtik
Copy link
Copy Markdown
Member

k4rtik commented May 20, 2026

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
@nvooijs
Copy link
Copy Markdown
Author

nvooijs commented May 26, 2026

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 number field, not the volume field. volume is the volume of n item in a multi-volume work, not the volume in a series. So I think the current behaviour is correct. I think we should adhere to biblatex's datamodel, so a .bib file written for use with biblatex can be used without modification with our style. That is one of the major advantages of providing a biblatex style to begin with.

@nvooijs
Copy link
Copy Markdown
Author

nvooijs commented May 27, 2026

So to comment on the chapter issue:

In the biblatex documentation, the chapter field is documented as follows:

chapter field (literal)
A chapter or section or any other unit of a work.

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

chapter = {section 2.1}

or

chapter = {chapter 2}

Now, if you specify this on a @book entry, it is clear what it means: you cite a chapter in this book. But for an @inbook it is ambiguous: it could either be that you cite a section in the inbook, or it could mean that the inbook is that chapter in the book that contains it. In the first case, it should be rendered as part of the first part of the reference, i.e.

J. Doe (2026): \textit{A Chapter from the Handbook}, section 2.1, pp. 123 -- 137. In E. Tor: \textsl{The Handbook} [...]

but in the latter case it should be part of the second part, i.e.

J. Doe (2026): \textit{A Chapter from the Handbook}. In E. Tor: \textsl{The Handbook}, Publisher, chapter 2, pp. 110 -- 150, doi:DOI.

Note that for pages we have the same problem. Citing the EPTCS bibliography style webpage:

Note that there is a semantic difference between page numbers in the first sentence and page numbers in the second.

My proposal would be to only allow chapter on @inbook and @incollection, and always interpret it in the latter way, i.e. indicating which chapter an inbook or incollection is in the book or collection that contains it. If it is an integer, we can prefix the "chapter" automatically, if it is a string literal we print it as is.

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:

Whether a bibliography should at all include references to chapters or sections is controversial because a chapter is not a bibliographic entity.

(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.)

Copy link
Copy Markdown
Member

@k4rtik k4rtik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

biblatex.patch

Here's the final rendering:

Image
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 the version, organization, and publisher lists, as well as URL/DOI details.
    • @dataset: Supports printing version, publisher, and DOI/URL details.
  • Sourcemap Correction: Fixed the \DeclareSourcemap configuration to use \pertype{proceedings} and \pertype{mvproceedings} instead of a typesource step. The previous configuration was clearing the entry type completely in Biber's output, generating the Package biblatex Warning: No driver for '' warning and fallback errors.
  • Dedicated @booklet Driver: Created a dedicated @booklet driver that properly prints the howpublished and address (location) fields, matching the original BibTeX booklet behavior.
  • Dedicated @unpublished Driver: Created a dedicated @unpublished driver that ignores the howpublished field (which is not supported on unpublished entries in eptcs.bst).
  • @inbook Driver Field Order & Punctuation: Corrected the inbook driver field order to print pages immediately after chapter+type (separated by a comma), followed by a block period and the series/publisher details, aligning exactly with the inbook function in eptcs.bst.
  • Chapter Formatting & Double Prefixing: Redefined the chapter field format to raw (#1) and created a custom chapter+type macro to format the fields sequentially, preventing double-prefixing.
  • Dedicated Drivers for Book/Collection Sections: Created dedicated @inproceedings and @incollection drivers, separating them from the previous combined alias. This correctly restricts edition and chapter fields from @inproceedings while enabling them on @incollection.
  • Editor Fallback for @inbook: Added support for inbooklike author formatting in the entryauthor macro, which falls back to editors when the author field is empty (matching inbookE rendering).
  • Volume to Number Fallback: Redefined series+number to fall back to the volume field if number is missing. This prevents LNCS-style volume numbers from disappearing.
  • Dedicated @manual Driver: Implemented a dedicated driver for @manual entries to properly print the organization list and address fields, while omitting the series and number fields to match the BibTeX template behaviour.
  • Dedicated @proceedings Driver: Defined a dedicated @proceedings driver separate from @collection to omit printing the edition field, matching the original BibTeX template behavior.
  • Misc Driver Conditional Type Check: Added a conditional check so that the type field is only printed for actual @misc entries.
  • Eprint Format Typo Correction: Discovered that lines 105 to 110 in eptcs-base.bbx had 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 \DeclareEprintFieldFormat macro 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 (latexproject of type @online, numpy of type @software, and climate_data of 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 with https:// for both bibliographystylewebpage and multipleauthors entries.
  • Removed Workarounds: Reverted the database workarounds in inbookA, inbookE, proceedings, inproceedings, and incollection back to the original VOLUME fields.

Comment thread generic-biblatex.bib

@MISC{multipleauthors,
TITLE = "Centering issues with multiple authors with the same affiliation, {EPTCS} format",
URL = "http://tex.stackexchange.com/q/344794/63917",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
URL = "http://tex.stackexchange.com/q/344794/63917",
URL = "https://tex.stackexchange.com/q/344794/63917",

Comment thread generic-biblatex.bib
ORGANIZATION = "EPTCS",
TITLE = "The EPTCS bibliography style",
YEAR = "2010",
url = "http://biblio.eptcs.org",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = "http://biblio.eptcs.org",
url = "https://biblio.eptcs.org",

Comment thread generic-biblatex.bib
Comment on lines +111 to +113
@INBOOK{inbookE,
noAUTHOR = "A. Ut and H. Or and Co Author",
EDITOR = "E. D. I. Thor and E. di Thor",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this entry should list the editors first:

Image

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:

Image

Also note other discrepancies.

Comment thread eptcs-base.bbx
Comment on lines +106 to +110
\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} }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\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} }

Comment thread eptcs-base.bbx
\newunitblock
\newunit
\ifentrytype{manual}
{\printfield{organization}}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this suggestion if you add a dedicated manual driver:

Suggested change
{\printfield{organization}}
{%
\printlist{organization}%
\newunit
\printlist{location}%
}

Comment thread eptcs-base.bbx
}{}%
\ifstrequal{#1}{incollectionlike}{%
\usebibmacro{author}%
}{}%
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}{}%
}{}%
\ifstrequal{#1}{inbooklike}{%
\usebibmacro{author/editor+others}%
}{}%

Comment thread eptcs-base.bbx
\usebibmacro{finentry}%
}
\DeclareBibliographyAlias{thesis}{report}
\DeclareBibliographyAlias{manual}{report}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a dedicated manual driver instead of aliasing to report.

  1. Aliasing it incorrectly prints the type field (which is ignored in BibTeX).

  2. \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.

Comment thread eptcs-base.bbx
Comment on lines +323 to +325
\DeclareBibliographyAlias{inbook}{incollection}
\DeclareBibliographyAlias{bookinbook}{inbook}
\DeclareBibliographyAlias{inproceedings}{incollection}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@k4rtik
Copy link
Copy Markdown
Member

k4rtik commented May 31, 2026

Addressing the concerns you raised:

Onseries+number fallback:

While it is correct that the BibLaTeX datamodel uses number for series volume/number, many authors will compile papers using existing .bib files where the series volume is set in volume = {443} (following traditional BibTeX conventions for LNCS, LIPIcs, etc.). Under the current PR code, these volume numbers completely disappear from the references. To support seamless backward compatibility, we can implement a fallback that checks number first, and if undefined, falls back to volume. This accommodates legacy databases without violating standard BibLaTeX datamodel compliance for new files. My patch includes this.

On chapter+type rendering:

To implement your proposal for chapter formatting while preventing double-prefixing (e.g., rendering Type (of chapter) chapter II), we can redefine the chapter field format to output the raw value and use a custom chapter+type macro:

\DeclareFieldFormat{chapter}{#1}

\newbibmacro*{chapter+type}{%
    \iffieldundef{chapter}
        {}
        {%
            \iffieldundef{type}
                {\bibstring{chapter}}
                {\printfield{type}}%
            \setunit{\addspace}%
            \printfield{chapter}%
        }%
}

When we print this in the @incollection and @inbook drivers (but omit it from the @inproceedings driver), it aligns with the BibTeX formatting and resolves the ambiguity exactly as you proposed. Again, included in the patch.

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

Successfully merging this pull request may close these issues.

3 participants