to_pdf readme

This commit is contained in:
Joseph Thacker 2024-09-12 09:14:09 -04:00
parent 9597580185
commit 63b73bc745

View File

@ -314,6 +314,34 @@ go install github.com/danielmiessler/yt@latest
Be sure to add your `YOUTUBE_API_KEY` to `~/.config/fabric/.env`.
### `to_pdf`
`to_pdf` is a helper command that converts LaTeX files to PDF format. You can use it like this:
```bash
to_pdf input.tex
```
This will create a PDF file from the input LaTeX file in the same directory.
You can also use it with stdin which works perfectly with the `write_latex` pattern:
```bash
echo "ai security primer" | fabric --pattern write_latex | to_pdf
```
This will create a PDF file named `output.pdf` in the current directory.
### `to_pdf` Installation
To install `to_pdf`, install it the same way as you install Fabric, just with a different repo name.
```bash
go install github.com/danielmiessler/fabric/to_pdf/to_pdf@latest
```
Make sure you have a LaTeX distribution (like TeX Live or MiKTeX) installed on your system, as `to_pdf` requires `pdflatex` to be available in your system's PATH.
## Meta
> [!NOTE]