phadej / latex-svg Goto Github PK
View Code? Open in Web Editor NEWRender LaTeX math to SVG mages
License: BSD 3-Clause "New" or "Revised" License
Render LaTeX math to SVG mages
License: BSD 3-Clause "New" or "Revised" License
Hello Oleg,
Thank you for making this fork. I don't know if you have noticed, Pandoc can produce RawInline
and RawBlock
elements for plain TeX strings inside a markdown document.
For example, the two LaTeX environments in
Inline environment,
\begin{align*}
a &= 1 + 1\\
&= 2
\end{align*}
rest of the paragraph.
\begin{tikzpicture}[>=stealth]
\draw[->] (-1,0) -- (1,0);
\draw[->] (0,-1) -- (0,1);
\end{tikzpicture}
will be compiled to the following Pandoc ASTs, respectively,
RawInline (Format "tex") "\\begin{align*}\n a &= 1 + 1\\\\\n &= 2\n\\end{align*}"
RawBlock (Format "tex") "\\begin{tikzpicture}[>=stealth]\n \\draw[->] (-1,0) -- (1,0);\n \\draw[->] (0,-1) -- (0,1);\n\\end{tikzpicture}"
which means it's possible to generate images for any TeX strings inside a markdown document with two filters of type
Inline -> Inline
Block -> Block
and put the raw TeX string into here.
By the way, the Pandoc AST can be generated using
$ pandoc -t native test.md
I was looking at the code to see if it's possible to extend it to support general LaTeX environments, but it seems that some major refactoring is needed because currently environments are tied to MathType
. Also, "formula" is in most functions' names :). It probably doesn't make sense to make another fork of this. Could you consider implementing this feature? I might be able to help but there can be some major design decisions to be made.
Best,
Specifically alterForHTML
should strip that id.
In latex-svg-image
, adding this modifier to the document definition as follows:
\documentclass[12pt,dvisvgm]{...}
Allows tikz pictures to be later on rendered by dvisvgm
.
Would you consider adding it?
For reference: this is where I found about it https://tex.stackexchange.com/a/560548
This package is pinned to versions of pandoc-types (>=1.17.6.1 && <1.18 || ==1.20.*)
while Hakyll 4.13.4.1 now requires pandoc == 2.10.*
which in turn requires pandoc-types == 1.21.*
.
I tried compiling with the newer pandoc-types anyways using Stack's allow-newer: true
option, and everything still seemed to work fine. I also tested with pandoc-types == 1.22.*
and that worked as well. Can we bump dependency version for this package to be pandoc-types (>=1.17.6.1 && <1.18 || >=1.20 )
perhaps?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.