parent
1d7f93140f
commit
4a1ed3fe15
@ -2,52 +2,104 @@ name: Compile LaTeX document
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main] # or any other branch you want to trigger the workflow
|
||||||
- main # or any other branch you want to trigger the workflow
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: leplusorg/latex
|
image: leplusorg/latex
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Determine prerequisites"
|
- name: "Determine prerequisites"
|
||||||
id: prereq
|
id: prereq
|
||||||
run: |
|
run: |
|
||||||
echo "need_node=$(command -v node >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
|
echo "need_node=$(command -v node >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
|
||||||
- name: Install node
|
- name: Install node
|
||||||
if: ${{ steps.prereq.outputs.need_node == '1' }}
|
if: ${{ steps.prereq.outputs.need_node == '1' }}
|
||||||
run: |
|
run: |
|
||||||
apt update -y && apt install -y curl
|
apt update -y && apt install -y curl
|
||||||
curl -sS https://webi.sh/node | sh
|
curl -sS https://webi.sh/node | sh
|
||||||
echo ~/.local/opt/node/bin >> $GITHUB_PATH
|
echo ~/.local/opt/node/bin >> $GITHUB_PATH
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Compile LaTeX Document
|
||||||
|
run: latexmk -pdf ${{ env.root_file }}
|
||||||
|
env:
|
||||||
|
root_file: main.tex # Replace 'main.tex' with the path to your main LaTeX file
|
||||||
|
- name: Upload artifacts and release assets
|
||||||
|
uses: nanoufo/action-upload-artifacts-and-release-assets@v1.9
|
||||||
|
with:
|
||||||
|
path: ./main.pdf
|
||||||
|
|
||||||
|
latex_spellcheck:
|
||||||
- uses: actions/checkout@v3
|
runs-on: ubuntu-latest
|
||||||
with:
|
container:
|
||||||
fetch-depth: 0
|
image: registry.gitlab.com/islandoftex/images/texlive:${{ env.LATEX_SPELLCHECK_TEXLIVE_VERSION }}
|
||||||
|
env:
|
||||||
- name: Compile LaTeX Document
|
LATEX_SPELLCHECK_SOURCE_NAME: main
|
||||||
run: latexmk -pdf ${{ env.root_file }}
|
LATEX_SPELLCHECK_SOURCE_PATH: './'
|
||||||
env:
|
LATEX_SPELLCHECK_SOURCE_LANGUAGE_DEFAULT: de-AT
|
||||||
root_file: main.tex # Replace 'main.tex' with the path to your main LaTeX file
|
LATEX_SPELLCHECK_IGNORELIST: spellcheck_custom_words.txt
|
||||||
|
LATEX_SPELLCHECK_TEXLIVE_VERSION: TL2021-2021-12-12-04-05
|
||||||
- name: Upload artifacts and release assets
|
LATEX_SPELLCHECK_TEXLIVE_IMAGE: registry.gitlab.com/islandoftex/images/texlive
|
||||||
uses: nanoufo/action-upload-artifacts-and-release-assets@v1.9
|
steps:
|
||||||
with:
|
- name: "Determine prerequisites"
|
||||||
path: |
|
id: prereq
|
||||||
./main.pdf
|
run: |
|
||||||
# - name: Upload PDF
|
echo "need_node=$(command -v node >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
|
||||||
# uses: actions/upload-artifact@v3
|
- name: Install node
|
||||||
# with:
|
if: ${{ steps.prereq.outputs.need_node == '1' }}
|
||||||
# name: Beitrittserklaerung_RudernDonauLinz.pdf
|
run: |
|
||||||
# path: ./main.pdf
|
apt update -y && apt install -y curl
|
||||||
|
curl -sS https://webi.sh/node | sh
|
||||||
|
echo ~/.local/opt/node/bin >> $GITHUB_PATH
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Prepare environment
|
||||||
|
run: |
|
||||||
|
cd $LATEX_SPELLCHECK_SOURCE_PATH
|
||||||
|
export SOURCE_LANGUAGE=$(cat $LATEX_SPELLCHECK_SOURCE_NAME.tex | perl -e '
|
||||||
|
$spellcheck_language = $ENV{LATEX_SPELLCHECK_SOURCE_LANGUAGE_DEFAULT};
|
||||||
|
while (<>) {
|
||||||
|
last if !/^%\s+!/;
|
||||||
|
if (/^%\s+!tex\s+spellcheck\s*=\s*(.+)$/i) {
|
||||||
|
$lang = "$1";
|
||||||
|
$lang =~ s/^\s+|\s+$//g;
|
||||||
|
$spellcheck_language = $lang;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$spellcheck_language = $ENV{LATEX_SPELLCHECK_SOURCE_LANGUAGE} if ($ENV{LATEX_SPELLCHECK_SOURCE_LANGUAGE});
|
||||||
|
$spellcheck_language =~ s/^([a-zA-Z]{2})([-_]([a-zA-Z]{2}))?.*$/$1/;
|
||||||
|
$spellcheck_variant = "$3";
|
||||||
|
print "${spellcheck_language}-${spellcheck_variant}";
|
||||||
|
')
|
||||||
|
export LANGUAGE_PREFIX=$(echo $SOURCE_LANGUAGE | head -c2 -)
|
||||||
|
apt-get update
|
||||||
|
apt-get -y install python3-pip wget python3-venv
|
||||||
|
python3 -m venv /tmp/env
|
||||||
|
. /tmp/env/bin/activate
|
||||||
|
pip3 install yalafi
|
||||||
|
wget --directory-prefix=/srv/ https://languagetool.org/download/LanguageTool-stable.zip
|
||||||
|
unzip /srv/LanguageTool-stable.zip -d /srv/lt/
|
||||||
|
mv /srv/lt/* /srv/lt/LanguageTool
|
||||||
|
sed -i -e '$a\\' /srv/lt/LanguageTool/org/languagetool/resource/$LANGUAGE_PREFIX/hunspell/spelling_custom.txt
|
||||||
|
test -f "$LATEX_SPELLCHECK_IGNORELIST" && cat ./$LATEX_SPELLCHECK_IGNORELIST >>/srv/lt/LanguageTool/org/languagetool/resource/$LANGUAGE_PREFIX/hunspell/spelling_custom.txt
|
||||||
|
latexpand $LATEX_SPELLCHECK_SOURCE_NAME.tex >$LATEX_SPELLCHECK_SOURCE_NAME.spellcheck.merged.tmp
|
||||||
|
sed -i 's/~/ 1/g' $LATEX_SPELLCHECK_SOURCE_NAME.spellcheck.merged.tmp
|
||||||
|
detex $LATEX_SPELLCHECK_SOURCE_NAME.spellcheck.merged.tmp >$LATEX_SPELLCHECK_SOURCE_NAME.spellcheck.plain.tmp
|
||||||
|
python3 -m yalafi.shell --lt-directory /srv/lt/LanguageTool --output html --language $SOURCE_LANGUAGE $LATEX_SPELLCHECK_SOURCE_NAME.spellcheck.plain.tmp >$LATEX_SPELLCHECK_SOURCE_NAME.spellcheck.html
|
||||||
|
# - name: Upload Spellcheck Results
|
||||||
|
# uses: actions/upload-artifact@v2
|
||||||
|
# with:
|
||||||
|
# name: spellcheck-results
|
||||||
|
# path: ${{ env.LATEX_SPELLCHECK_SOURCE_PATH }}${{ env.LATEX_SPELLCHECK_SOURCE_NAME }}.spellcheck.html
|
||||||
|
- name: Upload artifacts and release assets
|
||||||
|
uses: nanoufo/action-upload-artifacts-and-release-assets@v1.9
|
||||||
|
with:
|
||||||
|
name: spellcheck-results
|
||||||
|
path: ${{ env.LATEX_SPELLCHECK_SOURCE_PATH }}${{ env.LATEX_SPELLCHECK_SOURCE_NAME }}.spellcheck.html
|
||||||
|
|
||||||
|
2
main.tex
2
main.tex
@ -63,7 +63,7 @@ Gleichzeitig erkläre ich, dass ich des Schwimmens kundig bin und mein Gesundhei
|
|||||||
|
|
||||||
\noindent
|
\noindent
|
||||||
|
|
||||||
\textbf{Für Rennjugend:} $\Box$ Hiermit bestätige ich den Ankauf eines Ruderanzuges (Preis ca. 80€). Die zuständige Person des Vereines wird sich, zwecks der Größenauswahl, bei Ihnen melden.\\
|
\textbf{Für Rennjugend:} $\Box$ Hiermit bestätige ich den Ankauf eines Ruderanzuges (Preis ca. 80 €). Die zuständige Person des Vereines wird sich, zwecks der Größenauswahl, bei Ihnen melden.\\
|
||||||
|
|
||||||
\noindent
|
\noindent
|
||||||
\begin{tabular}{|M{\halfcolwidth}|M{\halfcolwidth}|}
|
\begin{tabular}{|M{\halfcolwidth}|M{\halfcolwidth}|}
|
||||||
|
9
spellcheck_custom_words.txt
Normal file
9
spellcheck_custom_words.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
ASKÖ
|
||||||
|
OÖRV
|
||||||
|
OÖ
|
||||||
|
ÖRV
|
||||||
|
ZVR-Zahl
|
||||||
|
Heilhamerweg
|
||||||
|
ruderischen
|
||||||
|
Viribus
|
||||||
|
units
|
Loading…
Reference in New Issue
Block a user