Browse Source

Merge pull request #291 from ehhc/fix_for_the_build_issues

Fix for the build issues
master
Federico Marotta 2 months ago committed by GitHub
parent
commit
23dbe70653
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      .github/workflows/verify_examples.yml
  2. 24
      examples/documentation/.latexmkrc
  3. 4
      examples/documentation/main.tex

11
.github/workflows/verify_examples.yml

@ -7,12 +7,12 @@ jobs:
outputs:
matrix: ${{ steps.find-dirs.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Gather directories inside examples
id: find-dirs
run: |
cd examples
echo "::set-output name=matrix::{\"dir\":[$(for dir in $(echo */); do echo -n \"${dir%?}\",; done)]}"
echo "matrix={\"dir\":[$(for dir in $(echo */); do echo -n \"${dir%?}\",; done)]}" >> $GITHUB_OUTPUT
build_latex:
needs: find_examples
runs-on: ubuntu-latest
@ -20,17 +20,16 @@ jobs:
matrix: ${{fromJson(needs.find_examples.outputs.matrix)}}
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Check that LaTeX example compiles
uses: xu-cheng/latex-action@v2
uses: xu-cheng/latex-action@v3
with:
working_directory: examples/${{ matrix.dir }}
pre_compile: |
cp -r ../../* . || true
mkdir styles && cp -r ../../* ./styles/ || true
root_file: main.tex
latexmk_shell_escape: true
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Log - ${{ matrix.dir }}

24
examples/documentation/.latexmkrc

@ -1,24 +0,0 @@
# Output a pdf
$pdf_mode = 1;
$pdflatex = 'pdflatex -output-directory=examples/documentation -shell-escape %O %S';
# By default compile only the file called 'main.tex'
@default_files = ('main.tex');
# Compile the glossary and acronyms list (package 'glossaries')
add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' );
add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' );
$clean_ext .= " acr acn alg glo gls glg";
sub makeglossaries {
my ($base_name, $path) = fileparse( $_[0] );
pushd $path;
my $return = system "makeglossaries", $base_name;
popd;
return $return;
}
# Compile the nomenclature (package 'nomencl')
add_cus_dep( 'nlo', 'nls', 0, 'makenlo2nls' );
sub makenlo2nls {
system( "makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"" );
}

4
examples/documentation/main.tex

@ -88,8 +88,8 @@
\title[Example and documentation of the {\normalfont\texttt{kaobook}} class]{Example and documentation \\ of the {\normalfont\texttt{kaobook}} class}
\subtitle{Customise this page according to your needs}
\author[Federico Marotta]{Federico Marotta\thanks{A \LaTeX\ lover}}
%\author[Federico Marotta]{Federico Marotta\thanks{A \LaTeX\ lover}}
\author[Federico Marotta]{Federico Marotta\thanks{A LaTeX lover}}
\date{\today}
\publishers{An Awesome Publisher}

Loading…
Cancel
Save