1

My intention is to simply code some figure like this:

enter image description here

Is there any online tool to transform figures or pictures in to latex code?

4
  • 1
    I highly doubt it. You can use tools like inkscape and export to TikZ. Other tools export TikZ code directly, but it will be you that is creating the diagram/picture.
    – Johannes_B
    Dec 18, 2016 at 10:39
  • @Johannes_B I support the comment of Johannes - I do not think that this is possible at the moment. Dec 18, 2016 at 10:53
  • 4
    Well, Inkscape does have the possibility of tracing bitmaps and creating vector paths based on the image, so in theory you could do that and export to TikZ code. However, I would not do it for a diagram like that. The text will not be converted to actual text I believe, it will just be a shape like any other, so editing it is hopeless. For diagrams like the one you show you're much better off learning TikZ and making it yourself I think. There are also various tools for generating code of diagrams, see e.g. tex.stackexchange.com/questions/26972 Dec 18, 2016 at 11:15
  • 1
    \includegraphics ;-) Dec 18, 2016 at 16:04

2 Answers 2

2

Unfortunately online tool to transform figures or pictures in to LaTeX code not exist. Peraphs with InftyReader it is possible. See at the link http://www.inftyreader.org/. But if you want to build your figure, you can use

1
  • I have read: Is there any online tool to transform figures or pictures in to latex code?. My answer is: Online tool to transform figures or pictures in to latex code not exist.
    – Sebastiano
    Dec 19, 2016 at 7:19
6

Short answer:

No, there's not a one click tool that gets the PNG and converts it to TikZ out of the box. But there are routines you can follow to do it. Keep in mind, though, that as Torbjørn T. mentioned, the diagram will only have the advantage of being a vector graphic, there will be no font consistency, the generated code will likely be very extense and perhaps the converted graphics will not be so great after all, therefore perhaps it's better to just convert to PDF and use \includegraphics.

For a reference: in Advices on drawing a complex figure using tikz there are two ways to convert a PNG: one to SVG and one to TikZ (the second is done completely in Inkscape). Also take note that SVG can be easily converted to TikZ.

Not so long answer:

This I speak from my personal experience on learning TikZ for the last few months: simple diagrams are worth to draw yourself and learn a bit of the tool after all. By simple I mean with well defined geometric shapes, and with no coloring, shading, shadowing and etc. The reason why I say this are simple:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .