summaryrefslogtreecommitdiff
path: root/src/phplatex.php
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2023-08-02 03:24:42 -0700
committerKai Stevenson <kai@kaistevenson.com>2023-08-02 03:24:42 -0700
commitc5ef1b6370d3229f52b292fa72c5b4700a77e32f (patch)
tree299e03f01a24a45a19a98b7e733d5e49e022342b /src/phplatex.php
parente2a5476389ef350aed3857ccd5a5cafc51acbbbf (diff)
fixed dpi scaling
Diffstat (limited to 'src/phplatex.php')
-rw-r--r--src/phplatex.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/phplatex.php b/src/phplatex.php
index 4d2c60b..2b9f490 100644
--- a/src/phplatex.php
+++ b/src/phplatex.php
@@ -82,7 +82,7 @@ function texify($string,$dpi='90',$fore="",$back="",$extraprelude="",$trans=FALS
# check if image for that TeX in the cache, return img HTML if it exists
if (file_exists($heredir.'/lateximages/'.$hashfn.'.'.$imgfmt))
- return '<img style="'.$verticalalign.'" title="'.$stralt.'" alt="'.$stralt.'" src="/lateximages/'.$hashfn.'.'.$imgfmt.'">';
+ return '<img class="lateximage" style="'.$verticalalign.'" title="'.$stralt.'" alt="'.$stralt.'" srcset="/lateximages/'.$hashfn.'.'.$imgfmt.' 2x">';
# otherwise try to make and store:
@@ -134,6 +134,6 @@ function texify($string,$dpi='90',$fore="",$back="",$extraprelude="",$trans=FALS
copy($tfn.'.'.$imgfmt, $heredir.'/lateximages/'.$hashfn.'.'.$imgfmt);
# Clean up temporary files, and return link to just-created image
- return phplatex_cleantmp($tfn,$heredir).'<img style="'.$verticalalign.'" title="'.$stralt.'" alt="LaTeX formula: '.$stralt.'" src="/lateximages/'.$hashfn.'.'.$imgfmt.'">';
+ return phplatex_cleantmp($tfn,$heredir).'<img class="lateximage" style="'.$verticalalign.'" title="'.$stralt.'" alt="LaTeX formula: '.$stralt.'" srcset="/lateximages/'.$hashfn.'.'.$imgfmt.' 2x">';
}
?>