Skip to content

Commit

Permalink
Bump Pandoc to 2.19 (#315)
Browse files Browse the repository at this point in the history
Hello @rikhuijzer , we are trying to use Books.jl and would like for it to be able to build the site on Apple Silicon Machines. I did the following to make it work

1. Bump package version of `pandoc_jll` , `pandoc_corssref_jll`, `tectonic_jll`. 
2. Fixed [Lua script](https://github.com/JuliaBooks/Books.jl/blob/fb37b180728af070ecb7985e47b7a59577eb81c9/src/output-block.lua#L8C1-L8C1) for supporting pandoc >= 2.16

Fixes #309.
  • Loading branch information
exAClior authored Jan 17, 2024
1 parent a48f83f commit c9f41a7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
os: macos-latest

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@v1
with:
Expand Down
11 changes: 5 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name = "Books"
uuid = "939d5c6b-51ae-42e7-97ca-7564d0d4ad91"
authors = ["Rik Huijzer <[email protected]>"]
version = "2.0.5"
version = "2.0.6"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand All @@ -27,7 +26,7 @@ tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5"
[compat]
CodeTracking = "1.0"
DataFrames = "0.22, 1"
Latexify = "0.15"
Latexify = "0.16"
LiveServer = "0.6, 0.7, 1"
Memoize = "0.4"
ProgressMeter = "1"
Expand All @@ -37,6 +36,6 @@ TOML = "1.0"
URIs = "1.3"
YAML = "0.4"
julia = "1.6"
pandoc_crossref_jll = "=0.3.9"
pandoc_jll = "=2.11.4"
tectonic_jll = "0.9"
pandoc_crossref_jll = "=0.3.14"
pandoc_jll = "=2.19.3"
tectonic_jll = "0.14"
1 change: 0 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[compat]
Latexify = "0.15"
Reexport = "1.1"
2 changes: 1 addition & 1 deletion docs/src/includes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ end

function image_options_plot()
I = 1:30
fig = Figure(; resolution=(600, 140))
fig = Figure(; size=(600, 140))
ax = Axis(fig[1, 1]; xlabel="x", ylabel="y")
scatterlines!(ax, I, 3 .* sin.(I))
return fig
Expand Down
1 change: 1 addition & 0 deletions src/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ function _pandoc_html(project::AbstractString, url_prefix::AbstractString; fail_
extra_args;
# The url_prefix is either "" or startswith '/'.
"--variable=url-prefix:$url_prefix";
"--wrap=none";
# output
]
_, out = call_pandoc(args)
Expand Down
5 changes: 3 additions & 2 deletions src/output-block.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
-- This function manually handles blocks tagged as output.
--
-- Thanks to https://github.com/jgm/pandoc/issues/4116#issuecomment-579426694.
-- Thanks to https://github.com/jgm/pandoc/issues/4116#issuecomment-1020677402 for support of pandoc >= 2.16
--
local function CodeBlock (elem)
if elem.c[1][2][1] == "language-julia" then
if elem.classes[1] == "language-julia" then
return pandoc.RawBlock("latex", "\n\\begin{lstlisting}[language=Julia]\n"..elem.text.."\n\\end{lstlisting}\n")
elseif elem.c[1][2][1] == "output" then
elseif elem.classes[1] == "output" then
return pandoc.RawBlock("latex", "\n\\begin{lstlisting}[language=Output]\n"..elem.text.."\n\\end{lstlisting}\n")
else
return elem
Expand Down

2 comments on commit c9f41a7

@rikhuijzer
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JuliaRegistrator register

Release notes:

Thanks to Yusheng Zhao (@exAClior), the long standing issue of the outdated Pandoc was finally fixed! Now, Books.jl finally supports Apple Silicon (aarch64).

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/99029

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.0.6 -m "<description of version>" c9f41a7ceacf551a6a4c58b6d1b3d6effdbb0e09
git push origin v2.0.6

Please sign in to comment.