Usage
=====
-There is an example project in the ``examples`` directory that shows
-you how to use the macros; the rest of this section is focused on
-getting them usable.
+There is an example project in the ``examples/article`` directory that
+shows you how to use the macros; the rest of this section is focused
+on getting them usable.
Vanilla
-------
<https://michael.orlitzky.com/articles/makeing_latex.xhtml>`_ article.
It is not meant to be invoked directly; instead, you should create
your own ``GNUmakefile`` (in your own project) based on the one in
-``examples/GNUmakefile``. This does several things:
+``examples/article/GNUmakefile``. This does several things:
#. Adds this repository to the TeX path.
#. Declares a few relevant variables.
#
# * BIBS - BibTeX bibliography
# * INDICES - the index, typically singular and named $(PN)
-# * SAGE_LISTING_SRCS - testable sage code listings
+# * SAGE_LISTINGS - testable sage code listings
# * MJOTEX - macro source files from mjotex
#
# The repository has to be added to the TeX path, if this is not done
# in ~/.bashrc or some equivalent place.
-export TEXINPUTS := $(TEXINPUTS):../
-export BSTINPUTS := $(BSTINPUTS):../
+export TEXINPUTS := $(TEXINPUTS):../..
+export BSTINPUTS := $(BSTINPUTS):../..
# The name of the document. Defaults to name of the parent directory
-# which in this case is also "examples", but is usually required.
-PN = examples
+# (which in this case is also "article"), but is usually required.
+PN = article
# Specify the remaining variables only if you use them.
BIBS = local-references.bib
However, the smart way to display a SageMath listing is to load it
from an external file (under the ``listings'' subdirectory):
- \sagelisting{example}
+ \sagelisting{sage-listings/example}
Keeping the listings in separate files makes it easy for the build
system to test them.