Closed egstatsml closed 1 day ago
And the diagnostics info provided by org-latex-preview-check-health.el
Your LaTeX preview process
Precompile with latex → LaTeX Compile with pdflatex → Convert to SVG with dvisvgm
pdflatex
pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024/Arch Linux)
/usr/bin/pdflatex
dvisvgm
dvisvgm 3.4.1
/usr/bin/dvisvgm
LaTeX preview options
• Precompilation ON
• Equation renumbering ON
• Caching with org-persist ON
LaTeX preview sizing
• Page width 0.8 (display equation width in LaTeX)
• Scale 1.00 (PNG pixel density multiplier)
• Zoom 1.00 (display scaling factor)
LaTeX preview preamble
\documentclass{article}
[DEFAULT-PACKAGES]
[PACKAGES]
\usepackage{xcolor}
Diagnostic info (copied)
(:image-converters
(("convert" "WARNING: The convert command is deprecated in IMv7, use \"magick\" instead of \"convert\" or \"magick convert\"" "/usr/bin/convert")
("dvisvgm" "dvisvgm 3.4.1" "/usr/bin/dvisvgm")
("dvipng" "This is dvipng 1.17 Copyright 2002-2015, 2019 Jan-Ake Larsson" "/usr/bin/dvipng"))
:latex-processors
(("lualatex" "This is LuaHBTeX, Version 1.18.0 (TeX Live 2024/Arch Linux)" "/usr/bin/lualatex")
("xelatex" "XeTeX 3.141592653-2.6-0.999996 (TeX Live 2024/Arch Linux)" "/usr/bin/xelatex")
("pdflatex" "pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024/Arch Linux)" "/usr/bin/pdflatex"))
:interactive t :org-version "9.8-pre" :modified
((org-latex-preview-overlay-open-functions org-latex-preview-live--ensure-overlay t)
(org-latex-preview-appearance-options :foreground auto :background "Transparent" :scale 1.0 :zoom 1.0 :page-width 0.8 :matchers
("begin" "$1" "$" "$$" "\\(" "\\["))
(org-persist-after-read-hook org-element--cache-persist-after-read)
(org-persist-before-read-hook org-element--cache-persist-before-read)
(org-latex-format-drawer-function .
#[514 "\207"
[]
3 "\n\n(fn _ CONTENTS)"])
(org-latex-format-headline-function . org-latex-format-headline-default-function)
(org-latex-preview-live-debounce . 0.25)
(org-latex-preview-process-alist
(dvipng :programs
("latex" "dvipng")
:description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type "png" :latex-compiler
("%l -interaction nonstopmode -output-directory %o %f")
:latex-precompiler
("%l -output-directory %o -ini -jobname=%b \"&%L\" mylatexformat.ltx %f")
:image-converter
("dvipng --follow -D %D -T tight --depth --height -o %B-%%09d.png %f")
:transparent-image-converter
("dvipng --follow -D %D -T tight -bg Transparent --depth --height -o %B-%%09d.png %f"))
(dvisvgm :programs
("latex" "dvisvgm")
:description "dvi > svg" :message "you need to install the programs: latex and dvisvgm." :image-input-type "dvi" :image-output-type "svg" :latex-compiler
("%l -interaction nonstopmode -output-directory %o %f")
:latex-precompiler
("%l -output-directory %o -ini -jobname=%b \"&%L\" mylatexformat.ltx %f")
:image-converter
("dvisvgm --page=1- --optimize --clipjoin --relative --no-fonts -v3 --message='processing page {?pageno}: output written to {?svgfile}' --bbox=preview -o %B-%%9p.svg %f"))
(imagemagick :programs
("pdflatex" "convert")
:description "pdf > png" :message "you need to install the programs: latex and imagemagick." :image-input-type "pdf" :image-output-type "png" :latex-compiler
("pdflatex -interaction nonstopmode -output-directory %o %f")
:latex-precompiler
("pdftex -output-directory %o -ini -jobname=%b \"&pdflatex\" mylatexformat.ltx %f")
:image-converter
("convert -density %D -trim -antialias %f -quality 100 %B-%%09d.png")))
(org-latex-preview-auto-ignored-commands next-line previous-line mwheel-scroll scroll-up-command scroll-down-command)
(org-latex-preview-overlay-update-functions org-latex-preview-live--update-overlay t)
(org-latex-format-inlinetask-function . org-latex-format-inlinetask-default-function)
(org-persist-before-write-hook org-element--cache-persist-before-write)
(org-latex-preview-overlay-close-functions org-latex-preview-live--clearout t)
(org-latex-preview-process-finish-functions org-latex-preview-live--record-hook t)
(org-latex-preview-live . t)))
Add amsmath
to org-latex-packages-alist
if you don't have it. See its documentation to figure out how to add it.
That fixed it, sorry I thought I checked this properly but only noticed that amsmath is only included with the default packages for lualatex or xetex. Added it and its fixed. Thanks for your help and for your work developing this feature, it is a huge improvement!
Fraction environments not always working within an align environment.
Can show with an example,
produces,
This is on a clean install on emacs 29.4 and commit 684b01e6a29fd8eb31d721245774c3a127a03d15 from the dev branch of the org-preview-latex repo
Config is,