Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tell pandoc to generate images from a block of latex #745

Closed
Micket opened this issue Feb 10, 2013 · 4 comments
Closed

Tell pandoc to generate images from a block of latex #745

Micket opened this issue Feb 10, 2013 · 4 comments

Comments

@Micket
Copy link

Micket commented Feb 10, 2013

I would like a feature like this

\begin{makeimage}{filename}
\begin{tikzpicture}
 \draw[->] (0,0) -- (1,0) node[above] {A};
\end{tikzpicture}
\end{makeimage}

or some syntax a long those lines.

@jgm
Copy link
Owner

jgm commented Feb 10, 2013

This is too much to expect from pandoc. Pandoc would have to
include a complete interpreter for the tikz language, and backends
capable of producing images from this in a bunch of different
formats.

I would recommend building a solution using the pandoc API.
For example, you could write a Haskell script that took specially marked
code blocks (say, with class tikz), ran them through pdflatex to
produce a PDF, and included the PDF as an image.

+++ Mikael Öhman [Feb 09 13 18:22 ]:

I would like a feature like this

\begin{makeimage}{filename}
\begin{tikzpicture}
\draw[1]-> -- (1,0) node[above] {A};
\end{tikzpicture}
\end{makeimage}

or some syntax a long those lines.

--
Reply to this email directly or [2]view it on GitHub..
[xJAuenYDiIoVt3LF3y6841UXDXECnBKsci6BDmn1hV63jkqA32NE9EvH0PCr0FIN.gif]

References

  1. file://localhost/var/folders/12/n6gdkl3n1gxbzd6_fjy7f5j80000gn/T//0,0
  2. Tell pandoc to generate images from a block of latex #745

@Micket
Copy link
Author

Micket commented Feb 10, 2013

That is exactly what I'm trying to suggest, that it would take everything within the makeimage-environment and generate an image.

@jgm
Copy link
Owner

jgm commented Feb 10, 2013

Right. And I'm saying, it's too complex to be part of pandoc,
but you can probably write a script with the pandoc API that does
this for some limited subset of output formats.

+++ Mikael Öhman [Feb 09 13 19:00 ]:

That is exactly what I'm trying to sugges, that it would take
everything within the makeimage-environment and generate an image.

--
Reply to this email directly or [1]view it on GitHub..
[xJAuenYDiIoVt3LF3y6841UXDXECnBKsci6BDmn1hV63jkqA32NE9EvH0PCr0FIN.gif]

References

  1. Tell pandoc to generate images from a block of latex #745 (comment)

@Micket
Copy link
Author

Micket commented Feb 10, 2013

Ok, I must have misunderstood since you mentioned actually parsing the actual tikz syntax.
I will look into writing a such a script.

@jgm jgm closed this as completed Feb 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants