> Now, ox-latex.

ox-html

>> (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)

I don't follow.

It's following the default value of org-preview-latex-image-directory,
which is "ltximg/".  So the behavior will be the same as before out of
the box.

If it follows org-latex-preview-cache, then there is no way to specify
:image-dir specifically for HTML exports separately from the LaTeX
preview storage directory.  IIRC this was a problem with the old system.

>> (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?

I don't remember.  I've removed the declare statement.

>>       (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.

There is no regression.  You can verify this by testing.

LaTeX images in HTML export are now handled in org-html-latex-image, not
org-html--format-image.  So the "if" branch of the :alt value above
never applies, only the "else" does.

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

Added.

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

If I use t the linter complains that the pcase pattern t is deprecated,
and that we should use _.  But we are checking explicitly for t.  No
code change.

> 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.

I don't understand how the caption is calculated, how it's related to
fuzzy link descriptions (since the caption is a number-as-string), or
why Timothy removed support for captions from org-html-latex-environment
in the first place.  So after forty minutes of staring at the code I'm
giving up for now.  Maybe Timothy can help.  Postponed.

Karthik

Reply via email to