Alas is a tool that helps you synchronize your LaTeX notes with Anki.
Alas requires latex
and dvisvgm
to be installed and accessible in your system's PATH.
You can install Atlas directly from GitHub using Cargo by running the following command:
cargo install --git https://github.com/pfistse/alas.git
For Windows users, copy the latest release file to a directory that is included in your system's PATH.
To set up Alas in your LaTeX project directory, run the following command:
alas init -p <ANKI PROFILE> -d <DECK NAME>
After initialization, synchronize any changes between your LaTeX notes and Anki by running:
alas sync
Initialize alas for the current directory
Usage: alas init [OPTIONS] --profile <PROFILE>
Options:
-p, --profile <PROFILE> Specify the Anki profile for synchronization
-d, --deck <DECK> Specify the name of the Anki deck
-i, --identifier <IDENTIFIER> Specify the technical name for Anki objects
-f, --files Add template .tex files
-h, --help Print help
Sync all your LaTeX notes with Anki
Usage: alas sync [OPTIONS]
Options:
-b, --batch-size <BATCH_SIZE> Specify the batch size [default: 9]
-h, --help Print help
Alas assumes your project directory follows a specific structure:
project/
├── <your .tex files>
├── preamble.tex
└── preamble_course.tex
where preamble.tex
and preamble_course.tex
contains latex code inserted before rendering your latex notes. Tipp: Use the flag -f
flag when initializing the project to automatically create these files.
Alas looks for notes in the following format across all .tex
files:
\begin{note}
\begin{field}
% Front of the flashcard
\end{field}%
\begin{field}
% Back of the flashcard
\end{field}
\end{note}