https://github.com/mondain-dev/convert-sep
To generate tufte-book style document for Stanford Encyclopedia of Philosophy (SEP) entries.
https://github.com/mondain-dev/convert-sep
document-conversion html latex tex xelatex
Last synced: 10 months ago
JSON representation
To generate tufte-book style document for Stanford Encyclopedia of Philosophy (SEP) entries.
- Host: GitHub
- URL: https://github.com/mondain-dev/convert-sep
- Owner: mondain-dev
- License: mit
- Created: 2017-02-23T08:08:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-11T00:48:36.000Z (almost 8 years ago)
- Last Synced: 2024-11-12T13:39:23.392Z (over 1 year ago)
- Topics: document-conversion, html, latex, tex, xelatex
- Language: Python
- Homepage:
- Size: 34.2 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ConvertSEP
To generate [tufte-book](https://tufte-latex.github.io/tufte-latex/) style document for SEP entries.
## Dependencies
* XeLaTeX, which can be found in standard TeX distributions such as [TeX Live](https://www.tug.org/texlive/) or [MiKTeX](https://miktex.org/);
* [pandoc](http://pandoc.org/), and its python wrapper pypandoc;
* [Inkscape](https://inkscape.org/), if `.svg` images are used in the entry;
* [Latin Modern (LM) Family of Fonts](http://www.gust.org.pl/projects/e-foundry/latin-modern/), installed as system font.
You may need to add the paths to the `PATH` environment variable, such that `inkscape` and `xelatex` can be called directly from your command-line.
Python packages required are listed in `requirements.txt`, such that they can be installed using `pip`:
```
pip install -r requirements.txt
```
Various LaTeX packages are also needed in order to successfully compile the `.tex` file generated by ConvertSEP.
## Usage
```
python ConvertSEPHTML.py []
```
For example:
```
python ConvertSEPHTML.py https://plato.stanford.edu/entries/comte/ comte.tex
```
or
```
python ConvertSEPHTML.py https://plato.stanford.edu/entries/comte/
```
which will save the tex output to `output.tex` if no file name is supplied.
Manual adjustment may be required. For example, in the command `\sepsidenote[]{note texts}` that wraps `tufte`'s `\sidenote`, the `` option passed on to `\sidenote` may need to be adjusted manually. Other features in SEP entries currently unsupported can be found (and reported) at [project's issues page](https://github.com/mondain-dev/ConvertSEP/issues).
XeLaTeX can then be used to compile the output:
```
xelatex comte.tex
xelatex comte.tex # second run to generate the TOC
```