* lisp/ox-html.el (org-html-standalone-image-p): Remove quote which
causes `org-html-standalone-image-p' to not check if
`org-html-standalone-image-predicate' is fbound and see if it's
initialized.
TINYCHANGE
* lisp/ox-html.el (org-html-style-default): `authinfo-mode' is defined
in Emacs 27. As such, in the CSS add an "Authinfo" lang label to
authinfo src blocks.
* lisp/ox-html.el (org-html-style-default): Improve appearance and
legibility on large screens buy centering and limiting the content
width to the upper end of advised line width, ~140 characters.
* lisp/ox-html.el (org-html-template): Added the support for a CSS
class name to the content tag which wraps the entire content. The CSS
class name can be set via in buffer HTML_CONTENT_CLASS property or
:html-content-class for org publish.
TINYCHANGE
* lisp/ox-html.el (org-html--format-image, org-html--svg-image): Remove
special treatment of SVGs with <object>, and just use <img>. This used
to be poorly supported, but since Firefox 4 / Chrome 28 / Safari 9 this
is no longer a concern (https://caniuse.com/svg-img) and the last
browser release that didn't support SVG images was in 2010 (SVG data
URIs took until 2015 to be fully supported, but this is a lesser
concern).
* lisp/ox-html.el (org-html-format-drawer-function): Drop leftover
text from when an example used to be included.
adcebf38f (Fix errors reported by cus-test.el, 2013-11-14) dropped the
example but left the leading part.
Reported-by: Jean-Baptiste Mazon <jmazon@gmail.com>
Ref: https://orgmode.org/list/0e5569e6-15a7-d4c4-0558-8b0ef96a515c@gmail.com
* lisp/ox-html.el (org-html-inline-image-rules): Add webp as an inline
image format
Webp is an image format introduced in 2010, which now has widespread
support in browsers. ox-html can inline webp images identically to how
it does already for other image formats.
[km: updated package-version keyword and added NEWS entry]
Signed-off-by: Jay Kamat <jaygkamat@gmail.com>
* lisp/ox-html.el (org-html-meta-tags): Introduce this as a new option
which can be modified to set the meta tags added in HTML exports.
(org-html--build-meta-info): Make use of `org-html-meta-tags' instead of
hardcoded meta tags. This is leveraging the earlier restructuring of
`org-html--build-meta-info' into a much DRYer form, such that this
modification has a negligible impact on complexity and readability.
* lisp/ox-html.el (org-html--build-meta-info): Multi-line repeated
structure extracted to new function `org-html--build-meta-entry'.
The keyword value formatting is changed from `org-export-data' to
`org-html-encode-plain-text' to avoid potentially nesting HTML tags in
meta tags and the <title> element, which would violate W3C.
* lisp/ox-html.el (org-html-style-default): Add the margin-top
property to pre.src:hover:before so that the programming language is
fully visible.
TINYCHANGE
* lisp/ox-odt.el (org-odt--translate-latex-fragments):
* lisp/ox-html.el (org-html--format-image): Use
`org-preview-latex-image-directory' instead of hardcoding the
directory name.
See <https://orgmode.org/list/87a70v9jan.fsf@ucl.ac.uk>
Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
* lisp/ox-html.el (html): Remove `footnote-definition' translator
since 1) it does not exist and 2) footnote definitions are translated
as part of of the inner template.
When the type of src block involve an read-only buffer (ex:
compilation mode) avoid to setup the temp buffer as read-only and
error when processing it.
* lisp/ox-html.el (org-html-fontify-code): Set `inhibit-read-only' to
avoid read-only temp buffer.
* lisp/ox-html.el (org-html-infojs-template): Update :package-version
for recent default value change, and drop :version in favor of mapping
via customize-package-emacs-version-alist.
* lisp/ox-html.el (org-html-scripts):
(org-html-infojs-template): & escaped as &
This fixes xhtml validation while still being recognized by LibreJS as
valid license.
Reported-by: Colin Baxter <m43cap@yandex.com>
<87eett7bql.fsf@yandex.com>
TINYCHANGE
* lisp/org.el (org-latex-to-html-convert-command): New option to
convert a LaTeX fragment directly into HTML.
(org-format-latex): Use the new option.
(org-format-latex-as-html): Do the conversion and return HTML.
* lisp/ox-html.el (org-html-with-latex): Document the 'html symbol.
(org-html-format-latex): This custom HTML conversion, like MathJax,
doesn't require preprocessing.
(org-html-latex-fragment): Use the new option.
This allows you to set a custom command
`org-latex-to-html-convert-command' that will take as input a LaTeX
fragment and use it to generate HTML for export. This is very
open-ended in the sense that you can use any shell-command you
want. This has been added in order to use latexml, but you could
use any other tool that generates HTML output text.
* lisp/ox-html.el (org-html-headline): When CUSTOM_ID is set, use it
to set the outline-container-* <div> id.
TINYCHANGE
When exporting HTML the exporter generate ids for references.
Unfortunately those id are not stable in the sense that exporting
twice generate two different set of ids.
Using CUSTOM_ID one could already use have fixed anchors in the
generated HTML. So for example we could share URL with
...index.html#my-section-id and it will be the same URL even if we
export the HTML again.
Unfortunately, this CUSTOM_ID is not used for the outline ids. And
thus if we expose the html in a git repository for example. Each
export will generate a big diff that "pollute" the diff because it
will show changes for all org items while most of them could still be
unchanged.
With this PR, HTML export will use CUSTOM_ID for both the headers id
and the org outline ids. For Items without CUSTOM_ID the behavior will
stay identical as before.