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

Transform citations with missing references #41

Closed
goerz opened this issue Sep 20, 2023 · 1 comment · Fixed by #43
Closed

Transform citations with missing references #41

goerz opened this issue Sep 20, 2023 · 1 comment · Fixed by #43
Labels
enhancement New feature or request

Comments

@goerz
Copy link
Member

goerz commented Sep 20, 2023

Following up from #39 (comment)

If there are missing references (citations with no corresponding entries in a bibliography, e.g. due to a missing key in the .bib file), makedocs will show errors like this:

[ Info: ExpandCitations
┌ Warning: Bibliography anchor for key 'Mills2014b' not found.
└ @ DocumenterCitations ~/.julia/packages/DocumenterCitations/f0eDy/src/citations.jl:456
[ Info: CrossReferences: building cross-references.
┌ Error: invalid local link/image: file does not exist in src/PALEOcopse.md
│   link =
│    @ast MarkdownAST.Link("@cite", "") do
│      MarkdownAST.Text("Mills2014b")
│    end
│    
└ @ Documenter ~/.julia/packages/Documenter/nGNwI/src/utilities/utilities.jl:44

The second error is probably more confusing than helpful (and definitely redundant). It would be better if during the ExpandCitations step, citations without a corresponding bibliography entry would be transformed to something that's no longer a markdown link. That way, it wouldn't get picked up by the later CrossReferences step.

Maybe just keeping the "link text" in square brackets and making it red or something would do.

@goerz goerz added the enhancement New feature or request label Sep 20, 2023
@goerz
Copy link
Member Author

goerz commented Sep 28, 2023

I'm going to go with rendering the citations as question marks, the same way LaTeX does it:

CleanShot 2023-09-28 at 15 24 55@2x

This is being implemented as part of #6

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.

1 participant