1

A friend of mine is writing a math/physics textbook as a hobby.

He would like to be able to draw simple images like the following:

enter image description here enter image description here

He doesn't have artistic skill, but he has a can-do spirit. He is hoping to find software that will make creating images in this style relatively easy.

I thought of inkscape but I'm not sure if there's something that is better and more intuitive or designed specifically for this sort of thing.

Do you have any recommendations?

1 Answer 1

2

TiKZ is a LaTeX package that allows you to code graphics. For example, your first example in TiKZ could look like this:

\documentclass[tikz]{standalone}
\usepackage{units}
\begin{document}
\begin{tikzpicture}
    \draw[->] (0,0) -- (3,0) node[midway,below] {\unit[3]{m} east};
    \draw[->] (3,0) -- (3,4) node[midway,right] {\unit[4]{m} north};
    \draw[->] (0,0) -- (3,4) node[midway,above left] {\(R=\unit[5]{m}\), 53°};
    \node at (0.7,0.3) {53°};
\end{tikzpicture}
\end{document}

With the outcome being:

Output of the TiKZ code

(Admittedly, the arrows need tweaking, but that’s something you always have when two arrows point to the same point from similar directions.)

I regularly need to make similar illustrations for exercises and use TiKZ for most of those.

The advantages and disadvantages are:

  • TiKZ is not WYGIWYW (what you get is what you want) instead of WYSIWYG (what you see is what you get). I consider that an upside.
  • TiKZ has a very convex learning curve. It can do everything, but it takes you a while to get there. Once you have achieved a certain level of mastery, you can get clean results extremely fast. It’s not for doing something quick and dirty though.
  • Tasks that are complex at first glance can have very simple solutions, in particular when it comes to creating diagrams such as yours.
  • You have all the powers of LaTeX to render anything resembling a formula. And if you want to change a symbol, it can be as easy as changing one macro.
  • Text in your figures will exactly look like your regular text, being rendered by the same engine. If you want to change your typeface or similar, you need to change one line only. (Maybe some text placements need a bit of tweaking though.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.