Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why use this instead of latex?


LaTeX is for typesetting and notation, which it's quite good at. On the other hand, designing, laying out, and constructing pretty diagrams in LaTeX is very much NOT where LaTeX shines.


Tikz (a set of packages for latex) [1] is an excellent tool for programmatically creating figures. I drew half the illustrations during my phd using Tikz. Even if other tools are more powerful, tikz has roughly the same syntax as latex and so there is less to learn. Its a lot of easier to control the flow of the figures in a document if they are drawn using tikz because you can resize or realign them on the fly.

[1] Some examples here http://www.texample.net/tikz/examples/


TikZ is good for pretty diagrams, and is entirely contained within (built with) LaTeX.


TikZ creates pretty diagrams. I've had partial success using it, with my beginner-level LaTeX knowledge. I'm not convinced that it's possible to become comfortable with TikZ syntax, without hundreds of hours of LaTeX experience. I'd love to be proven wrong, of course.


I have had thousands of hours of experience with latex and dozens with tikz. I still struggle with it. Its just that Latex has terrible syntax for function declaration, loops and conditionals and tikz inherits all these problems. My workflow is usually to go to http://www.texample.net/tikz/examples/ a lot and use the examples as reference code to whatever I am doing.

The manual for tikz exists but I have never really read it.


That's reassuring, if unfortunate. Thanks.


Most TikZ syntax is actually pretty different from normal LaTeX syntax (and most other graphics syntax!). It's got a bunch of syntactic features I've never seen anywhere else.

If you want to be proficient in TikZ, I think the best way is to read the manual. I put it on my phone and started at the start. It's general understanding of how 2D graphics systems tend to work and learning how TikZ does things that made me comfortable.


I've read bits of it, trying to accomplish specific things. I always feel like I'm missing some foundational LaTeX knowledge, and it slows me down. Is there a good intro/manual for LaTeX that might help me there?


At first I just read bits of the TikZ manual, but then decided I'd understand things properly if I read from the beginning and got the foundations.

I don't have a single source for LaTeX. Most of the LaTeX I know (which is quite a bit by this point) comes from places like Stack Exchange, which I get to by doing a search to solve a specific problem. I tend to read lots of answers to get an understanding, rather than just using the first one that works; there are often multiple ways of doing things, some better, some worse, some obsolete, some leading to a whole new area of knowledge.

The main thing is just to do lots of LaTeX, and it helps to do similar things over and over, improving how you do it each time. E.g. I've written so many maths exams that I have things like mark positioning, mark totalling, the question table on the cover, spare blank pages, starting questions on even numbered pages etc. all completely automated - but it didn't start that way at all, I just make it a bit better each time. Improving the same lecture notes and tutorials every semester is another.

Working with and improving someone else's LaTeX code can help a lot, even (or especially) if your reaction is "Wow, that's awful! There must be a better way!".


I do a lot of the same things you mention here, but I decided to write a python lib with jinja templating. I found my knowledge of python and its nice syntax to allow loads of use cases that I probably would have given up on in latex alone.


What's the end product? PDF or HTML? Do you have any of them online you can link to?

I do lots of Python stuff, but haven't used Jinja. LaTeX is pretty clunky for many things, and I haven't been able to take much advantage of LuaLaTeX, for compatibility reasons.


Yeah, that sounds like about where I am now, probably a few years behind you. I'm also slower at progressing since doing things in LaTeX isn't part of my normal workflow.



Some are just searching for anything that will generate the plot they want with ``better'' workflow. It's subjective. TikZ can be off putting, if you don't want to put the time in, or it doesn't meet some particular need you have. Inkscape is vast. draw.io is limited. 3D modelers, CAD programs, Python with its libs etc. I would say that LaTex and Penrose are compliments, as with any graphic generating tool.

The creators of Penrose have this to say in the very first sentence of their introduction: "Typesetting software like LATEX and MathJax has accelerated the pace of scientific communication, but no equivalent exists for mathematical diagramming."


This seems more a complement to latex. At the moment it generates svgs. But these can use TeX math via mathjax, and the internal representation is quite straightforward.

It seems like it would not be much work to add a way to output as eg tikz (or rather, pgf) to this. It could probably output something more low-level too


I don't understand your question. This and LaTeX are completely different applications for completely different purposes


Some people are allergic to LaTeX




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: