Karthik Chikmagalur <[email protected]> writes:

> I'm working on org-latex-preview actively this week, so even incremental
> feedback will be helpful as I can get started on it.

Now, ox-latex.

> (defcustom org-html-latex-image-options
>   '(:foreground "Black" :background "Transparent"
>     :page-width 1.0 :scale 1.0 :image-dir "ltximg" :inline nil)

You hard-code "ltximg". I think it should follow
org-preview-latex-image-directory, except when it is set to
persist. (See also my other email commenting on incompatibility of the
obsolete alias)

> (defun org-html-close-tag (tag attr info)
>   "Return close-tag for string TAG.
> ATTR specifies additional attributes.  INFO is a property list
> containing current export state."
>   (declare (indent 1))

Why declare indent?

>       (list :src source
> -           :alt (if (string-match-p
> -                     (concat "^" org-preview-latex-image-directory) source)
> -                    (org-html-encode-plain-text
> -                     (org-find-text-property-in-string 'org-latex-src 
> source))
> -                  (file-name-nondirectory source)))
> +           :alt (file-name-nondirectory source))

This is a regression.
Previously, we appropriately added :alt as underlying LaTeX code. The
new version puts uninformative file name.

> (defun org-html--as-latex (element info &optional content)

Docstring missing.

>      ((or 't 'mathjax)
't -> t

org-html--latex-environment-numbered-p and
org-html--unlabel-latex-environment are no longer used by anything.

> -  (format "\n<div%s class=\"equation-container\">\n%s%s\n</div>"
> +  (format "\n<div%s class=\"equation-container\">\n%s\n</div>"
>            ;; ID.
>            (if (org-string-nw-p label) (format " id=\"%s\"" label) "")
>            ;; Contents.
> -          (format "<span class=\"equation\">\n%s\n</span>" contents)
> -          ;; Caption.
> -          (if (not (org-string-nw-p caption)) ""
> -            (format "\n<span class=\"equation-label\">\n%s\n</span>"
> -                    caption))))
> +          (format "<span class=\"equation\">\n%s\n</span>" contents)))

equation-label is no longer assigned after the patch. This may break CSS
setups.

> @@ -3156,59 +3219,137 @@ (defun org-html-latex-environment (latex-environment 
> _contents info)

The new setup no longer uses org-html--math-environment-p, so fuzzy
link descriptions for links pointing to latex fragments may no longer be
accurate.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to