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

Commit

Permalink
32650: using features instead of have_program in misc/latex.py
Browse files Browse the repository at this point in the history
  • Loading branch information
seblabbe committed Nov 2, 2021
1 parent 385569e commit f3291d8
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/sage/misc/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def have_latex() -> bool:
sage: have_latex() # random
True
"""
from sage.misc.sage_ostools import have_program
return have_program('latex')
from sage.features.latex import latex
return latex().is_present()


@cached_function
Expand All @@ -98,8 +98,8 @@ def have_pdflatex() -> bool:
sage: have_pdflatex() # random
True
"""
from sage.misc.sage_ostools import have_program
return have_program('pdflatex')
from sage.features.latex import pdflatex
return pdflatex().is_present()


@cached_function
Expand All @@ -116,8 +116,8 @@ def have_xelatex() -> bool:
sage: have_xelatex() # random
True
"""
from sage.misc.sage_ostools import have_program
return have_program('xelatex')
from sage.features.latex import xelatex
return xelatex().is_present()


@cached_function
Expand All @@ -134,9 +134,8 @@ def have_dvipng() -> bool:
sage: have_dvipng() # random
True
"""
from sage.misc.sage_ostools import have_program
return have_program('dvipng')

from sage.features.dvipng import dvipng
return dvipng().is_present()

@cached_function
def have_convert() -> bool:
Expand All @@ -153,8 +152,8 @@ def have_convert() -> bool:
sage: have_convert() # random
True
"""
from sage.misc.sage_ostools import have_program
return have_program('convert')
from sage.features.imagemagick import ImageMagick
return ImageMagick().is_present()


def list_function(x):
Expand Down

0 comments on commit f3291d8

Please sign in to comment.