Skip to content

Commit

Permalink
Fix GitHub doc build issue due to ImageMagick security policy blockin…
Browse files Browse the repository at this point in the history
…g conversion (#178)

* Minor fix in docs.

* Add Makefile entry for converting generated images to png via pdftoppm.

* Install poppler-utils in Documenter workflow.

* Use pdftocairo instead of poppler-utils.

* Fix last commit (pdftocairo actually is part of poppler-utils).

* Fix pdftocairo calls.

* Increase size thresholds for Documenter HTML output.
  • Loading branch information
michakraus authored Oct 9, 2023
1 parent 6eeecba commit f576a49
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:
Pkg.build()
Pkg.precompile()'
sudo apt-get install imagemagick
sudo apt-get install poppler-utils
sudo apt-get install texlive-xetex
- name: Generate Images
run: |
make all -C src/images
make png -C src/images
make clean -C src/images
working-directory: docs
- uses: julia-actions/julia-buildpkg@v1
Expand Down
2 changes: 2 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ makedocs(
warnonly = Documenter.except(:autodocs_block, :cross_references, :docs_block, :doctest, :eval_block, :example_block, :footnote, :linkcheck_remotes, :linkcheck, :meta_block, :parse_error, :setup_block),
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
size_threshold = 524288,
size_threshold_warn = 262144,
mathengine = MathJax3(Dict(
:tex => Dict(
:macros => Dict(
Expand Down
2 changes: 1 addition & 1 deletion docs/src/GeometricIntegrators.bib
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ @article{McLachlanQuispel:2002
doi = {10.1017/S0962492902000053}
}

@article{OberBlobaum:2014,
@article{OberBloebaum:2014,
author = {Ober-Blöbaum, Sina and Saake, Nils},
title = {Construction and analysis of higher order Galerkin variational integrators},
journal = {Advances in Computational Mathematics},
Expand Down
18 changes: 16 additions & 2 deletions docs/src/images/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

all:
pdf:
xelatex -shell-escape commuting-diagram
xelatex -shell-escape omega-orthogonal-projection
xelatex -shell-escape post-projection
Expand All @@ -11,13 +10,28 @@ all:
xelatex -shell-escape variation-continuous
xelatex -shell-escape variation-discrete

png:
pdftocairo -png -r 150 -transp -singlefile commuting-diagram.pdf commuting-diagram
pdftocairo -png -r 150 -transp -singlefile omega-orthogonal-projection.pdf omega-orthogonal-projection
pdftocairo -png -r 150 -transp -singlefile post-projection.pdf post-projection
pdftocairo -png -r 150 -transp -singlefile post-projection-unstable.pdf post-projection-unstable
pdftocairo -png -r 150 -transp -singlefile standard-projection.pdf standard-projection
pdftocairo -png -r 150 -transp -singlefile symmetric-projection-minus.pdf symmetric-projection-minus
pdftocairo -png -r 150 -transp -singlefile symmetric-projection-plus.pdf symmetric-projection-plus
pdftocairo -png -r 150 -transp -singlefile symplectic-projection-unstable.pdf symplectic-projection-unstable
pdftocairo -png -r 150 -transp -singlefile variation-continuous.pdf variation-continuous
pdftocairo -png -r 150 -transp -singlefile variation-discrete.pdf variation-discrete

clean:
rm -f *.aux
rm -f *.fdb_latexmk
rm -f *.fls
rm -f *.log
rm -f *.pdf
rm -f *.xdv

empty: clean
rm -f *.png
rm -f *.svg

all: pdf
3 changes: 2 additions & 1 deletion docs/src/images/commuting-diagram.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{amsmath}
\usepackage{amsfonts}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/omega-orthogonal-projection.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{amsmath}
\usepackage{amsfonts}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/post-projection-unstable.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{amsmath}
\usepackage{amsfonts}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/post-projection.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{amsmath}
\usepackage{amsfonts}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/standard-projection.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{amsmath}
\usepackage{amsfonts}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/symmetric-projection-minus.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{amsmath}
\usepackage{amsfonts}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/symmetric-projection-plus.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{amsmath}
\usepackage{amsfonts}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/symplectic-projection-unstable.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{amsmath}
\usepackage{amsfonts}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/variation-continuous.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{fontspec}
\usepackage{amsmath}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/images/variation-discrete.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\documentclass[12pt,convert={density=150}]{standalone}
%\documentclass[12pt,convert={density=150}]{standalone}
\documentclass[12pt]{standalone}

\usepackage{fontspec}
\usepackage{amsmath}
Expand Down
4 changes: 2 additions & 2 deletions docs/src/integrators/cgvi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Continuous Galerkin Variational Integrators](@id cgvi)

In the following, we first present the Galerkin framework for variational integrators [[Leok:2004](@cite), [Leok:2011](@cite), [Campos:2014](@cite), [Campos:2015](@cite), [OberBlobaum:2014](@cite), [OberBloebaum:2016](@cite)] where the space of curves $\mf{Q}$ that connect two points in $\mf{M}$ is approximated by a finite-dimensional subspace (Galerkin integrators of 0th kind).
In the following, we first present the Galerkin framework for variational integrators [[Leok:2004](@cite), [Leok:2011](@cite), [Campos:2014](@cite), [Campos:2015](@cite), [OberBloebaum:2014](@cite), [OberBloebaum:2016](@cite)] where the space of curves $\mf{Q}$ that connect two points in $\mf{M}$ is approximated by a finite-dimensional subspace (Galerkin integrators of 0th kind).
We use Lagrange polynomials to approximate the trajectories albeit other choices are possible.
Alternatively, we can approximate the generalised velocities
(Galerkin integrators of 1st kind), which leads us to variational-partitioned Runge-Kutta methods.
Expand Down Expand Up @@ -47,7 +47,7 @@ It should be made clear, that $\mf{Q}_d$ is an approximation of $\mf{Q}$, but no
$\mf{Q}_h$, however, is a subspace of $\mf{Q}$ (although it can be broken).
The connection between $\mf{Q}_h$ and $\mf{Q}_d$ is made by the continuity constraints (which for
Lagrange polynomials and sequences of nodes which include the boundaries, i.e., $c_1=0$
and $c_s=1$, is automatically satisfied).
and $c_s=1$, is automatically satisfied -> this is not true).
In this context we also need to discuss that curves in $\mf{Q}(\mf{M})$ are assumed to be $C^2$,
which is not required by the curves in $\mf{Q}_h$.*

Expand Down

0 comments on commit f576a49

Please sign in to comment.