latex-forge 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- latex_forge-0.2.0/LICENSE +21 -0
- latex_forge-0.2.0/PKG-INFO +274 -0
- latex_forge-0.2.0/README.md +244 -0
- latex_forge-0.2.0/latex_forge/.vscode/extensions.json +9 -0
- latex_forge-0.2.0/latex_forge/__init__.py +3 -0
- latex_forge-0.2.0/latex_forge/assets/images/common/README.md +8 -0
- latex_forge-0.2.0/latex_forge/assets/logos/README.md +8 -0
- latex_forge-0.2.0/latex_forge/assets/logos/logo-university.png +0 -0
- latex_forge-0.2.0/latex_forge/assets/logos/logo-up-maths-info.jpg +0 -0
- latex_forge-0.2.0/latex_forge/cli.py +423 -0
- latex_forge-0.2.0/latex_forge/config.py +76 -0
- latex_forge-0.2.0/latex_forge/project.py +1342 -0
- latex_forge-0.2.0/latex_forge/setup.py +366 -0
- latex_forge-0.2.0/latex_forge/styles/packages/cv.sty +90 -0
- latex_forge-0.2.0/latex_forge/styles/packages/report-code-bash.sty +24 -0
- latex_forge-0.2.0/latex_forge/styles/packages/report-code-python.sty +25 -0
- latex_forge-0.2.0/latex_forge/styles/packages/report-colors.sty +11 -0
- latex_forge-0.2.0/latex_forge/styles/packages/report-metadata.sty +76 -0
- latex_forge-0.2.0/latex_forge/styles/packages/report-tables.sty +11 -0
- latex_forge-0.2.0/latex_forge/styles/packages/report-ter-titlepage.sty +157 -0
- latex_forge-0.2.0/latex_forge/styles/packages/report-theorems-en.sty +17 -0
- latex_forge-0.2.0/latex_forge/styles/packages/report-theorems-fr.sty +17 -0
- latex_forge-0.2.0/latex_forge/styles/packages/research-article.sty +123 -0
- latex_forge-0.2.0/latex_forge/styles/packages/university-project-report.sty +115 -0
- latex_forge-0.2.0/latex_forge/styles/packages/university-ter-report.sty +112 -0
- latex_forge-0.2.0/latex_forge/template_manager.py +222 -0
- latex_forge-0.2.0/latex_forge/templates/cv-en/main.tex +15 -0
- latex_forge-0.2.0/latex_forge/templates/cv-en/sections/education.tex +20 -0
- latex_forge-0.2.0/latex_forge/templates/cv-en/sections/experience.tex +20 -0
- latex_forge-0.2.0/latex_forge/templates/cv-en/sections/heading.tex +22 -0
- latex_forge-0.2.0/latex_forge/templates/cv-en/sections/involvement.tex +11 -0
- latex_forge-0.2.0/latex_forge/templates/cv-en/sections/projects.tex +18 -0
- latex_forge-0.2.0/latex_forge/templates/cv-en/sections/skills.tex +12 -0
- latex_forge-0.2.0/latex_forge/templates/cv-fr/main.tex +15 -0
- latex_forge-0.2.0/latex_forge/templates/cv-fr/sections/competences.tex +12 -0
- latex_forge-0.2.0/latex_forge/templates/cv-fr/sections/en-tete.tex +22 -0
- latex_forge-0.2.0/latex_forge/templates/cv-fr/sections/engagement.tex +11 -0
- latex_forge-0.2.0/latex_forge/templates/cv-fr/sections/experience.tex +20 -0
- latex_forge-0.2.0/latex_forge/templates/cv-fr/sections/formation.tex +20 -0
- latex_forge-0.2.0/latex_forge/templates/cv-fr/sections/projets.tex +18 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/backmatter/acknowledgements.tex +11 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/backmatter/ai-statement.tex +34 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/backmatter/appendices.tex +13 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/bibliography/references.bib +34 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/figures/.gitkeep +1 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/frontmatter/abstract.tex +13 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/frontmatter/metadata.tex +22 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/frontmatter/toc.tex +5 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/images/.gitkeep +1 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/main.tex +92 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/sections/architecture.tex +26 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/sections/conclusion.tex +8 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/sections/implementation.tex +20 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/sections/introduction.tex +15 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/sections/related-work.tex +18 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/sections/requirements.tex +32 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/sections/results.tex +14 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-en/sections/testing.tex +33 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/backmatter/ai-statement.tex +34 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/backmatter/annexes.tex +13 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/backmatter/remerciements.tex +11 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/bibliography/references.bib +34 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/figures/.gitkeep +1 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/frontmatter/abstract.tex +29 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/frontmatter/metadata.tex +22 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/frontmatter/toc.tex +5 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/images/.gitkeep +1 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/main.tex +82 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/sections/architecture.tex +26 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/sections/cahier-des-charges.tex +32 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/sections/conclusion.tex +8 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/sections/etat-de-lart.tex +18 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/sections/implementation.tex +20 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/sections/introduction.tex +15 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/sections/resultats.tex +14 -0
- latex_forge-0.2.0/latex_forge/templates/rapport-projet-fr/sections/tests.tex +33 -0
- latex_forge-0.2.0/latex_forge/templates/research/appendix/ai-usage.tex +11 -0
- latex_forge-0.2.0/latex_forge/templates/research/appendix/annexes.tex +13 -0
- latex_forge-0.2.0/latex_forge/templates/research/backmatter/acknowledgements.tex +4 -0
- latex_forge-0.2.0/latex_forge/templates/research/backmatter/bibliography.tex +1 -0
- latex_forge-0.2.0/latex_forge/templates/research/figures/.gitkeep +1 -0
- latex_forge-0.2.0/latex_forge/templates/research/frontmatter/abstract.tex +8 -0
- latex_forge-0.2.0/latex_forge/templates/research/frontmatter/metadata.tex +21 -0
- latex_forge-0.2.0/latex_forge/templates/research/frontmatter/toc.tex +5 -0
- latex_forge-0.2.0/latex_forge/templates/research/images/.gitkeep +1 -0
- latex_forge-0.2.0/latex_forge/templates/research/main.tex +88 -0
- latex_forge-0.2.0/latex_forge/templates/research/references/references.bib +30 -0
- latex_forge-0.2.0/latex_forge/templates/research/sections/conclusion.tex +6 -0
- latex_forge-0.2.0/latex_forge/templates/research/sections/experiments.tex +14 -0
- latex_forge-0.2.0/latex_forge/templates/research/sections/introduction.tex +15 -0
- latex_forge-0.2.0/latex_forge/templates/research/sections/methodology.tex +20 -0
- latex_forge-0.2.0/latex_forge/templates/research/sections/related-work.tex +6 -0
- latex_forge-0.2.0/latex_forge.egg-info/PKG-INFO +274 -0
- latex_forge-0.2.0/latex_forge.egg-info/SOURCES.txt +104 -0
- latex_forge-0.2.0/latex_forge.egg-info/dependency_links.txt +1 -0
- latex_forge-0.2.0/latex_forge.egg-info/entry_points.txt +2 -0
- latex_forge-0.2.0/latex_forge.egg-info/requires.txt +7 -0
- latex_forge-0.2.0/latex_forge.egg-info/top_level.txt +1 -0
- latex_forge-0.2.0/pyproject.toml +59 -0
- latex_forge-0.2.0/setup.cfg +4 -0
- latex_forge-0.2.0/tests/test_cli.py +46 -0
- latex_forge-0.2.0/tests/test_config.py +108 -0
- latex_forge-0.2.0/tests/test_cv_profile.py +90 -0
- latex_forge-0.2.0/tests/test_profile.py +97 -0
- latex_forge-0.2.0/tests/test_project.py +221 -0
- latex_forge-0.2.0/tests/test_template_manager.py +149 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Thomas Gourmelen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: latex-forge
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: CLI for creating standalone LaTeX projects from this toolbox.
|
|
5
|
+
Author-email: Thomas Gourmelen <thomas.gourmelen@icloud.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/thmsgo18/latex-forge
|
|
8
|
+
Project-URL: Repository, https://github.com/thmsgo18/latex-forge
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/thmsgo18/latex-forge/issues
|
|
10
|
+
Keywords: latex,templates,cli,academic,report,research,university
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Education
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Text Processing :: Markup :: LaTeX
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: argcomplete>=3.0
|
|
26
|
+
Requires-Dist: tomli>=1.1.0; python_version < "3.11"
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# LaTeX Toolbox
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<img src="docs/assets/latex-forge-logo.png" alt="LaTeX Toolbox" width="480">
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
Skip the setup. Start writing. Everything you need, nothing more.
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<p align="center">
|
|
42
|
+
<a href="https://pypi.org/project/latex-forge/"><img src="https://img.shields.io/pypi/v/latex-forge?style=for-the-badge&color=blue" alt="PyPI version"></a>
|
|
43
|
+
<a href="https://github.com/thmsgo18/latex-forge/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/thmsgo18/latex-forge/ci.yml?branch=main&style=for-the-badge" alt="CI"></a>
|
|
44
|
+
<a href="https://pypi.org/project/latex-forge/"><img src="https://img.shields.io/pypi/pyversions/latex-forge?style=for-the-badge" alt="Python versions"></a>
|
|
45
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="License MIT"></a>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<a href="./README.fr.md">Lire en français</a>
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
LaTeX Toolbox is a command-line tool that generates ready-to-compile, standalone LaTeX projects from templates. Each generated project embeds its own styles and assets — it can be compiled, shared, and versioned independently, with no dependency on this repository.
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pipx install latex-forge
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Requires Python 3.10+. If `pipx` is not installed: `brew install pipx` on macOS, or see [pipx.pypa.io](https://pipx.pypa.io).
|
|
63
|
+
|
|
64
|
+
## First setup
|
|
65
|
+
|
|
66
|
+
On a fresh machine, run the setup command to check your environment and install LaTeX automatically:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
latex-forge setup
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This verifies that `latexmk` and `lualatex` are available, and offers to install them via your system package manager (`brew` on macOS, `apt` on Debian/Ubuntu, `winget` on Windows). VS Code extensions are also installed if the `code` CLI is available.
|
|
73
|
+
|
|
74
|
+
## Profile
|
|
75
|
+
|
|
76
|
+
Set up your profile once to automatically pre-fill project metadata on every `create`:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
latex-forge profile --set
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Full name: Dupont Alice
|
|
84
|
+
University / school: Université de Bordeaux
|
|
85
|
+
Program / formation: Master Informatique
|
|
86
|
+
GitHub username (optional): dupont-alice
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
This is offered automatically on first launch. To update it at any time:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
latex-forge profile # view current profile
|
|
93
|
+
latex-forge profile --set # update
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Profile values are stored in `~/.latex-forge.toml` and applied to each new project's `frontmatter/metadata.tex`. When a GitHub username is set, it is rendered as a link under your name in the PDF title page.
|
|
97
|
+
|
|
98
|
+
## Shell completion
|
|
99
|
+
|
|
100
|
+
Tab completion for commands, flags, and template names. Add one line to your shell config:
|
|
101
|
+
|
|
102
|
+
**bash** (`~/.bashrc`) or **zsh** (`~/.zshrc`):
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
eval "$(latex-forge completion)"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Reload your shell (`source ~/.zshrc`) or open a new terminal window.
|
|
109
|
+
|
|
110
|
+
## Configuration
|
|
111
|
+
|
|
112
|
+
Create `~/.latex-forge.toml` to set default values applied to every command:
|
|
113
|
+
|
|
114
|
+
```toml
|
|
115
|
+
default_template = "rapport-projet-en"
|
|
116
|
+
default_output_dir = "~/Documents/projects"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
| Key | Description |
|
|
120
|
+
|---|---|
|
|
121
|
+
| `default_template` | Template used when `--template` is omitted |
|
|
122
|
+
| `default_output_dir` | Output directory used when `--output` is omitted |
|
|
123
|
+
|
|
124
|
+
## Usage
|
|
125
|
+
|
|
126
|
+
### Interactive mode
|
|
127
|
+
|
|
128
|
+
Run `create` with no arguments to be guided step by step:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
$ latex-forge create
|
|
132
|
+
|
|
133
|
+
Project name: my-report
|
|
134
|
+
Available templates:
|
|
135
|
+
1. cv-en
|
|
136
|
+
2. cv-fr
|
|
137
|
+
3. rapport-projet-en
|
|
138
|
+
4. rapport-projet-fr
|
|
139
|
+
5. research
|
|
140
|
+
Choose a template [1-5]: 3
|
|
141
|
+
Create project in [/Users/thomas/Desktop]:
|
|
142
|
+
|
|
143
|
+
Project created: /Users/thomas/Desktop/my-report
|
|
144
|
+
Edit: my-report/my-report.tex
|
|
145
|
+
Next: fill in frontmatter/metadata.tex then save to compile.
|
|
146
|
+
Open project in VS Code? [y/N]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### With flags
|
|
150
|
+
|
|
151
|
+
All arguments are optional — omitted ones are prompted interactively.
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# specify everything upfront
|
|
155
|
+
latex-forge create --name my-report --template rapport-projet-en
|
|
156
|
+
|
|
157
|
+
# create in a specific directory
|
|
158
|
+
latex-forge create --name my-paper --template research --output ~/Desktop
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Rename a project
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# from the parent directory
|
|
165
|
+
latex-forge rename old-name new-name
|
|
166
|
+
|
|
167
|
+
# from inside the project directory
|
|
168
|
+
latex-forge rename new-name
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This renames the folder, the main `.tex` file, and any existing build artifacts.
|
|
172
|
+
|
|
173
|
+
## Available templates
|
|
174
|
+
|
|
175
|
+
| Template | Language | Description |
|
|
176
|
+
|---|---|---|
|
|
177
|
+
| `rapport-projet-en` | English | ISO/IEEE-aligned project report — requirements, architecture, testing, bibliography, appendices |
|
|
178
|
+
| `rapport-projet-fr` | French | AFNOR/ISO-aligned project report — cahier des charges, architecture, tests, bibliographie, annexes |
|
|
179
|
+
| `research` | English | Research article — two-column layout, related work, methodology, experiments, bibliography |
|
|
180
|
+
| `cv-en` | English | CV / résumé — education, experience, projects, involvement, skills |
|
|
181
|
+
| `cv-fr` | French | CV — formation, expérience, projets, engagement, compétences |
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
latex-forge list-templates
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## After creating a project
|
|
188
|
+
|
|
189
|
+
1. Open the generated folder in VS Code.
|
|
190
|
+
2. Fill in `frontmatter/metadata.tex` — title, authors, course name, university logo.
|
|
191
|
+
3. Save the main `.tex` file to trigger compilation (requires [LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop)).
|
|
192
|
+
4. The PDF is built into `build/`.
|
|
193
|
+
|
|
194
|
+
Example `metadata.tex`:
|
|
195
|
+
|
|
196
|
+
```tex
|
|
197
|
+
\newcommand{\reporttitle}{Audio Fingerprinting Study}
|
|
198
|
+
\newcommand{\coursename}{Machine Learning}
|
|
199
|
+
|
|
200
|
+
\resetauthors
|
|
201
|
+
\addauthor{Alice Martin}{}
|
|
202
|
+
\addauthor{Bob Durand}{}
|
|
203
|
+
|
|
204
|
+
\resetteachers
|
|
205
|
+
\addteacher{Dr Example}{}
|
|
206
|
+
|
|
207
|
+
\resetprojectlinks
|
|
208
|
+
\addprojectlink{Repository}{https://github.com/example/project}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Leaving the second argument empty in `\addauthor{...}{}` or `\addteacher{...}{}` hides the role label.
|
|
212
|
+
|
|
213
|
+
## Generated project structure
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
my-project/
|
|
217
|
+
├── my-project.tex ← main file (named after the project)
|
|
218
|
+
├── frontmatter/
|
|
219
|
+
│ ├── metadata.tex ← title, authors, course
|
|
220
|
+
│ └── toc.tex
|
|
221
|
+
├── sections/
|
|
222
|
+
├── backmatter/
|
|
223
|
+
├── figures/
|
|
224
|
+
├── images/
|
|
225
|
+
├── screens/
|
|
226
|
+
├── assets/
|
|
227
|
+
│ ├── images/common/
|
|
228
|
+
│ └── logos/
|
|
229
|
+
├── styles/packages/ ← embedded styles, no external dependency
|
|
230
|
+
├── scripts/ ← standalone setup scripts
|
|
231
|
+
├── .vscode/ ← LaTeX Workshop settings
|
|
232
|
+
└── .gitignore
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Styles and logos are copied into the project at creation time. The generated project has no runtime dependency on this repository.
|
|
236
|
+
|
|
237
|
+
## Command reference
|
|
238
|
+
|
|
239
|
+
| Command | Description |
|
|
240
|
+
|---|---|
|
|
241
|
+
| `latex-forge create` | Create a project (interactive) |
|
|
242
|
+
| `latex-forge create --name NAME --template TEMPLATE` | Create with explicit arguments |
|
|
243
|
+
| `latex-forge create --output DIR` | Set output directory |
|
|
244
|
+
| `latex-forge rename OLD NEW` | Rename from parent directory |
|
|
245
|
+
| `latex-forge rename NEW` | Rename from inside project directory |
|
|
246
|
+
| `latex-forge list-templates` | List available templates |
|
|
247
|
+
| `latex-forge setup` | Check and set up the LaTeX environment |
|
|
248
|
+
| `latex-forge setup --check-only` | Check without installing anything |
|
|
249
|
+
| `latex-forge setup --install-tex` | Install LaTeX directly |
|
|
250
|
+
| `latex-forge --version` | Show installed version |
|
|
251
|
+
| `latex-forge profile` | View your saved profile |
|
|
252
|
+
| `latex-forge profile --set` | Run interactive profile setup |
|
|
253
|
+
| `latex-forge completion` | Print shell completion setup code |
|
|
254
|
+
|
|
255
|
+
## Versioning generated projects
|
|
256
|
+
|
|
257
|
+
Each generated project is self-contained, making it straightforward to version independently:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
cd my-project
|
|
261
|
+
git init
|
|
262
|
+
git add .
|
|
263
|
+
git commit -m "Initial report"
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Create a dedicated private repository and invite only the collaborators relevant to that document.
|
|
267
|
+
|
|
268
|
+
## Contributing
|
|
269
|
+
|
|
270
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
Made by [thmsgo18](https://github.com/thmsgo18)
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# LaTeX Toolbox
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/assets/latex-forge-logo.png" alt="LaTeX Toolbox" width="480">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Skip the setup. Start writing. Everything you need, nothing more.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://pypi.org/project/latex-forge/"><img src="https://img.shields.io/pypi/v/latex-forge?style=for-the-badge&color=blue" alt="PyPI version"></a>
|
|
13
|
+
<a href="https://github.com/thmsgo18/latex-forge/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/thmsgo18/latex-forge/ci.yml?branch=main&style=for-the-badge" alt="CI"></a>
|
|
14
|
+
<a href="https://pypi.org/project/latex-forge/"><img src="https://img.shields.io/pypi/pyversions/latex-forge?style=for-the-badge" alt="Python versions"></a>
|
|
15
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="License MIT"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="./README.fr.md">Lire en français</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
LaTeX Toolbox is a command-line tool that generates ready-to-compile, standalone LaTeX projects from templates. Each generated project embeds its own styles and assets — it can be compiled, shared, and versioned independently, with no dependency on this repository.
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pipx install latex-forge
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Requires Python 3.10+. If `pipx` is not installed: `brew install pipx` on macOS, or see [pipx.pypa.io](https://pipx.pypa.io).
|
|
33
|
+
|
|
34
|
+
## First setup
|
|
35
|
+
|
|
36
|
+
On a fresh machine, run the setup command to check your environment and install LaTeX automatically:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
latex-forge setup
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This verifies that `latexmk` and `lualatex` are available, and offers to install them via your system package manager (`brew` on macOS, `apt` on Debian/Ubuntu, `winget` on Windows). VS Code extensions are also installed if the `code` CLI is available.
|
|
43
|
+
|
|
44
|
+
## Profile
|
|
45
|
+
|
|
46
|
+
Set up your profile once to automatically pre-fill project metadata on every `create`:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
latex-forge profile --set
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Full name: Dupont Alice
|
|
54
|
+
University / school: Université de Bordeaux
|
|
55
|
+
Program / formation: Master Informatique
|
|
56
|
+
GitHub username (optional): dupont-alice
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This is offered automatically on first launch. To update it at any time:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
latex-forge profile # view current profile
|
|
63
|
+
latex-forge profile --set # update
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Profile values are stored in `~/.latex-forge.toml` and applied to each new project's `frontmatter/metadata.tex`. When a GitHub username is set, it is rendered as a link under your name in the PDF title page.
|
|
67
|
+
|
|
68
|
+
## Shell completion
|
|
69
|
+
|
|
70
|
+
Tab completion for commands, flags, and template names. Add one line to your shell config:
|
|
71
|
+
|
|
72
|
+
**bash** (`~/.bashrc`) or **zsh** (`~/.zshrc`):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
eval "$(latex-forge completion)"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Reload your shell (`source ~/.zshrc`) or open a new terminal window.
|
|
79
|
+
|
|
80
|
+
## Configuration
|
|
81
|
+
|
|
82
|
+
Create `~/.latex-forge.toml` to set default values applied to every command:
|
|
83
|
+
|
|
84
|
+
```toml
|
|
85
|
+
default_template = "rapport-projet-en"
|
|
86
|
+
default_output_dir = "~/Documents/projects"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
| Key | Description |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `default_template` | Template used when `--template` is omitted |
|
|
92
|
+
| `default_output_dir` | Output directory used when `--output` is omitted |
|
|
93
|
+
|
|
94
|
+
## Usage
|
|
95
|
+
|
|
96
|
+
### Interactive mode
|
|
97
|
+
|
|
98
|
+
Run `create` with no arguments to be guided step by step:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
$ latex-forge create
|
|
102
|
+
|
|
103
|
+
Project name: my-report
|
|
104
|
+
Available templates:
|
|
105
|
+
1. cv-en
|
|
106
|
+
2. cv-fr
|
|
107
|
+
3. rapport-projet-en
|
|
108
|
+
4. rapport-projet-fr
|
|
109
|
+
5. research
|
|
110
|
+
Choose a template [1-5]: 3
|
|
111
|
+
Create project in [/Users/thomas/Desktop]:
|
|
112
|
+
|
|
113
|
+
Project created: /Users/thomas/Desktop/my-report
|
|
114
|
+
Edit: my-report/my-report.tex
|
|
115
|
+
Next: fill in frontmatter/metadata.tex then save to compile.
|
|
116
|
+
Open project in VS Code? [y/N]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### With flags
|
|
120
|
+
|
|
121
|
+
All arguments are optional — omitted ones are prompted interactively.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# specify everything upfront
|
|
125
|
+
latex-forge create --name my-report --template rapport-projet-en
|
|
126
|
+
|
|
127
|
+
# create in a specific directory
|
|
128
|
+
latex-forge create --name my-paper --template research --output ~/Desktop
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Rename a project
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# from the parent directory
|
|
135
|
+
latex-forge rename old-name new-name
|
|
136
|
+
|
|
137
|
+
# from inside the project directory
|
|
138
|
+
latex-forge rename new-name
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
This renames the folder, the main `.tex` file, and any existing build artifacts.
|
|
142
|
+
|
|
143
|
+
## Available templates
|
|
144
|
+
|
|
145
|
+
| Template | Language | Description |
|
|
146
|
+
|---|---|---|
|
|
147
|
+
| `rapport-projet-en` | English | ISO/IEEE-aligned project report — requirements, architecture, testing, bibliography, appendices |
|
|
148
|
+
| `rapport-projet-fr` | French | AFNOR/ISO-aligned project report — cahier des charges, architecture, tests, bibliographie, annexes |
|
|
149
|
+
| `research` | English | Research article — two-column layout, related work, methodology, experiments, bibliography |
|
|
150
|
+
| `cv-en` | English | CV / résumé — education, experience, projects, involvement, skills |
|
|
151
|
+
| `cv-fr` | French | CV — formation, expérience, projets, engagement, compétences |
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
latex-forge list-templates
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## After creating a project
|
|
158
|
+
|
|
159
|
+
1. Open the generated folder in VS Code.
|
|
160
|
+
2. Fill in `frontmatter/metadata.tex` — title, authors, course name, university logo.
|
|
161
|
+
3. Save the main `.tex` file to trigger compilation (requires [LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop)).
|
|
162
|
+
4. The PDF is built into `build/`.
|
|
163
|
+
|
|
164
|
+
Example `metadata.tex`:
|
|
165
|
+
|
|
166
|
+
```tex
|
|
167
|
+
\newcommand{\reporttitle}{Audio Fingerprinting Study}
|
|
168
|
+
\newcommand{\coursename}{Machine Learning}
|
|
169
|
+
|
|
170
|
+
\resetauthors
|
|
171
|
+
\addauthor{Alice Martin}{}
|
|
172
|
+
\addauthor{Bob Durand}{}
|
|
173
|
+
|
|
174
|
+
\resetteachers
|
|
175
|
+
\addteacher{Dr Example}{}
|
|
176
|
+
|
|
177
|
+
\resetprojectlinks
|
|
178
|
+
\addprojectlink{Repository}{https://github.com/example/project}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Leaving the second argument empty in `\addauthor{...}{}` or `\addteacher{...}{}` hides the role label.
|
|
182
|
+
|
|
183
|
+
## Generated project structure
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
my-project/
|
|
187
|
+
├── my-project.tex ← main file (named after the project)
|
|
188
|
+
├── frontmatter/
|
|
189
|
+
│ ├── metadata.tex ← title, authors, course
|
|
190
|
+
│ └── toc.tex
|
|
191
|
+
├── sections/
|
|
192
|
+
├── backmatter/
|
|
193
|
+
├── figures/
|
|
194
|
+
├── images/
|
|
195
|
+
├── screens/
|
|
196
|
+
├── assets/
|
|
197
|
+
│ ├── images/common/
|
|
198
|
+
│ └── logos/
|
|
199
|
+
├── styles/packages/ ← embedded styles, no external dependency
|
|
200
|
+
├── scripts/ ← standalone setup scripts
|
|
201
|
+
├── .vscode/ ← LaTeX Workshop settings
|
|
202
|
+
└── .gitignore
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Styles and logos are copied into the project at creation time. The generated project has no runtime dependency on this repository.
|
|
206
|
+
|
|
207
|
+
## Command reference
|
|
208
|
+
|
|
209
|
+
| Command | Description |
|
|
210
|
+
|---|---|
|
|
211
|
+
| `latex-forge create` | Create a project (interactive) |
|
|
212
|
+
| `latex-forge create --name NAME --template TEMPLATE` | Create with explicit arguments |
|
|
213
|
+
| `latex-forge create --output DIR` | Set output directory |
|
|
214
|
+
| `latex-forge rename OLD NEW` | Rename from parent directory |
|
|
215
|
+
| `latex-forge rename NEW` | Rename from inside project directory |
|
|
216
|
+
| `latex-forge list-templates` | List available templates |
|
|
217
|
+
| `latex-forge setup` | Check and set up the LaTeX environment |
|
|
218
|
+
| `latex-forge setup --check-only` | Check without installing anything |
|
|
219
|
+
| `latex-forge setup --install-tex` | Install LaTeX directly |
|
|
220
|
+
| `latex-forge --version` | Show installed version |
|
|
221
|
+
| `latex-forge profile` | View your saved profile |
|
|
222
|
+
| `latex-forge profile --set` | Run interactive profile setup |
|
|
223
|
+
| `latex-forge completion` | Print shell completion setup code |
|
|
224
|
+
|
|
225
|
+
## Versioning generated projects
|
|
226
|
+
|
|
227
|
+
Each generated project is self-contained, making it straightforward to version independently:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
cd my-project
|
|
231
|
+
git init
|
|
232
|
+
git add .
|
|
233
|
+
git commit -m "Initial report"
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Create a dedicated private repository and invite only the collaborators relevant to that document.
|
|
237
|
+
|
|
238
|
+
## Contributing
|
|
239
|
+
|
|
240
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
Made by [thmsgo18](https://github.com/thmsgo18)
|
|
Binary file
|
|
Binary file
|