io12 / org-fragtog

Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them
MIT License
397 stars 14 forks source link

Latex Preview problem #20

Closed hehao9504 closed 3 years ago

hehao9504 commented 3 years ago

I am not sure the problem is introduced by fragtog or my configuration. Please help to check, Thank you~ When I type $\to$, it seems include some extra configuration detail

Screenshot 2021-02-25 下午9 18 09

While I type $A \to \lambda$, it is OK

Screenshot 2021-02-25 下午9 40 10
io12 commented 3 years ago

I don't think this is an issue with org-fragtog, because it just uses org-mode's built-in fragment functionality. Anyway, when I try your example, it works okay for me. Out of curiosity, what values do you have for org-preview-latex-default-process and org-preview-latex-process-alist?

hehao9504 commented 3 years ago

here is my code

(setq org-preview-latex-default-process 'dvisvgm)
(setq org-preview-latex-process-alist
       '((dvipng :programs
         ("lualatex" "dvipng")
         :description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type "png" :image-size-adjust
         (1.0 . 1.0)
         :latex-compiler
         ("lualatex -output-format dvi -interaction nonstopmode -output-directory %o %f")
         :image-converter
         ("dvipng -fg %F -bg %B -D %D -T tight -o %O %f"))
       (dvisvgm :programs
          ("latex" "dvisvgm")
          :description "dvi > svg" :message "you need to install the programs: latex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust
          (1.7 . 1.5)
          :latex-compiler
          ("xelatex -no-pdf -interaction nonstopmode -output-directory %o %f")
          :image-converter
          ("dvisvgm %f -n -b min -c %S -o %O"))
       (imagemagick :programs
              ("latex" "convert")
              :description "pdf > png" :message "you need to install the programs: latex and imagemagick." :use-xcolor t :image-input-type "pdf" :image-output-type "png" :image-size-adjust
              (1.0 . 1.0)
              :latex-compiler
              ("xelatex -no-pdf -interaction nonstopmode -output-directory %o %f")
              :image-converter
              ("convert -density %D -trim -antialias %f -quality 100 %O"))))
hehao9504 commented 3 years ago

It seems this issue is related with my configuration. I clean my configuration and reinstall doom, now it is OK. Thank you for your reply. BTW: org-fragtog is so amazing. I can enjoy latex typing and elegant preview in my org file again. :)