8000 [DOC] LaTeX: fix preamble (closes #15026) by jfbu · Pull Request #15028 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

[DOC] LaTeX: fix preamble (closes #15026) #15028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 4, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update LaTeX build instructions
  • Loading branch information
jfbu committed Dec 4, 2019
commit aed6f9b38b8785c4b583fef13fb9f391d73b69d0
6 changes: 4 additions & 2 deletions doc/source/docs/howto_build_docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Building the NumPy API and reference docs
=========================================

We currently use Sphinx_ for generating the API and reference
documentation for NumPy. You will need Sphinx 1.8.3 <= 1.8.5.
documentation for NumPy. You will need Sphinx >= 2.0.0.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt bad about doing this only for latex PDF, but it seems testing (I don't know if that includes building docs, and possibly it does it only for html) goes via .circleci/config.yml which has sphinx==2.2.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were problems with sphinx 2.0.0, we should document what we use in the circle CI html run: 2.2.0


If you only want to get the documentation, note that pre-built
versions can be found at
Expand Down Expand Up @@ -57,7 +57,9 @@ To build the PDF documentation, do instead::
make latex
make -C build/latex all-pdf

You will need to have Latex installed for this.
You will need to have Latex installed for this, inclusive of support for
Greek letters. For example, on Ubuntu xenial ``texlive-lang-greek`` and
``cm-super`` are needed. Also ``latexmk`` is needed on non-Windows systems.
Copy link
Contributor Author
@jfbu jfbu Dec 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the texlive-lang-greek and cm-super dependencies could be avoided via this diff

diff --git a/numpy/doc/constants.py b/numpy/doc/constants.py
index 72793e44d..fc3ca4b2c 100644
--- a/numpy/doc/constants.py
+++ b/numpy/doc/constants.py
@@ -51,7 +51,7 @@ add_newdoc('numpy', 'e',
 
 add_newdoc('numpy', 'euler_gamma',
     """
-    ``γ = 0.5772156649015328606065120900824024310421...``
+    :math:`\\gamma` ``= 0.5772156649015328606065120900824024310421...``
 
     References
     ----------

and one must (else Sphinx 2.x mechanism for Greek is triggered and there will be error about missing lgrenc.def file if texlive-lang-greek is not installed) remove LGR from latex_elements['fontenc'] configuration in doc/source/conf.py.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should document what we need to do, so either use gamma and remove LGR or leave it as-is.


Instead of the above, you can also do::

Expand Down
0