Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ewen-lbh/distilatex
A LaTeX summarizer, that extracts all theorems & definitions from a .tex file to quickly go over handouts
https://github.com/ewen-lbh/distilatex
cli latex summarize
Last synced: 26 days ago
JSON representation
A LaTeX summarizer, that extracts all theorems & definitions from a .tex file to quickly go over handouts
- Host: GitHub
- URL: https://github.com/ewen-lbh/distilatex
- Owner: ewen-lbh
- License: mit
- Created: 2021-04-15T21:03:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-17T10:02:10.000Z (over 3 years ago)
- Last Synced: 2024-11-02T07:42:01.677Z (2 months ago)
- Topics: cli, latex, summarize
- Language: Rust
- Homepage: https://en.ewen.works/distilatex
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# distilatex
> A LaTeX summarizer, that extracts all theorems & definitions from a .tex file to quickly go over handouts
## Installation
```sh
cargo install distilatex
```
## Usage
```sh
distilatex my_horribly_long_handout.tex marker-1,marker-2,... > summary.tex
```Where the marker-_n_ are of the form:
- `begin:end`: Will include content between lines starting with `\begin` and lines starting with `\end`
- `@env`: Will include content between lines starting with `\begin{env}` and lines starting with `\end{env}`For example, if your prof. puts theorems in a `theorem` environment and definitions between `\def` and `\enddef` commands, use `@theorem,def:enddef`.
### Opening the resulting PDF straight away
A `--open` flag that does just that is planned, but, in the meantime, this works:
```fish
#!/usr/bin/fish
function distilatex-quick
set texname (mktemp ./XXXXXXX.tex)
set pdfname (echo $texname | string replace .tex .pdf)
distilatex $argv[1] $argv[2] > $texname
pdflatex -interaction=nonstopmode $texname
xdg-open $pdfname
for ext in aux fdb_latexmk fls log toc synctex.gz out x.gnuplot synctex\(busy\) pdf tex
rm (echo $texname | string replace .tex .$ext)
end
end
```### Typing out all of those markers every time is way too long!
You can save those markers to a file, and do the following:
```bash
distilatex input.tex $(cat markers.txt) > output.tex
```(or if you are using fish:)
```fish
distilatex input.tex (cat markers.txt) > output.tex
```