;;; ox-svg4css.el --- HTML Derived Backend -*- lexical-binding: t; -*- ;; Copyright (C) 2023 Free Software Foundation, Inc. ;; Author: Gerard Vermeulen ;; Maintainer: Gerard Vermeulen ;; Keywords: org, hypermedia ;; See the Emacs ox-html library for its authors, maintainer and FSF ;; Copyright, since ox-svg4css contains a lot of code from ox-html. ;; This file is NOT part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; This library implements an HTML derived backend for Org export. ;; It tries to address limitations of SVG images and CSS in HTML pages. ;; For each SVG image during HTML export: ;; 1. It checks `svg-as-object' and "image in-lining" whether to ;; embed the SVG image in an tag. ;; 2. If not, it checks `svg-inclusion' and "image in-lining" ;; whether to copy the SVG contents to the HTML output. ;; 3. If not, it falls back to checking "image in-lining" whether to ;; embed the SVG image in an tag (as any other image type). ;; 4. It is possible to set `svg-as-object' and/or `svg-inclusion': ;; - For each SVG link by means of "#+ATTR_HTML: :svg-as-object t" ;; or "#+ATTR_HTML: :svg-inclusion t". ;; - Within file scope by means of "#+OPTIONS: svg-as-object:t" or ;; "#+OPTIONS: svg-inclusion:t". ;; - Within toplevel scope by means of the options ;; `org-html-svg-as-object' or `org-html-svg-inclusion'. ;; ;; Caveats: the HTML output does not comply with W3C recommendations ;; after `svg-as-object' and/or `svg-inclusion' exports and it does not ;; comply with the Org Manual section "13.9.9 Images in HTML export" ;; after `svg-inclusion' exports. ;; ;; See: https://list.orgmode.org/c1eef10be815748d2103cb81bce08708@posteo.net/ ;; where Cristian Moe has proposed to embed SVG images in tags. ;; Ihor Radchenko and Max Nikulin have insisted on the use of special ;; "#+ATTR_HTML:" attributes to control the export options. ;; ;; I prefer enabling `:svg-as-object' over enabling `:svg-inclusion'. ;; ;; Relevant W3C documentation: ;; ;; Loading an SVG image by an HTML ,