Giter Club home page Giter Club logo

latex-svg's People

Contributors

gwils avatar liamoc avatar phadej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

latex-svg's Issues

Pinned pandoc-types version not compatible with latest Hakyll

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?

Pandoc filter for general LaTeX environments

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,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.