Publish.jl
Publish.jl copied to clipboard
BibTeX bibliography for PDF output
It'd be very cool to support bibtex citations!
There's some rudimentary support for this already, implemented in https://github.com/MichaelHatherly/Publish.jl/blob/c03914feac59fc3937a752bc68a69f16d5507736/src/load.jl#L19-L39 but undocumented currently since I'm not yet decided on the final public interface for it. It is something I'd like to finish off, but just requires time to complete mostly.
wooooohhhh cool! will try it out and let you know!
I tried with latest commit. In my Package.toml
:
[publish]
author = "test"
title = "DRAFT"
[publish.latex]
bibliography = "bibliography.bib"
My bibliography.bib
@article{grant2002principles,
title={Principles of Programming Languages Version 1.0. 3},
author={Grant, Mike and Palmer, Zachary and Smith, Scott},
year={2002}
}
note: this is a BETA release; ask questions and report bugs at https://tectonic.newton.cx/
Running TeX ...
warning: ./sections/calculator.tex:53: Overfull \hbox (169.03484pt too wide) in paragraph at lines 53--53
warning: warnings were issued by the TeX engine; use --print and/or --keep-logs for details.
Running xdvipdfmx ...
Writing `./WPLJ.toc` (685 B)
Writing `./WPLJ.pdf` (33.36 KiB)
Writing `./WPLJ.bcf` (88.40 KiB)
Writing `./WPLJ.run.xml` (2.29 KiB)
Writing `./WPLJ.aux` (1.90 KiB)
Writing `./WPLJ.out` (344 B)
INFO - This is Biber 2.14
INFO - Logfile is './WPLJ.blg'
INFO - Reading './WPLJ.bcf'
ERROR - Error: Found biblatex control file version 3.4, expected version 3.7.
This means that your biber (2.14) and biblatex (3.11) versions are incompatible.
See compat matrix in biblatex or biber PDF documentation.
INFO - ERRORS: 1
┌ Error: An error happened whilst watching files; shutting down. Error was: CompositeException(Any[TaskFailedException(Task (failed) @0x00007fb8ffe49510)])
└ @ LiveServer ~/.julia/packages/LiveServer/N0zZq/src/file_watching.jl:109
https://github.com/MichaelHatherly/Tectonic.jl/pull/4#issuecomment-841635220
It's not documented anywhere in this package, but the
biber
andbiblatex
versions need to be compatible with each other. See "Compatibility matrix" in https://anorien.csc.warwick.ac.uk/mirrors/CTAN/biblio/biber/documentation/biber.pdf. 2.14 and 3.14 go together, and sincetectonic
itself has not updated it'sbiblatex
version, we need to keep thisbiber
version at2.14
.
Not sure why it's picked up biblatex
3.11
... is this with a completely fresh tectonic cache?
yes. i downgraded biber to 2.11 and it worked, but it'd be cool to have it work out of the box
What's your package versions for Publish
and Tectonic
? Tectonic
's binaries for biber
and tectonic
are meant to be compatible without user intervention, you shouldn't have to change things manually. Off a fresh install of Publish
0.8.0
and Tectonic
0.4.1
it builds alright and uses biber
2.14
.
julia> pdf("Project.toml", "output")
note: this is a BETA release; ask questions and report bugs at https://tectonic.newton.cx/
Running TeX ...
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
Running xdvipdfmx ...
Writing `./pubtest.toc` (202 B)
Writing `./pubtest.aux` (1.21 KiB)
Writing `./pubtest.run.xml` (2.31 KiB)
Writing `./pubtest.out` (42 B)
Writing `./pubtest.bcf` (99.20 KiB)
Writing `./pubtest.pdf` (10.46 KiB)
INFO - This is Biber 2.14
INFO - Logfile is './pubtest.blg'
INFO - Reading './pubtest.bcf'
INFO - Found 0 citekeys in bib section 0
WARN - The file './pubtest.bcf' does not contain any citations!
INFO - Writing './pubtest.bbl' with encoding 'UTF-8'
INFO - Output to ./pubtest.bbl
INFO - WARNINGS: 1
note: this is a BETA release; ask questions and report bugs at https://tectonic.newton.cx/
Running TeX ...
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
Rerunning TeX because "pubtest.run.xml" changed ...
Running xdvipdfmx ...
Writing `./pubtest.bcf` (99.20 KiB)
Writing `./pubtest.pdf` (10.69 KiB)
Skipped writing 4 intermediate files (use --keep-intermediates to keep them)
"Project.toml"
[[Publish]]
deps = ["Base64", "CommonMark", "DataStructures", "FilePathsBase", "FileTrees", "HTTP", "IOCapture", "IterTools", "JSON", "LiveServer", "Logging", "Mustache", "Pkg", "PrettyTables", "Requires", "TOML", "Tectonic"]
git-tree-sha1 = "b302581743a08b5a542bba0beac0300360b51742"
uuid = "f065f642-d108-4f50-8aa5-6749150a895a"
version = "0.8.0"
[[Tectonic]]
deps = ["Pkg"]
git-tree-sha1 = "753a4ae3be7e03ae9c2654b8c98bca8b2c5a51be"
uuid = "9ac5f52a-99c6-489f-af81-462ef484790f"
version = "0.4.1"
Are you able to find the tectonic cache files? (On linux they're under $USER/.cache/Tectonic
.) It just seems as though the biblatex cache hasn't updated to 3.14. Simplest approach may be to just delete the tectonic cache and let it try and redownload stuff, which might fix it.
(Do you have a system-installed tectonic
by any chance? That could possibly also have something to do with it.)
Yes, I do have a system tectonic. I'll try deleting the cache!
$ tectonic -V
Tectonic 0.4.1
works with packages installed from registry now, thanks!! might be worth to add a note to delete tectonic cache if it was installed in the system before, or to specify a different cache directory for Publish.jl, maybe?
or to specify a different cache directory for Publish.jl, maybe?
That would be ideal, are you aware of whether that's supported in tectonic
or not? Last time I check about that I couldn't find an option to change it from the standard one.