Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rdeisenroth committed Feb 11, 2024
0 parents commit 81d000d
Show file tree
Hide file tree
Showing 15 changed files with 2,419 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"name": "latex",
"image": "ghcr.io/tudalgo/algotex:latest",
"customizations": {
"vscode": {
"extensions": [
"james-yu.latex-workshop",
// Git
"eamodio.gitlens",
// Other helpers
"shardulm94.trailing-spaces",
"stkb.rewrap", // rewrap comments after n characters on one line
// Other
"vscode-icons-team.vscode-icons",
"draivin.hsnips"
],
"settings": {
// General settings
"files.eol": "\n",
// Latex settings
"latex-workshop.linting.chktex.enabled": true,
"latex-workshop.linting.chktex.exec.path": "chktex",
"latex-workshop.latex.clean.subfolder.enabled": true,
"latex-workshop.latex.autoClean.run": "onBuilt",
"editor.formatOnSave": true,
"files.associations": {
"*.tex": "latex",
"*.sty": "latex-expl3",
"*.cls": "latex-expl3",
"*.def": "latex",
"*.aux": "latex",
"*.toc": "latex",
"*.pygstyle": "latex",
"*.pygtex": "latex"
},
"latex-workshop.latexindent.path": "latexindent",
"latex-workshop.latexindent.args": [
"-c",
"%DIR%/",
"%TMPFILE%",
"-y=defaultIndent: '%INDENT%'"
],
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-lualatex",
//"-pdflatex",
"-outdir=%OUTDIR%",
"%DOC%"
],
"env": {
//"DARK_MODE": "1"
}
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "lualatex",
"command": "lualatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-luatex",
"%DOC%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
}
}
}
}
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{md,mf}]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
trim_trailing_whitespace = false

[{Makefile,.gitmodules}]
indent_style = tab

[{COPYING,LICENSE,NOTICE,*.{md,mf,xmp}}]
indent_size = unset
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# LaTeX document build workflow

name: build

# Controls when the workflow will run
on:
# Triggers the workflow on push events for all branches
push:
branches:
- main
- master
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# The docker image to use for the container
container:
image: ghcr.io/tudalgo/algotex:latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# 1. Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Set up Git repository
uses: actions/checkout@v3

# Link texmf folder to the current texmf home (needed for this docker image)
- name: Link texmf folder to the current texmf home
run: |
ln -s /root/texmf $(kpsewhich -var-value=TEXMFHOME)
texhash --verbose
# 2. Build the document
- name: "Build the document"
run: |
CI_RUN=1 make -j $(nproc)
mv build/*.pdf .
# 3. Upload artifacts to GitHub
- name: Upload artifacts to GitHub
#if: ${{ !env.ACT }} # uncomment this if you want to test this action with act without passing --artifact-server-path
uses: actions/upload-artifact@v3
with:
name: PDF
path: "*.pdf"
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
21 changes: 21 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: check

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

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Execute Pre-commit Hooks
uses: pre-commit/[email protected]
Loading

0 comments on commit 81d000d

Please sign in to comment.