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
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dockerComposeFile": "docker-compose.yml",
"service": "teamtex",
"workspaceFolder": "/workspace",
"updateContentCommand": "latexmk -pdf -outdir=build main.tex",
"updateContentCommand": "mkdir -p build && latexmk -pdf -outdir=build -interaction=nonstopmode main.tex || true",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -21,4 +21,4 @@
}
}
}
}
}
1 change: 1 addition & 0 deletions .github/workflows/latex-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
compiler: latexmk
args: -pdf -file-line-error -halt-on-error -interaction=nonstopmode -outdir=build

- name: Verify build artifacts
Expand Down
3 changes: 3 additions & 0 deletions .latexmkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$pdflatex = 'pdflatex -interaction=nonstopmode -file-line-error -synctex=1 %O %S';
$force_mode = 1;
$bibtex = 'bibtex %O %B';
27 changes: 27 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"latex-workshop.latex.outDir": "%DIR%/build",
"latex-workshop.latex.autoClean.run": "onBuilt",
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.latex.recipe.default": "lastUsed",
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.latex.magic.args": [
"-output-directory=%DIR%/build",
Expand All @@ -9,9 +11,34 @@
"files.exclude": {
".devcontainer": true,
".github": true,
".latexmkrc": true,
"docs": true,
"LICENSE": true
},
"latex-workshop.latex.recipes": [
{
"name": "latexmk",
"tools": [
"latexmk"
]
}
],
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-f",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"%DOC%"
],
"env": {}
}
],
"editor.formatOnSave": true,
"ltex.language": "en-US",
"ltex.enabled": false
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ The project is specifically configured to keep the root directory clean by routi
If you prefer the command line, use `latexmk` directly:

```bash
# Compile
# Full Compile (handles bibliography, multiple passes automatically)
latexmk -pdf -outdir=build main.tex

# Clean
latexmk -c -outdir=build main.tex && rm -rf build/
latexmk -C -outdir=build
rm -rf build/
```

---
Expand Down
7 changes: 6 additions & 1 deletion docs/usage-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Instead of cloning or forking, you can use TeamTex as a blueprint to mint comple
- **GitHub Copilot:** Supported out-of-the-box.
- **Grammar Options:** Enable LTeX by editing `.devcontainer/devcontainer.json` and uncommenting `valentjn.vscode-ltex`.

- **SyncTeX (Code <-> PDF Navigation)**
The environment is already configured to synchronize the code with the generated PDF:
- **From PDF to Code (Inverse Search):** Hold `Ctrl` (or `Cmd` on Mac) and click on any text in the PDF viewer to jump straight to the source code.
- **From Code to PDF (Forward Search):** Place your cursor in the `main.tex` code and press `Ctrl+Alt+J` to jump to the corresponding paragraph in the PDF.

---

## Important Note on Docker Image
Expand Down Expand Up @@ -49,7 +54,7 @@ If you rename your main file (e.g., `thesis.tex`):

1. **Automation:** Update `.devcontainer/devcontainer.json` (change `main.tex` in `updateContentCommand`).
2. **VS Code:** If needed, update `.vscode/settings.json`.
3. **Manual:** Run `latexmk -pdf -outdir=build thesis.tex`.
3. **Manual:** Run `mkdir -p build && pdflatex -interaction=nonstopmode -output-directory=build thesis.tex`.

### Missing Folders (.vscode, .devcontainer, .github, docs)

Expand Down
13 changes: 7 additions & 6 deletions export_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ rm -f "$OUTPUT_NAME"

# Create the zip with exclusions
zip -r "$OUTPUT_NAME" . \
-x "build/*" \
-x ".git/*" \
-x ".vscode/*" \
-x ".devcontainer/*" \
-x ".github/*" \
-x ".git/*" \
-x ".gitignore" \
-x ".github/*" \
-x ".latexmkrc" \
-x ".vscode/*" \
-x "build/*" \
-x "docs/*" \
-x "README.md" \
-x "export_source.sh" \
-x "LICENSE" \
-x "export_source.sh"
-x "README.md"

echo "Done! You can now download '$OUTPUT_NAME'."