* lisp/ox-html.el (org-html-head):
(org-html-head-extra): Allow value to be a function.
(org-html-normalize-string-or-function): New helper function.
(org-html--build-head): Use the new helper to handle the function
value of :html-head and :html-head-extra export options.
* etc/ORG-NEWS:
(~org-html-head~ and ~org-html-head-extra~ can now be specified as
functions): Document the new feature.
* testing/lisp/test-ox-html.el (ox-html/test-normalize-string-or-function):
New test.
TINYCHANGE
This reverts commit 302bc6393a.
It turns out that <object ...> tags with data pointing outside the
website are not rendered by the modern
qtwebengine (linked svgs in https://orgmode.org/tools.html are not
rendered). Even though Firefox does render the same page, it no longer
appears safe to use <object ...> for svg. So, we have to use <img...>
with its limitations.
* lisp/org.el (org-read-date-analyze):
* lisp/ox-html.el (org-html-latex-fragment):
Add several "duplicate value in `cond`" FIXMEs.
Found by Mattias Engdegård <mattias.engdegard@gmail.com>.
Ref: https://debbugs.gnu.org/51368#51
; Add several "duplicate value in `cond`" FIXMEs
6b2219cd2744c711580cc7226554e69c8cec8247
Stefan Kangas
Sun Oct 1 19:00:26 2023 +0200
* lisp/ox-html.el (org-html--svg-image): When svg image has :alt
attribute, convert it to :aria-label instead.
(org-html--format-image): Pass default :alt attribute based on the
file name to `org-html--svg-image'.
Emacs 22 support is long-dropped. We no longer need to be backwards
compatible with it. Also, Org mode no longer works with Emacs 22, so
there is no point keeping this code.
* lisp/ox-html.el (org-html-footnote-reference): When multiple
footnote references point to a single footnote, make sure that the
reference ids are not duplicated. Now, the ids for non-first
reference are constructed as fn.<footnote id>.<footnote reference
number>. The reference number of counted across all the footnote
references referencing the same footnote.
Reported-by: Protesilaos Stavrou <info@protesilaos.com>
Link: https://orgmode.org/list/87cyqcv9q1.fsf@protesilaos.com
* lisp/ox-html.el (org-html-footnote-section):
* lisp/ox-html.el (org-html-footnote-reference): When footnote has a
non-number name, build link anchors using this name.
* etc/ORG-NEWS (=ox-html=: When exporting footnotes with custom
non-number names, the names are used as link anchors): Announce the
change.
Link: https://orgmode.org/list/875xwngiwx.fsf@protesilaos.com
Co-authored-by: Protesilaos Stavrou <info@protesilaos.com>
* lisp/ox-html.el (org-html-toc): When multiple TOCs are generated
inside the exported document, make sure that they do not have
duplicate IDs.
Reported-by: Michel Damiens <michel.damiens@gmail.com>
Link: https://orgmode.org/list/87sfj6av4t.fsf@localhost
* lisp/ox-html.el (org-html-htmlize-generate-css): Fix not adding
faces without :inherit property to the generated css. Update the
docstring, detailing that the css class names are the face names with
`org-html-htmlize-font-prefix' prepended.
* lisp/ox-html.el (org-html-inline-image-rules): Add AVIF image
support for inline images on HTML export.
AVIF is well supported by browsers these days and offers similar
features and much better compression than the other image formats
commonly used for the web.
TINYCHANGE
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link--inline-image):
* lisp/ox-texinfo.el (org-texinfo-link): Preserve link type during
export for all the links, not just for a hard-coded subset.
* etc/ORG-NEWS (Built-in HTML, LaTeX, Man, Markdown, ODT, and Texinfo
exporters preserve the link protocol during export): Document the
breaking change.
Link: https://list.orgmode.org/orgmode/878r9nofpw.fsf@localhost/
* lisp/ox-html.el (org-html-format-list-item): Document some function
arguments.
(org-html--latex-environment-numbered-p): Suppress checkdoc heuristics.
(org-html-image-link-filter): Add docstring.
(org-html-table--table.el-table):
(org-html-final-function): Document the function arguments.
* lisp/ox-html.el (org-html-mathjax-options): Use two spaces between
sentences and remove trailing newline in the docstring.
(org-html--container):
(org-html-xhtml-p):
(org-html-html5-p): Add docstring.
(org-html--anchor):
(org-html--todo):
(org-html-format-headline-default-function):
(org-html-format-inlinetask-default-function): Document all the
function arguments.
* lisp/ox-html.el (org-html-link): When publishing relative links with
both :html-link-use-abs-url and :html-link-home, ensure the correct
link is constructed. Never append `home' to absolute paths.
TINYCHANGE
lisp/ox-ascii.el: Create alias `org-export-region-to-ascii` for
`org-ascii-convert-region-to-ascii`.
lisp/ox-html.el: Create alias `org-export-region-to-html` for
`org-html-convert-region-to-html`.
lisp/ox-latex.el: Create alias `org-export-region-to-latex` for
`org-latex-convert-region-to-latex`.
lisp/ox-md.el: Create alias `org-export-region-to-md` for
`org-md-convert-region-to-md`.
lisp/ox-texinfo.el: Create alias `org-export-region-to-texinfo` for
`org-texinfo-convert-region-to-texinfo`.
doc/org-manual.org: Change commands from "*-convert-region-*" form to
the "org-export-region-to-*" aliases. Add function index for aliases.
* doc/org-manual.org (Exporting): Add cindex entry for both "backend"
and "back-end" for better searchability.
All other changes are trivial.
Note that `org-element-export-snippet-parser' will still use :back-end
property. So will ox.el in INFO channel.
* lisp/ox-html.el (org-html--id-attr-prefix):
* lisp/ox-odt.el (org-odt--id-attr-prefix): Refactor hardcoded "ID-"
as a new private variable.
* org/ox-html.el (org-html--reference): Add support for the ID
property (previously only supported CUSTOM_ID).
These changes make crossfile ID links work in the exported HTML when
`org-html-prefer-user-labels' is not-nil.
* lisp/ox-html.el (org-html-src-block): Do not treat src blocks
without LANG as example blocks. Instead, export them using "nil"
language. This way, such src blocks will get captions, unlike example
blocks.
The new behavior is consistent with ox-latex and ox-ascii.
Reported-by: Johan Bolmsjö <org-mode@johan.bitmaster.se>
Link: https://orgmode.org/list/87zgb90win.fsf@localhost
* lisp/ox-html.el (
org-html-mathjax-options,
org-html-mathjax-template,
org-html--build-mathjax-config
): Update from MathJax 2 to 3 while maintaining compatibility. All
legacy options should continue to work, except for the 'path' option
which must now point to MathJax 3 or later.
* testing/lisp/test-ox-html.el (
ox-html/mathjax-path-none,
ox-html/mathjax-path-default,
ox-html/mathjax-path-custom,
ox-html/mathjax-path-in-buffer,
ox-html/mathjax-options-default,
ox-html/mathjax-options-custom,
ox-html/mathjax-options-in-buffer,
ox-html/mathjax-legacy-scale-default,
ox-html/mathjax-legacy-scale-custom,
ox-html/mathjax-legacy-scale-in-buffer,
ox-html/mathjax-legacy-scale-message,
ox-html/mathjax-legacy-scale-message-in-buffer,
ox-html/mathjax-legacy-scale-ignore,
ox-html/mathjax-legacy-autonumber-ams,
ox-html/mathjax-legacy-autonumber-ams-in-buffer,
ox-html/mathjax-legacy-autonumber-none,
ox-html/mathjax-legacy-autonumber-none-in-buffer,
ox-html/mathjax-legacy-autonumber-all,
ox-html/mathjax-legacy-autonumber-all-in-buffer,
ox-html/mathjax-legacy-autonumber-message,
ox-html/mathjax-legacy-autonumber-message-in-buffer,
ox-html/mathjax-legacy-font-tex,
ox-html/mathjax-legacy-font-tex-in-buffer,
ox-html/mathjax-legacy-font-stix-web,
ox-html/mathjax-legacy-font-stix-web-in-buffer,
ox-html/mathjax-legacy-font-asana-math,
ox-html/mathjax-legacy-font-asana-math-in-buffer,
ox-html/mathjax-legacy-font-neo-euler,
ox-html/mathjax-legacy-font-neo-euler-in-buffer,
ox-html/mathjax-legacy-font-gyre-pagella,
ox-html/mathjax-legacy-font-gyre-pagella-in-buffer,
ox-html/mathjax-legacy-font-gyre-termes,
ox-html/mathjax-legacy-font-gyre-termes-in-buffer,
ox-html/mathjax-legacy-font-latin-modern,
ox-html/mathjax-legacy-font-latin-modern-in-buffer,
ox-html/mathjax-legacy-line-breaks-true,
ox-html/mathjax-legacy-line-breaks-true-in-buffer,
ox-html/mathjax-legacy-line-breaks-false,
ox-html/mathjax-legacy-line-breaks-false-in-buffer,
ox-html/mathjax-legacy-line-breaks-message,
ox-html/mathjax-legacy-line-breaks-message-in-buffer): Test MathJax in
general and also the conversion of legacy options from MathJax 2 to 3.
* testing/org-test.el (org-test-capture-messages): Add a new macro
useful for testing the messages put in the echo area.
* etc/ORG-NEWS: Document MathJax 2 to 3 upgrade, highlighting the
benefits of the new version but also mentioning the fact that the user
may need to update the `path' option in `org-html-mathjax-options'.
* doc/org-manual.org (Math formatting in HTML export): Update the link
to the MathJax CDN and the example of how to use `+HTML_MATHJAX' with
MathJax 3. Also, remove the note on MathJax extensions, as they did
not work (and do not work) as documented.
Link: https://list.orgmode.org/orgmode/m2a667n4ax.fsf@me.com/