Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM qmcgaw/latexdevcontainer:latest-full

RUN apt update -y && apt install git fontconfig inkscape -y
165 changes: 165 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"name": "huangfusl-latex-template",
"dockerComposeFile": ["docker-compose.yml"],
"service": "vscode",
"runServices": ["vscode"],
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspace",
"postCreateCommand": "",
"customizations": {
"codespaces": {
"extensions": [
// Copilot
"GitHub.copilot",
"GitHub.copilot-chat",
// LaTeX
"james-yu.latex-workshop",
// Git
"eamodio.gitlens",
// Other helpers
"shardulm94.trailing-spaces",
"stkb.rewrap", // rewrap comments after n characters on one line
// Other
"PKief.material-icon-theme",
"Equinusocio.vsc-material-theme"
],
"settings": {
// General settings
"files.eol": "\n",
"[latex]": {
"editor.defaultFormatter": "James-Yu.latex-workshop"
},
"github.copilot.enable": {
"latex": false
},
"editor.wordWrap": "on",
"files.autoSave": "onFocusChange",
"files.autoSaveDelay": 150000,
"workbench.colorTheme": "Material Theme Ocean",
"workbench.iconTheme": "material-icon-theme",
// Latex settings
"latex-workshop.linting.chktex.enabled": true,
"latex-workshop.latex.clean.subfolder.enabled": true,
"latex-workshop.latex.autoClean.run": "onFailed",
"editor.formatOnSave": true,
"files.associations": {
"*.tex": "latex"
},
"latex-workshop.latexindent.path": "latexindent",
"latex-workshop.latexindent.args": [
"-c",
"%DIR%/",
"%TMPFILE%",
"-y=defaultIndent: '%INDENT%'"
],
"latex-workshop.latex.recipes": [
{ "name": "Build", "tools": ["XeTeX"] },
{
"name": "Build (bib)",
"tools": ["XeTeX", "BibTeX", "XeTeX", "XeTeX"]
}
],
"latex-workshop.latex.tools": [
{
"name": "XeTeX",
"command": "xelatex",
"args": [
"-synctex=1",
"-shell-escape",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "BibTeX",
"command": "bibtex",
"args": ["%DOCFILE%"]
}
],
"latex-workshop.linting.run": "onType",
"latex-workshop.view.pdf.viewer": "tab",
"latex-utilities.countWord.args": ["%DOCFILE%"],
"latex-utilities.countWord.format": "${words} Words in Total, ${wordsBody} Words in Body",
"latex-utilities.countWord.path": "texcount"
}
},
"vscode": {
"extensions": [
// Copilot
"GitHub.copilot",
"GitHub.copilot-chat",
// LaTeX
"james-yu.latex-workshop",
// Git
"eamodio.gitlens",
// Other helpers
"shardulm94.trailing-spaces",
"stkb.rewrap", // rewrap comments after n characters on one line
// Other
"PKief.material-icon-theme",
"Equinusocio.vsc-material-theme"
],
"settings": {
// General settings
"files.eol": "\n",
"[latex]": {
"editor.defaultFormatter": "James-Yu.latex-workshop"
},
"github.copilot.enable": {
"latex": false
},
"editor.wordWrap": "on",
"files.autoSave": "onFocusChange",
"files.autoSaveDelay": 150000,
"workbench.colorTheme": "Material Theme Ocean",
"workbench.iconTheme": "material-icon-theme",
// Latex settings
"latex-workshop.linting.chktex.enabled": true,
"latex-workshop.latex.clean.subfolder.enabled": true,
"latex-workshop.latex.autoClean.run": "onFailed",
"editor.formatOnSave": true,
"files.associations": {
"*.tex": "latex"
},
"latex-workshop.latexindent.path": "latexindent",
"latex-workshop.latexindent.args": [
"-c",
"%DIR%/",
"%TMPFILE%",
"-y=defaultIndent: '%INDENT%'"
],
"latex-workshop.latex.recipes": [
{ "name": "Build", "tools": ["XeTeX"] },
{
"name": "Build (bib)",
"tools": ["XeTeX", "BibTeX", "XeTeX", "XeTeX"]
}
],
"latex-workshop.latex.tools": [
{
"name": "XeTeX",
"command": "xelatex",
"args": [
"-synctex=1",
"-shell-escape",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "BibTeX",
"command": "bibtex",
"args": ["%DOCFILE%"]
}
],
"latex-workshop.linting.run": "onType",
"latex-workshop.view.pdf.viewer": "tab",
"latex-utilities.countWord.args": ["%DOCFILE%"],
"latex-utilities.countWord.format": "${words} Words in Total, ${wordsBody} Words in Body",
"latex-utilities.countWord.path": "texcount"
}
}
}
}
21 changes: 21 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.2"

services:
vscode:
build: .
image: latexdevcontainer
volumes:
- ../:/workspace
# Docker socket to access Docker server
- /var/run/docker.sock:/var/run/docker.sock
# SSH directory
- ~/.ssh:/root/.ssh
# For Windows without WSL, a copy will be made
# from /tmp/.ssh to ~/.ssh to fix permissions
# - ~/.ssh:/tmp/.ssh:ro
# Shell history persistence
- ~/.zsh_history:/root/.zsh_history:z
environment:
- TZ=
Copy link

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable 'TZ' is set to an empty value, which might lead to unexpected timezone behavior. Provide a valid timezone or remove the variable if it's not needed.

Suggested change
- TZ=

Copilot uses AI. Check for mistakes.
entrypoint: ["zsh", "-c", "while sleep 1000; do :; done"]

18 changes: 16 additions & 2 deletions .github/workflows/latex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ jobs:
- name: Compile LaTeX document
if: ${{ needs.workflow-setup.outputs.runner == 'self-texlive' }}
run: |
latexmk -shell-escape -pdf -file-line-error -halt-on-error -interaction=nonstopmode ${{ needs.workflow-setup.outputs.tex }}
latexmk -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode ${{ needs.workflow-setup.outputs.tex }}

- name: Compile Poster
if: ${{ needs.workflow-setup.outputs.runner == 'self-texlive' }}
run: |
latexmk -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode poster.template.tex

- name: Rename PDF
run: mv ${{ needs.workflow-setup.outputs.prefix }}.pdf ${{ needs.workflow-setup.outputs.pdf }}
Expand All @@ -96,9 +101,11 @@ jobs:
./*.gin
./*.bbl
./${{ needs.workflow-setup.outputs.pdf }}
./poster.template.pdf
./README.adoc
./hooks*
./img*
./fonts/*
./dat*
./*.png
./a.cli
Expand Down Expand Up @@ -140,8 +147,14 @@ jobs:
name: Check compilation of LaTeX document from artifact
if: ${{ needs.workflow-setup.outputs.runner == 'self-texlive' }}
run: |
latexmk -shell-escape -pdf -file-line-error -halt-on-error -interaction=nonstopmode ${{ needs.workflow-setup.outputs.tex }}
latexmk -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode ${{ needs.workflow-setup.outputs.tex }}
working-directory: ${{ github.workspace }}/artifact
-
name: Check compilation of poster from artifact
if: ${{ needs.workflow-setup.outputs.runner == 'self-texlive' }}
run: |
latexmk -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode poster.template.tex
working-directory: ${{ github.workspace }}/artifact

release:
needs: [workflow-setup,build_latex, check]
Expand Down Expand Up @@ -174,4 +187,5 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
artifact/${{ needs.workflow-setup.outputs.prefixwithref }}.pdf
artifact/poster.template.pdf
${{ needs.workflow-setup.outputs.prefixwithref }}.tar.gz
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ presentation.template.chl
presentation.template.lof
presentation.template.lot
presentation.template.pdf
poster.template.synctex(busy)
svg-inkscape/
build/
*.zip
*.dvi
poster.template.pdf
*.html
__MACOSX/
.DS_Store
34 changes: 34 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
"tools": [
"xelatexmk"
]
},
{
"name": "Build",
"tools": [
"XeTeX"
]
},
{
"name": "Build (bib)",
"tools": [
"XeTeX",
"BibTeX",
"XeTeX",
"XeTeX"
]
}
],
"latex-workshop.latex.tools": [
Expand All @@ -25,6 +40,7 @@
"name": "xelatexmk",
"command": "latexmk",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
Expand All @@ -41,6 +57,24 @@
"%DOCFILE%"
],
"env": {}
},
{
"name": "XeTeX",
"command": "xelatex",
"args": [
"-synctex=1",
"-shell-escape",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "BibTeX",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
]
}
Loading