Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note = not displayed (or: add customs fields in display of a BibteX entry) #20

Closed
kellertuer opened this issue Jul 14, 2023 · 5 comments · Fixed by #32
Closed

Note = not displayed (or: add customs fields in display of a BibteX entry) #20

kellertuer opened this issue Jul 14, 2023 · 5 comments · Fixed by #32
Labels
enhancement New feature or request

Comments

@kellertuer
Copy link
Contributor

I would like to add notes to references to mention open access preprints (since we have BibTeX and not BibLaTeX where I could use eprint=), but if I provide a note= field, this is not shown in the :alpha style. Is there an easy trick to add this (i.e. a modification / an own style)?
Or is that something where Bibliography takes care of the rendering?

@goerz
Copy link
Member

goerz commented Jul 14, 2023

If you want a dirty hack, you can just overwrite the format_bibliography_reference method

function format_bibliography_reference(::Val{:numeric}, entry)
authors = format_names(entry; names=:last) |> tex2unicode
link = xlink(entry)
title = xtitle(entry) |> tex2unicode
published_in = format_published_in(entry) |> tex2unicode
return "$authors. <i>$title</i>. $(linkify(published_in, link))."
end

This is not considered part of the public/stable API, of course.

I'd definitely be open to including the Note field. Generally, I've tried to mimic RevTeX as much as possible, based on these test files (up to some small improvements like italicizing titles and putting last names first in the author-year bibliographies). RevTeX will print Note fields in these examples, so I think we should as well. Consider the feature requested for the next version!

Can you give an example for what you typically put in the note field in this case? Specifically, do you include any kind of URL? As I mentioned before, there is the potential issue that for real LaTeX, all strings are rendered through the TeX engine, whereas here, they get some minimal cleanup and are then considered plain text or markdown. So support for something like \url might be tricky.

@kellertuer
Copy link
Contributor Author

I am currently stepping away from the automatic export I considered before, since most my “original data” is BibLaTeX anyways. What I would like to add/mimic is the mentioning of open access preprints.

The example is

https://github.com/JuliaManifolds/Manopt.jl/blob/98adc93e1ebb1982562a87caefac481401e18ac3/docs/src/references.bib#L61

And for the reason mentioned above, I directly went for Markdown links and not URL links.
(The idea is that later when one has BibLaTeX I would switch these back to my original entries that use eprint and eprinttype fields from BibLaTeX). So Markdown is totally fine – at least for me.

But – thanks for considering this as a potential feature :) It is not urgent but I feel always nicer for readers to have an open access alternative to the DOIs (of non-OA Journals).

@goerz goerz added the enhancement New feature or request label Jul 14, 2023
@goerz
Copy link
Member

goerz commented Jul 16, 2023

I'd also be strongly inclined to add support for the eprint and archivePrefix fields, which are supported in RevTeX (see the section "arXiv.org support" in the Author's Guide). That way, you wouldn't need to worry about URLs in note fields.

@kellertuer
Copy link
Contributor Author

That would also be great 😊

@goerz
Copy link
Member

goerz commented Jul 30, 2023

Implemented in #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants