Compare commits
27 Commits
v0.1
...
revert-92-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c513e4629 | ||
|
|
38ece73768 | ||
|
|
76a09c0219 | ||
|
|
1a994fd59c | ||
|
|
cdb3010b78 | ||
|
|
e5b9806462 | ||
|
|
8dbb448b32 | ||
|
|
033d949325 | ||
|
|
643c0ebce1 | ||
|
|
4851a9aa5d | ||
|
|
8a3c1ae585 | ||
|
|
fd765b113f | ||
|
|
fe801b0a1c | ||
|
|
7b934d3fba | ||
|
|
dbc62fea32 | ||
|
|
1ad235866e | ||
|
|
05796d0165 | ||
|
|
f8e9ac93a0 | ||
|
|
04546f8c35 | ||
|
|
26450026bb | ||
|
|
3a17cc1331 | ||
|
|
e9f953f731 | ||
|
|
2c5c78b83c | ||
|
|
aaccad7ae8 | ||
|
|
2c453ec403 | ||
|
|
7da3179d08 | ||
|
|
254b24cb21 |
52
.github/workflows/latex-lint.yml
vendored
Normal file
52
.github/workflows/latex-lint.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
name: LaTeX Lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
- 'latex/**/*.tex'
|
||||||
|
- 'latex/main.tex'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install chktex
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y chktex
|
||||||
|
|
||||||
|
- name: Run chktex inside latex/
|
||||||
|
working-directory: latex
|
||||||
|
run: |
|
||||||
|
TEX_FILES=$(find . -type f -name "*.tex")
|
||||||
|
if [ -z "$TEX_FILES" ]; then
|
||||||
|
echo "No .tex files found in latex/. Skipping lint."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🔍 Linting .tex files with chktex..."
|
||||||
|
FAIL=0
|
||||||
|
|
||||||
|
for f in $TEX_FILES; do
|
||||||
|
echo "▶ Checking $f"
|
||||||
|
# Run chktex and show output; capture error status
|
||||||
|
if ! chktex "$f"; then
|
||||||
|
echo "::warning file=$f::ChkTeX found issues in $f"
|
||||||
|
FAIL=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $FAIL -ne 0 ]; then
|
||||||
|
echo "::error::❌ Lint errors or warnings were found in one or more .tex files above."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "✅ All files passed chktex lint."
|
||||||
|
fi
|
||||||
89
.github/workflows/latexdiff.yml
vendored
Normal file
89
.github/workflows/latexdiff.yml
vendored
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
name: LaTeX Diff
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
base_branch:
|
||||||
|
description: 'Base branch (older version)'
|
||||||
|
required: true
|
||||||
|
compare_branch:
|
||||||
|
description: 'Compare branch (new version)'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
latexdiff:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/xu-cheng/texlive-full:latest
|
||||||
|
options: --user root
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install latexpand (Perl script)
|
||||||
|
run: |
|
||||||
|
tlmgr init-usertree
|
||||||
|
tlmgr install latexpand
|
||||||
|
|
||||||
|
- name: Checkout base branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.base_branch }}
|
||||||
|
path: base
|
||||||
|
|
||||||
|
- name: Checkout compare branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.compare_branch }}
|
||||||
|
path: compare
|
||||||
|
|
||||||
|
|
||||||
|
- name: Create output folder
|
||||||
|
run: mkdir -p diff_output
|
||||||
|
|
||||||
|
- name: Flatten base/main.tex (with latexpand)
|
||||||
|
run: |
|
||||||
|
cd base/latex
|
||||||
|
echo "📂 Listing files in base/latex:"
|
||||||
|
ls -R
|
||||||
|
echo "🔄 Flattening with latexpand..."
|
||||||
|
latexpand --verbose --keep-comments --output=../../diff_output/base_flat.tex main.tex
|
||||||
|
echo "✅ Preview of base_flat.tex:"
|
||||||
|
head -n 50 ../../diff_output/base_flat.tex
|
||||||
|
|
||||||
|
|
||||||
|
- name: Flatten compare/main.tex (with latexpand)
|
||||||
|
run: |
|
||||||
|
cd compare/latex
|
||||||
|
echo "📂 Listing files in compare/latex:"
|
||||||
|
ls -R
|
||||||
|
echo "🔄 Flattening with latexpand..."
|
||||||
|
latexpand --verbose --keep-comments --output=../../diff_output/compare_flat.tex main.tex
|
||||||
|
echo "✅ Preview of compare_flat.tex:"
|
||||||
|
head -n 50 ../../diff_output/compare_flat.tex
|
||||||
|
|
||||||
|
- name: Generate diff.tex using latexdiff
|
||||||
|
run: |
|
||||||
|
latexdiff diff_output/base_flat.tex diff_output/compare_flat.tex > diff_output/diff.tex
|
||||||
|
|
||||||
|
- name: Upload flattened .tex and diff.tex early
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: latex-diff-tex
|
||||||
|
path: |
|
||||||
|
diff_output/base_flat.tex
|
||||||
|
diff_output/compare_flat.tex
|
||||||
|
diff_output/diff.tex
|
||||||
|
|
||||||
|
- name: Copy thesis.cls to diff_output
|
||||||
|
run: cp compare/latex/thesis.cls diff_output/
|
||||||
|
|
||||||
|
- name: Compile diff.tex to PDF
|
||||||
|
working-directory: diff_output
|
||||||
|
run: |
|
||||||
|
xelatex -interaction=nonstopmode diff.tex
|
||||||
|
xelatex -interaction=nonstopmode diff.tex
|
||||||
|
|
||||||
|
- name: Upload diff output files
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: latex-diff-output
|
||||||
|
path: diff_output/
|
||||||
29
.github/workflows/latexmk.yml
vendored
Normal file
29
.github/workflows/latexmk.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
name: Render XeLaTeX on PR to dev
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-pdf:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Compile XeLaTeX
|
||||||
|
uses: dante-ev/latex-action@2021-A
|
||||||
|
with:
|
||||||
|
root_file: main.tex
|
||||||
|
working_directory: latex
|
||||||
|
compiler: xelatex
|
||||||
|
args: -interaction=nonstopmode -halt-on-error -file-line-error
|
||||||
|
extra_system_packages: "fonts-freefont-otf"
|
||||||
|
|
||||||
|
- name: Upload compiled PDF
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: compiled-pdf
|
||||||
|
path: latex/main.pdf
|
||||||
Reference in New Issue
Block a user