Skip to content
Merged
Changes from all commits
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
8 changes: 4 additions & 4 deletions ctaplot/plots/style.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import matplotlib as mpl
from distutils.spawn import find_executable
from shutil import which
from contextlib import contextmanager
import logging
from ..io.dataset import get
Expand All @@ -15,11 +15,11 @@ def check_latex():
-------
bool: True if a LaTeX distribution with required packages could be found
"""
if not find_executable('latex'):
if not which('latex'):
return False

# Check if dvipng is available (needed for matplotlib LaTeX rendering)
if not find_executable('dvipng'):
if not which('dvipng'):
logger.warning("LaTeX found but dvipng is missing. Install dvipng for full LaTeX support.")
return False

Expand Down
Loading