emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "K. Chousos" <K.Chousos@protonmail.com>
To: Timothy <orgmode@tec.tecosaur.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Pre-PATCH] Overhaul of the LaTeX preview system
Date: Wed, 03 May 2023 10:07:02 +0000	[thread overview]
Message-ID: <OSv4Buru2tzNDP85h3Biydq9jmlQkeF0-V-zoZsPyFRuIvEppwrYQxRrGyg8PODsSPdJ7WauM3rY-n3xNrXVlDHTDB9K7G2YJ7NtGLhkeLI=@protonmail.com> (raw)
In-Reply-To: <87lek2up0w.fsf@tec.tecosaur.net>

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]


Hello Timothy.

First of all, thank you for your contribution. I use your fork for some days
now and I can verify that it is working correctly. I have only faced the following problems:

1. When a snippet contains a mistake, it correctly turns red, but no error message
   is shown when I hover my mouse over it. I have to switch to the *Org Preview LaTeX Output*
   to see the error.

2. Live previews do not work (like shown here https://tinyurl.com/5fu7z27w), although
   I am using the related options and use your branch up to the ---PATCH SET DIVIDER--- commit.

3. When using your version, the ox-hugo exporter no longer works when latex is involved.
   The error that appears is the following:
   org-html-format-latex: Invalid function: org-export-with-buffer-copy

4. Some key-binds (like C-c C-e to publish or C-c C-x C-l for latex-preview) do not work
   when the cursor is at the top of the file, before the first header.

In the attachments there are the diagnostics from the org-latex-preview-check-health
function and my relevant configuration.

Again, thank you for this amazing overhaul and I hope it won't be long till
we see it merged in the official Org branch.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: conf.el --]
[-- Type: text/x-emacs-lisp; name=conf.el, Size: 859 bytes --]

(setq org-latex-compiler "lualatex"
      org-latex-preview-auto-generate 'live
      org-latex-preview-persist nil
      org-latex-preview-processing-indicator 'fringe
      org-latex-preview-numbered t
      org-latex-preview-width 0.75
      org-latex-preview-use-precompilation nil
      ;; org-latex-preview-live-display-type 'eldoc
      org-startup-with-latex-preview t
      org-latex-preview-auto-generate t)

