Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/misc/latex.py: Conditionalize some doctests on latex_package…
Browse files Browse the repository at this point in the history
…_tkz_graph
  • Loading branch information
Matthias Koeppe committed Nov 24, 2021
1 parent 0dd76b6 commit 07b2512
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/sage/misc/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,10 +1544,10 @@ def add_package_to_preamble_if_available(self, package_name):
TESTS::
sage: latex.add_package_to_preamble_if_available("xypic")
sage: latex.add_package_to_preamble_if_available("tkz-graph")
sage: latex.add_package_to_preamble_if_available("nonexistent_package")
sage: latex.extra_preamble() # optional - latex
'\\usepackage{xypic}\n'
sage: latex.extra_preamble() # optional - latex latex_package_tkz_graph
'\\usepackage{tkz-graph}\n'
sage: latex.extra_preamble('')
"""
assert isinstance(package_name, str)
Expand Down Expand Up @@ -1852,11 +1852,11 @@ def view(objects, title='Sage', debug=False, sep='', tiny=False,
sage: from sage.misc.latex import _run_latex_, _latex_file_
sage: g = sage.misc.latex.latex_examples.graph()
sage: latex.add_to_preamble(r"\usepackage{tkz-graph}")
sage: latex.add_to_preamble(r"\usepackage{tkz-graph}") # optional - latex_package_tkz_graph
sage: file = os.path.join(SAGE_TMP, "temp.tex")
sage: with open(file, 'w') as O:
....: _ = O.write(_latex_file_(g))
sage: _run_latex_(file, engine="pdflatex") # optional - latex
sage: _run_latex_(file, engine="pdflatex") # optional - latex latex_package_tkz_graph
'pdf'
sage: view(4, margin=5, debug=True) # not tested
Expand Down

0 comments on commit 07b2512

Please sign in to comment.