From 46b4ed506d5762afeb68dc989aa60bf3fc9c969f Mon Sep 17 00:00:00 2001 From: Joseph Weston <joseph.weston08@gmail.com> Date: Wed, 30 Aug 2017 16:01:56 +0200 Subject: [PATCH] doc: fix PDF documentation builds Add the 'unicode-math' package and set the latex engine to 'xelatex'. Closes #126. --- doc/source/conf.py | 4 ++++ doc/source/tutorial/discretize.rst | 2 +- doc/source/tutorial/operators.rst | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 1af1f28a..d2688e87 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -199,6 +199,8 @@ r"""\makeatletter \newcommand{\braket}[2]{\left\langle#1|#2\right\rangle} \newcommand{\ri}{\text{i}} \newcommand{\rd}{\text{d}} + +\usepackage{unicode-math} """} # Grouping the document tree into LaTeX files. List of tuples @@ -210,6 +212,8 @@ latex_documents = [ 'manual'), ] +latex_engine = 'xelatex' + # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None diff --git a/doc/source/tutorial/discretize.rst b/doc/source/tutorial/discretize.rst index c4a5b6a8..dd8f6538 100644 --- a/doc/source/tutorial/discretize.rst +++ b/doc/source/tutorial/discretize.rst @@ -219,7 +219,7 @@ and its discretized approximation where :math:`t=\frac{\hbar^2}{2ma^2}`, are only valid in the limit -:math:`E \lt t`. The grid spacing :math:`a` must be chosen according +:math:`E < t`. The grid spacing :math:`a` must be chosen according to how high in energy you need your tight-binding model to be valid. It is possible to set :math:`a` through the ``grid_spacing`` parameter diff --git a/doc/source/tutorial/operators.rst b/doc/source/tutorial/operators.rst index c4ae7545..99fef17f 100644 --- a/doc/source/tutorial/operators.rst +++ b/doc/source/tutorial/operators.rst @@ -34,12 +34,12 @@ that, on site :math:`i`, points in the direction of the unit vector We shall take the following form for :math:`\mathbf{m}_i`: .. math:: - \mathbf{m}_i &=&\ \left( + \mathbf{m}_i &=\ \left( \frac{x_i}{x_i^2 + y_i^2} \sin θ_i,\ \frac{y_i}{x_i^2 + y_i^2} \sin θ_i,\ \cos θ_i \right)^T, \\ - θ_i &=&\ \frac{π}{2} (\tanh \frac{r_i - r_0}{δ} - 1), + θ_i &=\ \frac{π}{2} (\tanh \frac{r_i - r_0}{δ} - 1), where :math:`x_i` and :math:`y_i` are the :math:`x` and :math:`y` coordinates of site :math:`i`, and :math:`r_i = \sqrt{x_i^2 + y_i^2}`. -- GitLab