(setq org-latex-preview-preamble
      "\\documentclass{article}
\\usepackage{amsmath}
\\usepackage{amssymb}
\\usepackage{amsfonts}
[DEFAULT-PACKAGES]
[PACKAGES]
\\usepackage{xcolor}")

;; \\usepackage{polyglossia}  
;; \\setmainlanguage{greek}   
;; \\setotherlanguage{english}

(plist-put org-format-latex-options :zoom 1.2) ; Calibrated based on the TeX font and org-buffer font.

(add-hook 'org-mode-hook #'org-latex-preview-auto-mode)

[-- Attachment #3: diagnostic-results --]
[-- Type: application/octet-stream, Size: 2841 bytes --]

Your LaTeX preview process

Precompile with dvilualatex → LaTeX Compile with lualatex → Convert to SVG with dvisvgm

lualatex
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)
/usr/bin/lualatex

Warning: Precompilation not available with "lualatex"!

dvisvgm
dvisvgm 3.0.1
/usr/bin/dvisvgm

LaTeX preview options
• Precompilation           ON
• Equation renumbering     ON
• Caching with org-persist OFF

LaTeX preview sizing
• Page width  0.75   (display equation width in LaTeX)
• Scale       1.50  (PNG pixel density multiplier)
• Zoom        1.20  (display scaling factor)

LaTeX preview preamble
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
[DEFAULT-PACKAGES]
[PACKAGES]
\usepackage{xcolor}

Diagnostic info (copied)

(:image-converters
 (("convert" "Version: ImageMagick 7.1.1-4 Q16-HDRI x86_64 20976 https://imagemagick.org" "/usr/bin/convert")
  ("dvisvgm" "dvisvgm 3.0.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.15.0 (TeX Live 2022)" "/usr/bin/lualatex")
  ("xelatex" "XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022)" "/usr/bin/xelatex")
  ("pdflatex" "pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)" "/usr/bin/pdflatex"))
 :interactive t :org-version "9.7-pre" :modified
 ((org-latex-preview-persist)
  (org-persist-after-read-hook org-element--cache-persist-after-read)
  (org-latex-preview-options :foreground auto :background "Transparent" :scale 1.5 :matchers
                             ("begin" "$1" "$" "$$" "\\(" "\\[")
                             :zoom 1.2)
  (org-latex-preview-preamble . "\\documentclass{article}\n\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{amsfonts}\n[DEFAULT-PACKAGES]\n[PACKAGES]\n\\usepackage{xcolor}")
  (org-latex-compiler . "lualatex")
  (org-latex-preview-width . 0.75)
  (org-latex-preview-numbered . t)
  (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-src-block-backend . minted)
  (org-latex-hyperref-template . "\\hypersetup{\npdfauthor={%a},\npdftitle={%t},\npdfkeywords={%k},\npdfsubject={%d},\npdfcreator={%c},\npdflang={%L},\ncolorlinks,\nlinkcolor=blue,\ncitecolor=red,\nurlcolor=blue}")
  (org-latex-format-inlinetask-function . org-latex-format-inlinetask-default-function)
  (org-persist-before-write-hook org-element--cache-persist-before-write)
  (org-latex-pdf-process "latexmk -output-directory=%o %f")
  (org-latex-preview-use-precompilation)))

  parent reply	other threads:[~2023-05-03 10:08 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12 12:23 [Pre-PATCH] Overhaul of the LaTeX preview system Timothy
2023-03-13 12:26 ` Ihor Radchenko
2023-03-14 16:04   ` Timothy
2023-03-15  9:34     ` Ihor Radchenko
2023-03-15 17:28       ` Rudolf Adamkovič
2023-03-13 12:30 ` Ihor Radchenko
2023-03-13 12:32   ` Ihor Radchenko
2023-03-14 14:46     ` Timothy
2023-03-13 12:36 ` Ihor Radchenko
2023-03-14 16:10   ` Timothy
2023-03-15  9:38     ` Ihor Radchenko
2023-03-13 12:37 ` Ihor Radchenko
2023-03-14 16:13   ` Timothy
2023-03-25 15:29 ` Tony Zorman
2023-05-02 12:15 ` K. Chousos
2023-05-03 10:07 ` K. Chousos [this message]
2023-05-05 17:57   ` Karthik Chikmagalur
2023-05-05 18:48     ` Konstantinos Chousos
2023-05-05 18:53     ` Konstantinos Chousos
2023-05-05 20:05       ` Karthik Chikmagalur
2023-05-05 21:06         ` Konstantinos Chousos
2023-05-05 22:58           ` Karthik Chikmagalur
2023-05-06  9:19             ` Konstantinos Chousos
2023-05-06  9:30               ` Ihor Radchenko
2023-05-06 10:08               ` Konstantinos Chousos
2023-05-08 20:04               ` Karthik Chikmagalur
2023-05-08 20:40                 ` Konstantinos Chousos
2023-05-09 11:34                 ` Ihor Radchenko
2023-05-09 12:03                   ` Timothy
2023-05-09 12:10                     ` Ruijie Yu via General discussions about Org-mode.
2023-05-09 12:12                     ` Ihor Radchenko
2023-05-09 12:10                       ` Timothy
2023-05-09 12:49                   ` Max Nikulin
2023-05-09 12:57                     ` Ihor Radchenko
2023-05-10 10:07 ` Jun Inoue
2023-05-10 10:21   ` Timothy
2023-05-10 13:09     ` Jun Inoue
2023-05-26  9:50 ` Rudolf Adamkovič
2023-05-28 17:31   ` Timothy
2023-06-03  9:00     ` Rudolf Adamkovič
2023-08-21  8:59 ` Visuwesh
2023-08-21 16:40   ` Karthik Chikmagalur
2023-08-21 17:19     ` Visuwesh
2023-08-21 21:40       ` Karthik Chikmagalur
2023-08-22  2:57         ` Visuwesh
2024-05-30  8:28         ` Visuwesh
2024-10-15 18:44           ` Ihor Radchenko
2024-10-16  5:58             ` Visuwesh
2023-08-29  6:01 ` Roshan Shariff
2023-08-29  6:01 ` [PATCH 1/1] Fix background color when line-wrapping latex previews Roshan Shariff
2023-08-29 17:14   ` [PATCH v2] Fix background color of " Roshan Shariff
2024-01-07  7:25     ` Timothy
2024-01-07  9:50       ` Roshan Shariff
2024-01-08 10:24         ` Timothy
2024-01-09 20:12           ` Roshan Shariff
2024-01-07  7:28 ` [Pre-PATCH] Overhaul of the LaTeX preview system Timothy
2024-01-20  5:53 ` Matt Huszagh
2024-01-20  6:02 ` Matt Huszagh
2024-01-20  7:13   ` Matt Huszagh
2024-01-21 17:08     ` Timothy
2024-04-22 11:08 ` Feedback on the new "feature" system in org-export (was: [Pre-PATCH] Overhaul of the LaTeX preview system) Ihor Radchenko
2024-07-21 12:41 ` [Pre-PATCH] Overhaul of the LaTeX preview system Jun Inoue
  -- strict thread matches above, loose matches on Subject: below --
2023-06-04 23:29 Rudolf Adamkovič
2023-06-05  5:27 ` Pedro Andres Aranda Gutierrez
2023-08-07  8:12 WANG Yicheng
2023-08-08  8:30 ` Ihor Radchenko
2024-04-11 19:26 Yaroslav Drachov
2024-04-18 20:04 ` Karthik Chikmagalur
2024-04-18 20:13   ` Yaroslav Drachov
2024-06-23 10:53     ` Ihor Radchenko
2024-06-23 11:00       ` Yaroslav Drachov
2024-06-26 19:05         ` Karthik Chikmagalur
2024-07-02 10:38           ` Yaroslav Drachov
2024-09-03 14:30             ` Ihor Radchenko
2024-09-03 15:50               ` Karthik Chikmagalur
2024-09-03 23:04                 ` Jun Inoue
2024-09-04  0:18                   ` Karthik Chikmagalur
2024-09-04  0:44                     ` Jun Inoue
2024-04-17 20:11 Корякин Артём
2024-04-18  3:11 ` Karthik Chikmagalur
2024-04-18 20:47   ` Корякин Артём
2024-04-18 15:14 ` Max Nikulin
     [not found]   ` <86edb2ft89.fsf@gmail.com>
2024-04-19  2:23     ` Max Nikulin
2024-04-19  6:53       ` Корякин Артём
2024-04-18 21:49 Корякин Артём

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='OSv4Buru2tzNDP85h3Biydq9jmlQkeF0-V-zoZsPyFRuIvEppwrYQxRrGyg8PODsSPdJ7WauM3rY-n3xNrXVlDHTDB9K7G2YJ7NtGLhkeLI=@protonmail.com' \
    --to=k.chousos@protonmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@tec.tecosaur.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).