Org: change LaTeX preamble snippet ordering +bit

Also add a bunch of explanatory text, and change the !feature special
treatment to use a normal keyword, :eager.
This commit is contained in:
TEC 2021-03-26 18:26:01 +08:00
parent bf823bc622
commit 456d9165eb
Signed by: tec
GPG Key ID: 779591AFDB81F06C
2 changed files with 159 additions and 128 deletions

View File

@ -7253,24 +7253,24 @@ digraph {
rankdir=LR
node[group=a,color="#2ec27e"]
"file:*.svg"
"file:*.jpeg"
"file:*.png"
"file:*.svg"
"#+caption"
"xkcd:*"
node[group=b,color="#f5c211"]
"image"
"svg"
"image"
"caption"
node[group=c,color="#813d9c"]
"(TeX) graphicx"
"(TeX) svg"
"(TeX) graphicx"
"(TeX) caption"
"file:*.svg" -> "svg" -> "(TeX) svg"
"file:*.jpeg" -> "image" -> "(TeX) graphicx"
"file:*.png" -> "image"
"file:*.svg" -> "svg" -> "(TeX) svg"
"(TeX) svg":e -> "(TeX) graphicx":s [constraint=false]
"(TeX) svg":s -> "(TeX) graphicx":n [constraint=false]
"#+caption" -> "caption" -> "(TeX) caption"
"xkcd:*" -> "image"
"xkcd:*" -> "caption"
@ -7282,6 +7282,10 @@ digraph {
#+attr_latex: :width 0.6\linewidth
[[file:misc/org-latex-clever-preamble.svg]]
First we will implement the feature detection component of this model. I'd like
this to be able to use as much state information as possible, so the feature
tests should be very versatile.
#+begin_src emacs-lisp
(defvar org-latex-embed-files t
"Embed the source .org, .tex, and any tangled files.")
@ -7332,32 +7336,58 @@ search in the buffer. Otherwise any non-nil return value will indicate the
existance of the feature.")
#+end_src
Then we provide a way to generate the preamble that provides those features.
In addition to the features named in ~org-latex-conditional-features~ we'll also
create /meta-features/, which can be required by other features (with =:requires=),
or be active by default (=:eager t=). For further control I some features may only
be used when certain other features are active (with =:when=), and masked by other
features (with =:prevents=). I will use the convention of starting meta-features
with =.=, and =:eager= features with =!= to make their nature more readily apparent.
Another consideration in LaTeX is load order, which matters in some cases.
Beyond that, it's nice to have some sort of sensible ordering. For this I'll
introduce an =:order= keyword. Using this I'll arrange snippets as follows.
+ =-2= Embed files setup
+ =-1= Extra file embedding
+ =0= Typography
- =0= Fonts themselves
- =0.1= Typographic tweaks (=microtype=)
- =0.2= Extra maths
- =0.4= Extra text shaping (~\acr~)
- =0.5-0.9= Miscellaneous text modifications, trying to put shorter snippets first
+ =1= (/default/)
+ =2= Tables and figures
+ =3= Miscellaneous short content
+ =4= Fancy boxes
#+begin_src emacs-lisp
(defvar org-latex-feature-implementations
'((image :snippet "\\usepackage{graphicx}")
(svg :snippet "\\usepackage{svg}")
(maths :snippet "\\usepackage[nofont]{bmc-maths}")
(table :snippet "\\usepackage{longtable}\n\\usepackage{booktabs}")
'((image :snippet "\\usepackage{graphicx}" :order 2)
(svg :snippet "\\usepackage{svg}" :order 2)
(maths :snippet "\\usepackage[nofont]{bmc-maths}" :order 0.2)
(table :snippet "\\usepackage{longtable}\n\\usepackage{booktabs}" :order 2)
(cleveref :snippet "\\usepackage{cleveref}" :order 1) ; after bmc-maths
(underline :snippet "\\usepackage[normalem]{ulem}")
(float-wrap :snippet "\\usepackage{wrapfig}")
(rotate :snippet "\\usepackage{rotating}")
(caption :snippet org-latex-caption-preamble)
(microtype :snippet "\\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=2000]{microtype}\n")
(underline :snippet "\\usepackage[normalem]{ulem}" :order 0.5)
(float-wrap :snippet "\\usepackage{wrapfig}" :order 2)
(rotate :snippet "\\usepackage{rotating}" :order 2)
(caption :snippet org-latex-caption-preamble :order 2.1)
(microtype :snippet "\\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=2000]{microtype}\n" :order 0.1)
(embed-files :snippet org-latex-embed-files-preamble :order -2)
(embed-tangled :requires embed-files :snippet (concat (org-latex-embed-tangled-files) "\n") :order -1)
(acronym :snippet "\\newcommand{\\acr}[1]{\\protect\\textls*[110]{\\scshape #1}}\n\\newcommand{\\acrs}{\\protect\\scalebox{.91}[.84]{\\hspace{0.15ex}s}}" :order 2)
(italic-quotes :snippet "\\renewcommand{\\quote}{\\list{}{\\rightmargin\\leftmargin}\\item\\relax\\em}\n")
(par-sep :snippet "\\setlength{\\parskip}{\\baselineskip}\n\\setlength{\\parindent}{0pt}\n")
(pifont :snippet "\\usepackage{pifont}")
(checkbox :requires pifont :snippet (concat (unless (memq 'maths features)
"\\usepackage{amssymb} % provides \\square")
org-latex-checkbox-preamble))
(fancy-box :requires pifont :snippet org-latex-box-preamble :order 3)
(box-warning :requires fancy-box :snippet "\\defsimplebox{warning}{e66100}{\\ding{68}}{Warning}" :order 4)
(box-info :requires fancy-box :snippet "\\defsimplebox{info}{3584e4}{\\ding{68}}{Information}" :order 4)
(box-success :requires fancy-box :snippet "\\defsimplebox{success}{26a269}{\\ding{68}}{\\vspace{-\\baselineskip}}" :order 4)
(box-error :requires fancy-box :snippet "\\defsimplebox{error}{c01c28}{\\ding{68}}{Important}" :order 4))
(acronym :snippet "\\newcommand{\\acr}[1]{\\protect\\textls*[110]{\\scshape #1}}\n\\newcommand{\\acrs}{\\protect\\scalebox{.91}[.84]{\\hspace{0.15ex}s}}" :order 0.4)
(italic-quotes :snippet "\\renewcommand{\\quote}{\\list{}{\\rightmargin\\leftmargin}\\item\\relax\\em}\n" :order 0.5)
(par-sep :snippet "\\setlength{\\parskip}{\\baselineskip}\n\\setlength{\\parindent}{0pt}\n" :order 0.5)
(.pifont :snippet "\\usepackage{pifont}")
(checkbox :requires .pifont :order 3
:snippet (concat (unless (memq 'maths features)
"\\usepackage{amssymb} % provides \\square")
org-latex-checkbox-preamble))
(.fancy-box :requires .pifont :snippet org-latex-box-preamble :order 3.9)
(box-warning :requires .fancy-box :snippet "\\defsimplebox{warning}{e66100}{\\ding{68}}{Warning}" :order 4)
(box-info :requires .fancy-box :snippet "\\defsimplebox{info}{3584e4}{\\ding{68}}{Information}" :order 4)
(box-success :requires .fancy-box :snippet "\\defsimplebox{success}{26a269}{\\ding{68}}{\\vspace{-\\baselineskip}}" :order 4)
(box-error :requires .fancy-box :snippet "\\defsimplebox{error}{c01c28}{\\ding{68}}{Important}" :order 4))
"LaTeX features and details required to implement them.
List where the car is the feature symbol, and the rest forms a plist with the
@ -7418,8 +7448,8 @@ to produce an /expanded/ list of features. We'll do that by performing the
following steps.
+ The dependencies for each listed feature are added to feature list
(=:requires=).
+ The =:when= conditions of each feature, and available features starting with =!=
are evaluated, and they are added/removed accordingly
+ The =:when= conditions of each feature, and available features with =:eager t=,
are evaluated, and added/removed accordingly
+ Any features present in a =:prevents= value are removed
+ The feature list is scrubbed of duplicates
+ The feature list is sorted by =:order= (ascending)
@ -7434,7 +7464,7 @@ following steps.
(setf features (append (if (listp requirements) requirements (list requirements)) features))))
(dolist (potential-feature
(append features (delq nil (mapcar (lambda (feat)
(when (= ?! (aref (symbol-name (car feat)) 0))
(when (plist-get (cdr feat) :eager)
(car feat)))
org-latex-feature-implementations))))
(when-let ((prerequisites (plist-get (cdr (assoc potential-feature org-latex-feature-implementations)) :when)))
@ -7448,8 +7478,8 @@ following steps.
(setf features (cl-set-difference features (if (listp prevents) prevents (list prevents))))))
(sort (delete-dups features)
(lambda (feat1 feat2)
(if (< (or (plist-get (cdr (assoc feat1 org-latex-feature-implementations)) :order) 0)
(or (plist-get (cdr (assoc feat2 org-latex-feature-implementations)) :order) 0))
(if (< (or (plist-get (cdr (assoc feat1 org-latex-feature-implementations)) :order) 1)
(or (plist-get (cdr (assoc feat2 org-latex-feature-implementations)) :order) 1))
t nil))))
#+end_src
@ -7578,8 +7608,8 @@ preamble generation.
#+begin_src emacs-lisp
(add-to-list 'org-latex-conditional-features '(org-latex-default-fontset . custom-font) t)
(add-to-list 'org-latex-feature-implementations '(custom-font :snippet (org-latex-fontset :serif :sans :mono)) t)
(add-to-list 'org-latex-feature-implementations '(!custom-maths-font :when (custom-font maths) :snippet (org-latex-fontset :maths)) t)
(add-to-list 'org-latex-feature-implementations '(custom-font :snippet (org-latex-fontset :serif :sans :mono) :order 0) t)
(add-to-list 'org-latex-feature-implementations '(.custom-maths-font :eager t :when (custom-font maths) :snippet (org-latex-fontset :maths) :order 0.1) t)
#+end_src
Finally, we just need to add some fonts.
@ -7617,7 +7647,7 @@ When we're using Alegreya we can apply a lovely little tweak to =tabular= which
#+begin_src emacs-lisp
(add-to-list 'org-latex-conditional-features '((string= (car (org-latex-fontset-entry)) "alegreya") . alegreya-typeface))
(add-to-list 'org-latex-feature-implementations '(alegreya-typeface) t)
(add-to-list 'org-latex-feature-implementations '(!alegreya-tabular-figures :when (alegreya-typeface table) :snippet "
(add-to-list 'org-latex-feature-implementations'(.alegreya-tabular-figures :eager t :when (alegreya-typeface table) :order 0.5 :snippet "
\\makeatletter
% tabular lining figures in tables
\\renewcommand{\\tabular}{\\AlegreyaTLF\\let\\@halignto\\@empty\\@tabular}
@ -7629,7 +7659,7 @@ can correct for this by redefining it with subtlety shifted kerning.
#+begin_src emacs-lisp
(add-to-list 'org-latex-conditional-features '("LaTeX" . latex-symbol))
(add-to-list 'org-latex-feature-implementations '(latex-symbol :when alegreya-typeface :snippet "
(add-to-list 'org-latex-feature-implementations '(latex-symbol :when alegreya-typeface :order 0.5 :snippet "
\\makeatletter
% Kerning around the A needs adjusting
\\DeclareRobustCommand{\\LaTeX}{L\\kern-.24em%
@ -7781,7 +7811,7 @@ Then we can just hook this in with our clever preamble.
")
(add-to-list 'org-latex-conditional-features '((and org-latex-condense-lists "^[ \t]*[-+]\\|^[ \t]*[1Aa][.)] ") . condensed-lists) t)
(add-to-list 'org-latex-feature-implementations '(condensed-lists :snippet org-latex-condensed-lists :order 2) t)
(add-to-list 'org-latex-feature-implementations '(condensed-lists :snippet org-latex-condensed-lists :order 0.7) t)
#+end_src
**** Pretty code blocks
@ -7828,9 +7858,9 @@ entry in ~org-latex-scr-block~ we can easily add this as a recognised
<<org-latex-engraved-code-preamble>>
")
(add-to-list 'org-latex-feature-implementations '(engraved-code-setup :snippet org-latex-engraved-code-preamble :order 98) t)
(add-to-list 'org-latex-feature-implementations '(engraved-code :requires engraved-code-setup :snippet (engrave-faces-latex-gen-preamble) :order 99) t)
(add-to-list 'org-latex-conditional-features '((and org-export-has-code-p "^[ \t]*#\\+begin_src\\|^[ \t]*#\\+BEGIN_SRC\\|src_[A-Za-z]") . engraved-code) t)
(add-to-list 'org-latex-feature-implementations '(engraved-code :requires engraved-code-setup :snippet (engrave-faces-latex-gen-preamble) :order 99) t)
(add-to-list 'org-latex-feature-implementations '(engraved-code-setup :snippet org-latex-engraved-code-preamble :order 98) t)
(defun org-latex-scr-block--engraved (src-block contents info)
(let* ((lang (org-element-property :language src-block))
@ -8029,10 +8059,11 @@ Now all that remains is to hook this into the preamble generation.
<<julia-mono-fontspec>>
")
(add-to-list 'org-latex-feature-implementations '(julia-code :snippet org-latex-julia-mono-fontspec :order 2) t)
(add-to-list 'org-latex-feature-implementations '(julia-code :snippet org-latex-julia-mono-fontspec :order 0) t)
(add-to-list 'org-latex-conditional-features '((and org-export-has-code-p "^[ \t]*#\\+begin_src julia\\|^[ \t]*#\\+BEGIN_SRC julia\\|src_julia") . julia-code) t)
(add-to-list 'org-latex-feature-implementations '(!microtype-lualatex :when (microtype julia-code) :prevents microtype :snippet "\\usepackage[activate={true,nocompatibility},final,tracking=true,factor=2000]{microtype}\n"))
(add-to-list 'org-latex-feature-implementations '(.microtype-lualatex :eager t :when (microtype julia-code) :prevents microtype :order 0.1 :snippet "\\usepackage[activate={true,nocompatibility},final,tracking=true,factor=2000]{microtype}\n"))
(add-to-list 'org-latex-feature-implementations '(.custom-font-no-mono :eager t :prevents custom-font :order 0 :snippet (org-latex-fontset :serif :sans)) t)
#+end_src
**** Remove non-ascii chars

View File

@ -4,146 +4,146 @@
<!-- Generated by graphviz version 2.42.3 (0)
-->
<!-- Title: %3 Pages: 1 -->
<svg width="407pt" height="260pt"
viewBox="0.00 0.00 407.10 260.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg width="374pt" height="260pt"
viewBox="0.00 0.00 374.00 260.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 256)">
<title>%3</title>
<!-- file:*.jpeg -->
<!-- file:*.svg -->
<g id="node1" class="node">
<title>file:*.jpeg</title>
<title>file:*.svg</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-252 0,-252 0,-216 94,-216 94,-252"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,-216 94,-216 "/>
<text text-anchor="middle" x="47" y="-230.3" font-family="overpass" font-size="14.00" fill="#000000">file:*.jpeg</text>
</g>
<!-- image -->
<g id="node6" class="node">
<title>image</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="224,-198 130,-198 130,-162 224,-162 224,-198"/>
<polyline fill="none" stroke="#f5c211" stroke-width="2" points="130,-162 224,-162 "/>
<text text-anchor="middle" x="177" y="-176.3" font-family="overpass" font-size="14.00" fill="#000000">image</text>
</g>
<!-- file:*.jpeg&#45;&gt;image -->
<g id="edge1" class="edge">
<title>file:*.jpeg&#45;&gt;image</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M90.98,-215.87C101.43,-211.46 112.72,-206.7 123.55,-202.13"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="125.06,-205.29 132.92,-198.18 122.34,-198.84 125.06,-205.29"/>
</g>
<!-- file:*.png -->
<g id="node2" class="node">
<title>file:*.png</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-198 0,-198 0,-162 94,-162 94,-198"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,-162 94,-162 "/>
<text text-anchor="middle" x="47" y="-176.3" font-family="overpass" font-size="14.00" fill="#000000">file:*.png</text>
</g>
<!-- file:*.png&#45;&gt;image -->
<g id="edge3" class="edge">
<title>file:*.png&#45;&gt;image</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M94.21,-180C102.46,-180 111.13,-180 119.63,-180"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="119.86,-183.5 129.86,-180 119.86,-176.5 119.86,-183.5"/>
</g>
<!-- file:*.svg -->
<g id="node3" class="node">
<title>file:*.svg</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-36 0,-36 0,0 94,0 94,-36"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,0 94,0 "/>
<text text-anchor="middle" x="47" y="-14.3" font-family="overpass" font-size="14.00" fill="#000000">file:*.svg</text>
<text text-anchor="middle" x="47" y="-230.3" font-family="overpass" font-size="14.00" fill="#000000">file:*.svg</text>
</g>
<!-- svg -->
<g id="node7" class="node">
<g id="node6" class="node">
<title>svg</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="224,-36 130,-36 130,0 224,0 224,-36"/>
<polyline fill="none" stroke="#f5c211" stroke-width="2" points="130,0 224,0 "/>
<text text-anchor="middle" x="177" y="-14.3" font-family="overpass" font-size="14.00" fill="#000000">svg</text>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="224,-252 130,-252 130,-216 224,-216 224,-252"/>
<polyline fill="none" stroke="#f5c211" stroke-width="2" points="130,-216 224,-216 "/>
<text text-anchor="middle" x="177" y="-230.3" font-family="overpass" font-size="14.00" fill="#000000">svg</text>
</g>
<!-- file:*.svg&#45;&gt;svg -->
<g id="edge4" class="edge">
<g id="edge1" class="edge">
<title>file:*.svg&#45;&gt;svg</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M94.21,-18C102.46,-18 111.13,-18 119.63,-18"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="119.86,-21.5 129.86,-18 119.86,-14.5 119.86,-21.5"/>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M94.21,-234C102.46,-234 111.13,-234 119.63,-234"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="119.86,-237.5 129.86,-234 119.86,-230.5 119.86,-237.5"/>
</g>
<!-- file:*.jpeg -->
<g id="node2" class="node">
<title>file:*.jpeg</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-198 0,-198 0,-162 94,-162 94,-198"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,-162 94,-162 "/>
<text text-anchor="middle" x="47" y="-176.3" font-family="overpass" font-size="14.00" fill="#000000">file:*.jpeg</text>
</g>
<!-- image -->
<g id="node7" class="node">
<title>image</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="224,-144 130,-144 130,-108 224,-108 224,-144"/>
<polyline fill="none" stroke="#f5c211" stroke-width="2" points="130,-108 224,-108 "/>
<text text-anchor="middle" x="177" y="-122.3" font-family="overpass" font-size="14.00" fill="#000000">image</text>
</g>
<!-- file:*.jpeg&#45;&gt;image -->
<g id="edge3" class="edge">
<title>file:*.jpeg&#45;&gt;image</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M90.98,-161.87C101.43,-157.46 112.72,-152.7 123.55,-148.13"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="125.06,-151.29 132.92,-144.18 122.34,-144.84 125.06,-151.29"/>
</g>
<!-- file:*.png -->
<g id="node3" class="node">
<title>file:*.png</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-144 0,-144 0,-108 94,-108 94,-144"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,-108 94,-108 "/>
<text text-anchor="middle" x="47" y="-122.3" font-family="overpass" font-size="14.00" fill="#000000">file:*.png</text>
</g>
<!-- file:*.png&#45;&gt;image -->
<g id="edge5" class="edge">
<title>file:*.png&#45;&gt;image</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M94.21,-126C102.46,-126 111.13,-126 119.63,-126"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="119.86,-129.5 129.86,-126 119.86,-122.5 119.86,-129.5"/>
</g>
<!-- #+caption -->
<g id="node4" class="node">
<title>#+caption</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-90 0,-90 0,-54 94,-54 94,-90"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,-54 94,-54 "/>
<text text-anchor="middle" x="47" y="-68.3" font-family="overpass" font-size="14.00" fill="#000000">#+caption</text>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-36 0,-36 0,0 94,0 94,-36"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,0 94,0 "/>
<text text-anchor="middle" x="47" y="-14.3" font-family="overpass" font-size="14.00" fill="#000000">#+caption</text>
</g>
<!-- caption -->
<g id="node8" class="node">
<title>caption</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="224,-117 130,-117 130,-81 224,-81 224,-117"/>
<polyline fill="none" stroke="#f5c211" stroke-width="2" points="130,-81 224,-81 "/>
<text text-anchor="middle" x="177" y="-95.3" font-family="overpass" font-size="14.00" fill="#000000">caption</text>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="224,-63 130,-63 130,-27 224,-27 224,-63"/>
<polyline fill="none" stroke="#f5c211" stroke-width="2" points="130,-27 224,-27 "/>
<text text-anchor="middle" x="177" y="-41.3" font-family="overpass" font-size="14.00" fill="#000000">caption</text>
</g>
<!-- #+caption&#45;&gt;caption -->
<g id="edge7" class="edge">
<title>#+caption&#45;&gt;caption</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M94.21,-81.75C102.55,-83.51 111.32,-85.36 119.91,-87.17"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="119.35,-90.63 129.86,-89.27 120.79,-83.78 119.35,-90.63"/>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M94.21,-27.75C102.55,-29.51 111.32,-31.36 119.91,-33.17"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="119.35,-36.63 129.86,-35.27 120.79,-29.78 119.35,-36.63"/>
</g>
<!-- xkcd:* -->
<g id="node5" class="node">
<title>xkcd:*</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-144 0,-144 0,-108 94,-108 94,-144"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,-108 94,-108 "/>
<text text-anchor="middle" x="47" y="-122.3" font-family="overpass" font-size="14.00" fill="#000000">xkcd:*</text>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="94,-90 0,-90 0,-54 94,-54 94,-90"/>
<polyline fill="none" stroke="#2ec27e" stroke-width="2" points="0,-54 94,-54 "/>
<text text-anchor="middle" x="47" y="-68.3" font-family="overpass" font-size="14.00" fill="#000000">xkcd:*</text>
</g>
<!-- xkcd:*&#45;&gt;image -->
<g id="edge9" class="edge">
<title>xkcd:*&#45;&gt;image</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M90.98,-144.13C101.43,-148.54 112.72,-153.3 123.55,-157.87"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="122.34,-161.16 132.92,-161.82 125.06,-154.71 122.34,-161.16"/>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M90.98,-90.13C101.43,-94.54 112.72,-99.3 123.55,-103.87"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="122.34,-107.16 132.92,-107.82 125.06,-100.71 122.34,-107.16"/>
</g>
<!-- xkcd:*&#45;&gt;caption -->
<g id="edge10" class="edge">
<title>xkcd:*&#45;&gt;caption</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M94.21,-116.25C102.55,-114.49 111.32,-112.64 119.91,-110.83"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="120.79,-114.22 129.86,-108.73 119.35,-107.37 120.79,-114.22"/>
</g>
<!-- (TeX) graphicx -->
<g id="node9" class="node">
<title>(TeX) graphicx</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="366,-198 260,-198 260,-162 366,-162 366,-198"/>
<polyline fill="none" stroke="#813d9c" stroke-width="2" points="260,-162 366,-162 "/>
<text text-anchor="middle" x="313" y="-176.3" font-family="overpass" font-size="14.00" fill="#000000">(TeX) graphicx</text>
</g>
<!-- image&#45;&gt;(TeX) graphicx -->
<g id="edge2" class="edge">
<title>image&#45;&gt;(TeX) graphicx</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M224.12,-180C232.39,-180 241.13,-180 249.77,-180"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="249.82,-183.5 259.82,-180 249.82,-176.5 249.82,-183.5"/>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M94.21,-62.25C102.55,-60.49 111.32,-58.64 119.91,-56.83"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="120.79,-60.22 129.86,-54.73 119.35,-53.37 120.79,-60.22"/>
</g>
<!-- (TeX) svg -->
<g id="node10" class="node">
<g id="node9" class="node">
<title>(TeX) svg</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="360,-36 266,-36 266,0 360,0 360,-36"/>
<polyline fill="none" stroke="#813d9c" stroke-width="2" points="266,0 360,0 "/>
<text text-anchor="middle" x="313" y="-14.3" font-family="overpass" font-size="14.00" fill="#000000">(TeX) svg</text>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="360,-252 266,-252 266,-216 360,-216 360,-252"/>
<polyline fill="none" stroke="#813d9c" stroke-width="2" points="266,-216 360,-216 "/>
<text text-anchor="middle" x="313" y="-230.3" font-family="overpass" font-size="14.00" fill="#000000">(TeX) svg</text>
</g>
<!-- svg&#45;&gt;(TeX) svg -->
<g id="edge5" class="edge">
<g id="edge2" class="edge">
<title>svg&#45;&gt;(TeX) svg</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M224.12,-18C234.22,-18 245.03,-18 255.49,-18"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="255.8,-21.5 265.8,-18 255.8,-14.5 255.8,-21.5"/>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M224.12,-234C234.22,-234 245.03,-234 255.49,-234"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="255.8,-237.5 265.8,-234 255.8,-230.5 255.8,-237.5"/>
</g>
<!-- (TeX) graphicx -->
<g id="node10" class="node">
<title>(TeX) graphicx</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="366,-144 260,-144 260,-108 366,-108 366,-144"/>
<polyline fill="none" stroke="#813d9c" stroke-width="2" points="260,-108 366,-108 "/>
<text text-anchor="middle" x="313" y="-122.3" font-family="overpass" font-size="14.00" fill="#000000">(TeX) graphicx</text>
</g>
<!-- image&#45;&gt;(TeX) graphicx -->
<g id="edge4" class="edge">
<title>image&#45;&gt;(TeX) graphicx</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M224.12,-126C232.39,-126 241.13,-126 249.77,-126"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="249.82,-129.5 259.82,-126 249.82,-122.5 249.82,-129.5"/>
</g>
<!-- (TeX) caption -->
<g id="node11" class="node">
<title>(TeX) caption</title>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="362,-117 264,-117 264,-81 362,-81 362,-117"/>
<polyline fill="none" stroke="#813d9c" stroke-width="2" points="264,-81 362,-81 "/>
<text text-anchor="middle" x="313" y="-95.3" font-family="overpass" font-size="14.00" fill="#000000">(TeX) caption</text>
<polygon fill="#efefef" stroke="transparent" stroke-width="2" points="362,-63 264,-63 264,-27 362,-27 362,-63"/>
<polyline fill="none" stroke="#813d9c" stroke-width="2" points="264,-27 362,-27 "/>
<text text-anchor="middle" x="313" y="-41.3" font-family="overpass" font-size="14.00" fill="#000000">(TeX) caption</text>
</g>
<!-- caption&#45;&gt;(TeX) caption -->
<g id="edge8" class="edge">
<title>caption&#45;&gt;(TeX) caption</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M224.12,-99C233.67,-99 243.85,-99 253.77,-99"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="253.97,-102.5 263.97,-99 253.97,-95.5 253.97,-102.5"/>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M224.12,-45C233.67,-45 243.85,-45 253.77,-45"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="253.97,-48.5 263.97,-45 253.97,-41.5 253.97,-48.5"/>
</g>
<!-- (TeX) svg&#45;&gt;(TeX) graphicx -->
<g id="edge6" class="edge">
<title>(TeX) svg:e&#45;&gt;(TeX) graphicx:s</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M361,-18C406.17,-18 405.97,-77.53 384,-117 367.92,-145.89 324.16,-128.77 314.79,-150.91"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="311.3,-150.54 313,-161 318.19,-151.76 311.3,-150.54"/>
<title>(TeX) svg:s&#45;&gt;(TeX) graphicx:n</title>
<path fill="none" stroke="#aaaaaa" stroke-width="1.2" d="M313,-154.02C313,-178.12 313,-187.62 313,-216"/>
<polygon fill="#aaaaaa" stroke="#aaaaaa" stroke-width="1.2" points="316.5,-154 313,-144 309.5,-154 316.5,-154"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB