Skip to content

Commit

Permalink
add latex publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
afflom authored Feb 17, 2025
1 parent b4d811a commit 9f7d6c5
Show file tree
Hide file tree
Showing 15 changed files with 90 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md → .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ The entire proof is formalized in Coq, providing a machine-checked verification

## Repository Structure

- `The Formalized UOR H1 HPO Candidate and Proofs.tex`: The main LaTeX document containing the narrative of the proof.
- `appendix.tex`: An appendix with additional details and proofs.
- `UOR-H1-HPO-Candidate.tex`: The main LaTeX document containing the narrative of the proof.
- `Appendix-1-Structures.tex`: An appendix with additional details and proofs.
- `Appendix-2-Principles.tex`: An appendix with the complete UOR construction of the UOR H1 HPO Candidate.
- `coq/`: The directory containing the Coq formalization of the proof.

## Usage
Expand Down
15 changes: 15 additions & 0 deletions .github/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "latex-project",
"version": "1.0.0",
"description": "A project for compiling and publishing LaTeX documents as GitHub packages.",
"scripts": {
"build": "pdflatex src/main.tex && pdflatex src/appendix.tex",
"publish": "npm run build && npm publish"
},
"dependencies": {
"latex": "^1.0.0"
},
"devDependencies": {
"gh-pages": "^3.2.3"
}
}
55 changes: 55 additions & 0 deletions .github/workflows/latex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Compile and Publish LaTeX

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up LaTeX
run: sudo apt-get install texlive-full

- name: Create output directory
run: mkdir -p pdf_output

- name: Compile LaTeX documents
run: |
# Find all .tex files and compile them
for file in $(find . -name "*.tex" -type f); do
filename=$(basename "$file" .tex)
# First pass
pdflatex -interaction=nonstopmode "$filename.tex"
# Second pass for references
pdflatex -interaction=nonstopmode "$filename.tex"
# Move PDF to output directory
mv "$filename.pdf" ./pdf_output/
done
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Create a timestamp for the version
VERSION="v$(date +'%Y%m%d%H%M%S')"
# Create release with all PDFs
gh release create "$VERSION" \
--title "LaTeX Documents $(date +'%Y-%m-%d')" \
--notes "Automatically generated PDFs from LaTeX sources" \
pdf_output/*.pdf
- name: Upload Release Artifacts
uses: actions/upload-artifact@v4
with:
name: latex-pdfs
path: pdf_output/*.pdf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"files.exclude": {
"**/*.vo": true,
"**/*.vok": true,
"**/*.vos": true,
"**/*.aux": true,
"**/*.glob": true,
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/*.crswap": true
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9f7d6c5

Please sign in to comment.