Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qverg/latex-flashcards
Create flashcards for printing using LaTeX.
https://github.com/qverg/latex-flashcards
flashcards latex learning math mathematics studying
Last synced: 18 days ago
JSON representation
Create flashcards for printing using LaTeX.
- Host: GitHub
- URL: https://github.com/qverg/latex-flashcards
- Owner: qverg
- Created: 2024-09-07T14:43:09.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-19T09:49:34.000Z (3 months ago)
- Last Synced: 2024-11-09T15:58:35.337Z (about 2 months ago)
- Topics: flashcards, latex, learning, math, mathematics, studying
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# latex-flashcards
This python script takes takes in a set of flashcards and creates a ``.tex`` file which you can compile, print double-sided (flip on long edge) and cut out. You need to have Python and a TeX compiler installed to use it. Instructions below.Example of code generated from ``sample_set.txt``:
![image](https://github.com/user-attachments/assets/4fa5d00a-d820-4342-8b19-578e9a1d3252)Screenshots of the corresponding output:
- First 4 cards on question page:
![image](https://github.com/user-attachments/assets/09d6e99e-0425-46ee-8660-9e3cd861a77e)
- First 4 cards on answer page:
![image](https://github.com/user-attachments/assets/59fc7889-4a1d-44fb-b4f0-a693d2d78e38)### Instructions
See ``sample_set.txt`` for what an input file should look like. Download or clone this repository.
###### Windows
Run ``latex-flashcards.bat`` and follow the instructions. (``python`` must be a valid command in the command line. If it is not, add your Python installation to PATH.)###### Other/manually
Open the command line or terminal in the same directory as the file ``latex-flashcards.py`` and run the following command (``python`` must be a valid command):
```
python latex-flashcards.py sample_set.txt
```
replacing ``sample_set.txt`` with the path/filename of your set of flashcards. (If you use only the filename, make sure the file is in the same directory as ``latex-flashcards.py``.)The script will create a folder called "output" containing the ``.tex`` file.
There will be 8 flashcards per A4 page, so make sure the contents of the flashcards are small enough to fit. The script supports newlines (using \n in the source file, see ``sample_set.txt``) and line wrapping.
### Tips
- To use $\LaTeX$ packages, edit the variable ``head_text`` in ``latex-flashcards.py``