To generate tufte-book style document for SEP entries.
- XeLaTeX, which can be found in standard TeX distributions such as TeX Live or MiKTeX;
- pandoc, and its python wrapper pypandoc;
- Inkscape, if
.svg
images are used in the entry; - Latin Modern (LM) Family of Fonts, 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.
python ConvertSEPHTML.py <URL to the entry> [<output.tex>]
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[<offset>]{note texts}
that wraps tufte
's \sidenote
, the <offset>
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.
XeLaTeX can then be used to compile the output:
xelatex comte.tex
xelatex comte.tex # second run to generate the TOC