ali-ramadhan / DocumenterCitations.jl

DocumenterCitations.jl uses Bibliography.jl to add support for BibTeX citations and references in documentation pages generated by Documenter.jl.
https://ali-ramadhan.github.io/DocumenterCitations.jl/dev
MIT License
65 stars 10 forks source link

Docs compilation error #24

Open lpawela opened 3 years ago

lpawela commented 3 years ago

When trying to compile the documentation (lpawela/numericalshadow.org@90c5d5c) I get an error

ERROR: LoadError: MethodError: no method matching header_level(::BibInternal.Entry)
Closest candidates are:
  header_level(::Markdown.Header{N}) where N at /home/lpawela/.julia/packages/Documenter/WSKVc/src/Utilities/Utilities.jl:315
Stacktrace:
 [1] populate!(::Documenter.Documents.ContentsNode, ::Documenter.Documents.Document) at /home/lpawela/.julia/packages/Documenter/WSKVc/src/Documents.jl:428
 [2] populate!(::Documenter.Documents.Document) at /home/lpawela/.julia/packages/Documenter/WSKVc/src/Documents.jl:390
 [3] runner(::Type{Documenter.Builder.Populate}, ::Documenter.Documents.Document) at /home/lpawela/.julia/packages/Documenter/WSKVc/src/Builder.jl:235
 [4] dispatch(::Type{Documenter.Builder.DocumentPipeline}, ::Documenter.Documents.Document) at /home/lpawela/.julia/packages/Documenter/WSKVc/src/Utilities/Selectors.jl:167
 [5] #2 at /home/lpawela/.julia/packages/Documenter/WSKVc/src/Documenter.jl:240 [inlined]
 [6] cd(::Documenter.var"#2#3"{Documenter.Documents.Document}, ::String) at ./file.jl:104
 [7] #makedocs#1 at /home/lpawela/.julia/packages/Documenter/WSKVc/src/Documenter.jl:239 [inlined]
 [8] top-level scope at /home/lpawela/new-zksi-repo/numericalshadow.org/make.jl:95
 [9] include(::Function, ::Module, ::String) at ./Base.jl:380
 [10] include(::Module, ::String) at ./Base.jl:368
 [11] exec_options(::Base.JLOptions) at ./client.jl:296
 [12] _start() at ./client.jl:506
in expression starting at /home/lpawela/new-zksi-repo/numericalshadow.org/make.jl:95

Without DocumenterCitations everwything works. Am I doing something wrong?

ali-ramadhan commented 3 years ago

Ah can't say I've seen this error before. Thanks for reporting @lpawela.

Looks like you're doing the same thing as the docs here so I don't see why it wouldn't work: https://github.com/ali-ramadhan/DocumenterCitations.jl/blob/master/docs/src/references.md

Out of curiousity what version of Documenter.jl are you using?

ali-ramadhan commented 3 years ago

Does it work if you remove this line?

https://github.com/lpawela/numericalshadow.org/commit/90c5d5c#diff-dcdb2a729680cbe4d6a1d508ce9872ec70432612b7ee3b22d88d9c086842f6bcL1

lpawela commented 3 years ago

Yes, it works, but gives warnings

[ Info: Expanding citation: gallay2010the.
┌ Warning: reference for 'gallay2010the' could not be found in src/numerical-shadow.md.
└ @ DocumenterCitations ~/.julia/packages/DocumenterCitations/Kqcie/src/citations.jl:50

As for the version

(@v1.5) pkg> st
  [e30172f5] Documenter v0.25.0 `https://github.com/JuliaDocs/Documenter.jl.git#v0.25.0`
  [daee34ce] DocumenterCitations v0.1.0
ali-ramadhan commented 3 years ago

Ah from looking at https://github.com/lpawela/numericalshadow.org/commit/fa9d0aa0d9a3ae7fec282164a954c801a4e180ab I think you deleted the

```@bibliography


block so yeah the references won't be found. Does it work if you just remove the `# Literature` header and leave the `@bibliography` block intact?

One thing to also try is to upgrade to the latest version of Documenter.jl (v0.25.3) and maybe try the latest version of DocumenterCitations.jl (via `] add DocumenterCitations#master` for now).
lpawela commented 3 years ago

The error is still present with

[e30172f5] Documenter v0.25.3
[daee34ce] DocumenterCitations v0.1.0 `https://github.com/ali-ramadhan/DocumenterCitations.jl.git#master`
pnavaro commented 3 years ago

I have the same error. I had to remove the @contents Documenter macro to make things work.

guilgautier commented 3 years ago

As proposed in #33, you can simply

Remove the file where the @bibliography block is called, from the list of Pages involved in all @contents block.

In your case, you may consider

cmichelenstrofer commented 1 year ago

Had the same error. Removing the @contents worked.

goerz commented 1 year ago

Please check if this is still a problem with the newly released DocumenterCitations.jl v1.0. If so, can you open a new issue at https://github.com/JuliaDocs/DocumenterCitations.jl/issues?

goerz commented 1 year ago

It's still a problem, now tracked at https://github.com/JuliaDocs/DocumenterCitations.jl/issues/16