Skip to content

Commit 58a685c

Browse files
committed
test: Add example of exporting a tikz diagram using dvisvgm
Ref #565
1 parent 3f827aa commit 58a685c

4 files changed

Lines changed: 37 additions & 0 deletions

File tree

‎test/site/content-org/all-posts.org‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3912,6 +3912,15 @@ C = W\log_{2} (1+\mathrm{SNR})
39123912
Referencing to equation labels does not work when {{{latex}}}
39133913
equations are exported as images.
39143914
#+end_note
3915+
*** tikz
3916+
{{{oxhugoissue(565)}}}
3917+
3918+
#+latex_header: \usepackage{tikz}
3919+
#+latex_header: \usepackage{pgfplots}
3920+
3921+
\begin{equation*}\begin{tikzpicture}
3922+
\draw[gray, thick] (-1,1) -- (1,-1);
3923+
\end{tikzpicture}\end{equation*}
39153924
** Equations exported to PNG (dvipng) :dont_export_during_make_test:dvipng:
39163925
:PROPERTIES:
39173926
:EXPORT_FILE_NAME: equations-exported-to-png
Lines changed: 7 additions & 0 deletions
Loading

‎test/site/content/posts/equations-exported-to-svg.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,17 @@ Referencing to equation labels does not work when <span class="latex">L<sup>a</s
3030
equations are exported as images.
3131

3232
</div>
33+
34+
35+
## tikz {#tikz}
36+
37+
`ox-hugo` Issue #[565](https://github.com/kaushalmodi/ox-hugo/issues/565)
38+
39+
40+
<div class="equation-container">
41+
<span class="equation">
42+
<img src="/ltximg/all-posts_883cc123fe80ef810c1787b4c684be98b48dae22.svg" alt="\begin{equation*}\begin{tikzpicture}
43+
\draw[gray, thick] (-1,1) -- (1,-1);
44+
\end{tikzpicture}\end{equation*}" class="org-svg" />
45+
</span>
46+
</div>
Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)