Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/billsioros/latex-homework-parser
Parsing homework assignments and generating LaTeX
https://github.com/billsioros/latex-homework-parser
32-bit generator homework homework-assignments homework-exercises homework-helper homework-template latex latex-template parser python38
Last synced: 18 days ago
JSON representation
Parsing homework assignments and generating LaTeX
- Host: GitHub
- URL: https://github.com/billsioros/latex-homework-parser
- Owner: billsioros
- License: mit
- Created: 2020-01-12T13:25:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T20:34:02.000Z (about 1 year ago)
- Last Synced: 2024-11-25T01:16:52.025Z (3 months ago)
- Topics: 32-bit, generator, homework, homework-assignments, homework-exercises, homework-helper, homework-template, latex, latex-template, parser, python38
- Language: Python
- Size: 94.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LaTeX Homework Parser
## Set Up
python -m venv env
pip install -r requirements.txt## Example
python parse.py -l example/homework.pdf -s example/solution.tex
The script is expecting a **PDF** file containing distinctly numbered sections, such as [this](example/homework.pdf).
The script can be run with no input file, in which case it will create
a non assignment-specific LaTeX template.## Available Options
usage: parse.py [-h] [-l LOAD] -s SAVE [-f]
LaTeX Project Base Generation
optional arguments:
-h, --help show this help message and exit
-l LOAD, --load LOAD specify the input file
-s SAVE, --save SAVE specify the output file
-f, --force do not prompt before overwriting## Configuration
Configuration can be achieved through a JSON configuration file,
by the name of **.config.json**.An example of such a file' s contents can be seen below.
```json
{
"title": {
"primary": "Lorem Ipsum",
"secondary": "Consectetur adipiscing elit"
},
"authors": [
"Nullam lacinia"
],
"packages": [
"alphabeta",
"amsmath",
"amsthm",
"caption",
"color",
"fullpage",
"graphicx",
"latexsym",
"listings",
"pxfonts",
"stackrel",
"titlesec",
"subfig",
"tikz",
"float",
"hyperref"
],
"commands": {
"R": "\\mathbb{R}",
"N": "\\mathbb{N}",
"norm": "\\left\\lVert#1\\right\\rVert",
"abs": "\\left\\lvert#1\\right\\rvert",
"margin": "\\hspace{4pt}",
"code": "\\lstinputlisting[caption={#2}]{#1}"
},
"environments": {
"rcases": {
"begin": "\\left.\\begin{aligned}",
"end": "\\end{aligned}\\right\\rbrace"
},
"matlab": {
"begin": "\\begin{figure}[hp]\\centering\\captionsetup{justification=centering}",
"end": "\\end{figure}"
}
}
}
```