-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New README.md * Created minimal examples for tests and to be included in README * New pipeline to automatically generate all images for docs * Created LaTeX Beamer comparison slides, which will be included in README * Added Fira Fonts as default font * Set Helvetica Font as backup font * Created Option to use default font * Modified caption setup to not include `Figure` * Added Option to disable footer
- Loading branch information
Showing
29 changed files
with
647 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
paths: | ||
- "**.tex" | ||
- "**.yml" | ||
branches: [ master ] | ||
pull_request: | ||
paths: | ||
- "**.tex" | ||
- "**.yml" | ||
branches: [ master ] | ||
|
||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
name: Build all files | ||
runs-on: ubuntu-latest | ||
container: | ||
image: xucheng/texlive-small:latest | ||
defaults: | ||
run: | ||
shell: sh | ||
steps: | ||
- name: Set up repo | ||
uses: actions/checkout@v2 | ||
- name: Install missing packages | ||
run: | | ||
tlmgr install silence appendixnumberbeamer fira fontaxes mwe | ||
- name: Build minimal examples | ||
working-directory: minimal_examples/ | ||
run: | | ||
ln -s ../*.sty ./ | ||
ln -s ../logos ./ | ||
latexmk -pdf -file-line-error -interaction=nonstopmode *.tex | ||
- name: Build compare examples | ||
working-directory: compare_examples/ | ||
run: | | ||
ln -s ../*.sty ./ | ||
ln -s ../logos ./ | ||
latexmk -pdf -file-line-error -interaction=nonstopmode *example*.tex | ||
- name: Build demo document | ||
run: | | ||
latexmk -pdf -file-line-error -interaction=nonstopmode demo.tex | ||
- name: PDFs to PNGs | ||
uses: docker://frapsoft/fish:latest | ||
with: | ||
args: fish ./.github/workflows/convert_pdf_to_png.fish | ||
if: github.event_name == 'push' | ||
- name: Sync docs | ||
uses: kai-tub/external-repo-sync-action@v1 | ||
with: | ||
source-directory: "./" | ||
include-patterns: "demo.pdf *.png" | ||
exclude-patterns: "*.tmp.png logos" | ||
commit-message: "Updating LaTeX documentation files" | ||
env: | ||
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
if: github.event_name == 'push' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/fish | ||
|
||
function convert_minimal_examples | ||
set files (find ./minimal_examples -type d -path '*/.git' -prune -o -name '*.pdf' -print) | ||
for file_ in $files | ||
echo "$file_" | ||
set target (string replace '.pdf' '.png' "$file_") | ||
convert -density 500 "$file_"[0] "$target" | ||
end | ||
end | ||
|
||
function convert_compare_examples | ||
set files (find ./compare_examples -type d -path '*/.git' -prune -o -name '*example*.pdf' -print) | ||
|
||
for file_ in $files | ||
echo "$file_" | ||
set convert_target (string replace -r '(.*)\.pdf' '$1-%02d.tmp.png' "$file_") | ||
set montage_source (string replace -r '(.*)\.pdf' '$1-*.png' "$file_") | ||
set montage_target (string replace -r '(.*)\.pdf' '$1.tmp.png' "$file_") | ||
convert -density 300 "$file_" "$convert_target" | ||
montage "$montage_source" -geometry +10+10 -tile 1x -background gray -colorspace RGB "$montage_target" | ||
# maybe next to each other | ||
end | ||
montage ./compare_examples/pureminimalistic_example_dark.tmp.png ./compare_examples/defaultbeamer_example.tmp.png -geometry +2+2 -tile 2x -background gray ./compare_examples/comparison_dark.png | ||
montage ./compare_examples/pureminimalistic_example_light.tmp.png ./compare_examples/defaultbeamer_example.tmp.png -geometry +2+2 -tile 2x -background gray ./compare_examples/comparison_light.png | ||
end | ||
|
||
function convert_demo | ||
convert -density 300 demo.pdf demo-%02d.tmp.png | ||
montage demo-*.png -geometry +10+10 -tile 4x -background gray demo.png | ||
end | ||
|
||
apk add --no-cache imagemagick | ||
|
||
convert_demo | ||
convert_minimal_examples | ||
convert_compare_examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.