
I draw figures for my mathematical lecture notes using Inkscape - adamnemecek
https://castel.dev/post/lecture-notes-2/#
======
buiducnha
I've also read previous article about how the author manage to take lecture
note using Vim+Latex (also posted on HN), and that's amazing how author
managed to do that. But I'm thinking for people who does not know how to use
Vim (arguingly high learning curve) and Latex to take note, what options do
they have to take note quickly (with Math symbols/layouts)?

You can try out Mathcha[1] which is built to help people without knowing of
Latex can easily write down Note (with rich Mathematics symbols/layouts) and
it also provide basic Drawing and basic Function Plotting (The Drawing Part no
way compare to Inkscape, but hey! you can type Math on Drawing on Mathcha) in
single Editor.

 _Please note_ that I don't want to tout and advertise Mathcha here, the point
is to provide another option for people to try out (I will not say it will
provide faster or more powerful than Vim+Latex)

[1] Mathcha website: [https://www.mathcha.io/](https://www.mathcha.io/)

Disclaimer: I'm creator of Mathcha.

~~~
tomrod
I tended to introduce LaTeX to new folks through LyX.

Haven't used it for several years though, so no idea if the WSYIWYG is still
up and running.

~~~
foob
This might come off as pedantic, but LyX is explicitly designed to be What You
See Is What You Mean (WYSIWYM) rather than What You See Is What You Get
(WYSIWYG). It gives you the gist of how things will end up without attempting
to actually represent the final LaTeX output while you edit. It's an
incredible piece of software, and I strongly prefer it over raw LaTeX despite
the fact that I learned LaTeX first.

~~~
tomrod
Pedantic, but precise. Thanks for the clarification.

------
Al-Khwarizmi
I am a person with a predominantly symbolic/linguistic way of thinking, and
I'm aware that I tend to be bad at anything resembling graphic design,
drawing, understanding of diagrams, etc... but this puts into perspective how
much I really suck at that.

Out of the example figures in this post, some of them I would outright not
know how to draw. Others I would be able to draw, but I think each of them
would take me at least about an hour, maybe more. And this is not out of lack
of familiarity with the tool: Inkscape is my go-to tool for vector drawing and
what I use most for scientific paper figures, presentation slides, posters,
lecture slides, etc. so I have lots of hours of practice with it.

Who is more of an outlier, the author or I? Is it really within the reach of
most people to be able to whip up figures like that in a few minutes?

~~~
monkeycantype
I'm uncertain whether it is the conceptual step of visualising the image, or
the execution that you find challenging. From the context I'm assuming it's
the former. I find drawing these types of images effortless.

But I ( native English speaker) struggle ( had to google to write the first
sentence ) with which is which in _former_ and _later_. I always imagine the
past stretching behind and the first thing mentioned is now further away from
me, so it should be the 'later' and the second thing mentioned is now closer
to me and should be the 'former'. I've had this conversation enough to know
that some people agree and others respond by sharply downgrading their
estimation of my intelligence. As a _predominantly symbolic/linguistic_ person
I suspect former/later is something you would perceive as effortless.

Though I have hard time taking the visual/auditory/kinaesthetic learning
styles seriously, and with no thought as to the contribution to the variation
between individuals being learned or innate - symbolic/linguistic/visual seem
to be different competencies.

And Gilles Castel seems near the top of the curve on all of them.

~~~
Al-Khwarizmi
Yes, it's mainly the conceptual part that is problematic. Although when
drawing Bézier curves, for example, I also have problems with the execution,
but I think they are also due to lack of visual thinking (the relation between
where I click/drag the mouse and the final curve is totally non-obvious to
me).

Indeed, as you assume, "former" and "later" don't pose any problem for me
because I don't imagine anything visual at all when I evoke those concepts, I
just think about what they mean in a non-visual way. But I can see why you
would struggle if you think visually.

I guess the analogous weakness in my case is the one that manifests when I
have hung my coat and forgot to take out e.g. the keys. I know what pocket my
keys are in (e.g. suppose they are in the left inner pocket) but I totally
struggle to find it when I'm not wearing the coat. Visual thinking seems to
really outperform symbolic thinking in that problem, and sometimes
memorization of the solution provides a shortcut in similar issues, but there
it doesn't work because the coat can be hung in two orientations! So it's
usually faster for me to take the coat, put it on, take the keys, and then
hang the coat again, and in fact that's exactly what I do, at least if no one
outside of friends and family is looking... :)

I'm not sure about learning styles (if a teacher provided a visual schema of a
lesson I just translated it to words, or focused more on the oral explanation
and ignored the diagram, and still learned it fine, it wasn't such a big deal
as some people make it look like), but thinking styles are definitely a thing.
I'm not sure if the difference is learned or innate either. In my case, I have
always loved reading and read a lot since infancy, so it might be learned.

~~~
monkeycantype
The coat image is very amusing :)

------
newrotik
I use Ipe [0] for my work. The wiki page [1] gives you an idea of what it
looks like.

It's also open source and you can compile LaTex directly in the editor to see
what it looks like without switching windows.

[0] [http://ipe.otfried.org/](http://ipe.otfried.org/) [1]
[https://en.wikipedia.org/wiki/Ipe_(software)](https://en.wikipedia.org/wiki/Ipe_\(software\))

~~~
lower
Ipe is great not just for figures, but also presentations. It supports multi-
page documents, incremental build-up of slides, presentation style-sheets, and
so on. Showcase:

[https://github.com/otfried/ipe-
wiki/wiki/Showcase#presentati...](https://github.com/otfried/ipe-
wiki/wiki/Showcase#presentations)

------
cge
I initially started writing a response to this thinking the author was
referring to preparing lecture notes for lectures they were giving, not taking
notes at lectures they were attending. That is entirely different, and I do
have to wonder whether it's actually more efficient than, say, using a tablet
to draw them, except in cases where the figures involve only use of common,
repeated motifs.

I do agree with the author that taking lecture notes for math-heavy classes in
LaTeX is quite possible, though I haven't done it since I was an
undergraduate. While the author makes use of snippets in a particular text
editor setup, I instead relied on extensive use of \def. With sufficient
experience and intuition as to when to \def something, I could take notes in
many classes faster than everyone writing by hand, and often faster and more
clearly than the professor could write: I could insert a common but
complicated expression with a few keystrokes, rather than writing it out or
using something like ~ to refer to it. I would also use a standard set of
\def's to make standard LaTeX faster to type: \beq and \eeq for
\begin{equation} and \end{equation}, and so on. This also had the advantage of
working in any text editor.

The disadvantage over snippets (I'm not sure how developed they were at the
time) was, of course, that my LaTeX was incomprehensible for anyone else
reading it, and my style had to change significantly once I started
collaborating on projects rather than just writing notes for myself.

I've long used Inkscape for paper and prepared note figures, however, and I've
found that many of my colleagues now do as well, after Adobe's transition to a
subscription model. In doing so, I am very wary of the pdf+latex export: it
doesn't seem as though it can reliably place text exactly, leaving the risk
that it looks awkward or has text move when the font; it also makes figures
that are not easily reusable in other places (eg, presentations, typesetters
making HTML versions of papers, etc). Additionally, the pdf export itself
doesn't seem to preserve editing very well. As such, I usually store parallel
svg and pdf versions, in the interest of avoiding very non-standard LaTeX
packages. However, if I recall correctly, there are packages that allow direct
use of Inkscape SVGs in LaTeX.

------
skilled
As far as Inksccape goes, the MacOS experience is one of the worst I have ever
had to deal with. Luckily, I only use it to extract individual photos from
EPS/PDF files.

Unfortunately, all the good editing apps like Sketch and Affinity Designer
cost a fortune when you factor in the actual use case. Figma is alright, but
the desktop app feels like I am working with a piece of origami.

~~~
wst_
Exactly. Does anyone know what are the difficulties to provide a pleasant
experience for Inkscape on Mac? Gimp looks decent. With Inkscape I wouldn't
need anything else, really. Both are amazing.

~~~
chapium
GIMP and Inkscape are very different. GIMP has nearly no vector graphics
editing support, although you can open svg files with it. Inkscape on the
other hand is a vector graphics editor.

~~~
pcr910303
Looks like that's why Inkscape is needed in macOS! :-)

------
lousken
When I was at school I used markdown and converted to latex using pandoc.
However I always drew all figures on a piece of paper with a date and number
on it and then matched it with my notes. I couldn't find the right tool for
this and I didn't think I'd be fast enough with inscape, but i guess if you
really try it's possible. That's awesome but I wish this article released 5
years ago :)

I wonder though, are there any alternatives to inscape in which you can draw
graphs quickly?

~~~
ygra
> I wonder though, are there any alternatives to inscape in which you can draw
> graphs quickly?

yEd [0] might be one. There's also an online version with (currently) a tad
reduced feature set [1].

[0] [https://www.yworks.com/products/yed](https://www.yworks.com/products/yed)
[1] [https://www.yworks.com/products/yed-
live](https://www.yworks.com/products/yed-live)

There are a number of other applications, though. I still like Graphviz for
quickly creating a graph structure, but tweaking its layouts can be cumbersome
(Note: yEd Live supports rudimentary Graphviz import as well). There's also
dia, draw.io, Gliffy, LucidChart, OpenOffice Draw, Omnigraffle. And PowerPoint
works to some extent as well.

(Disclaimer: I work for yWorks.)

~~~
chappi42
yEd is very helpful. I occasionally use it since many years.

------
alexmlamb2
Is there any way to use inkscape and have it seamlessly integrate with
sharelatex? I'd be kind of concerned about using sharelatex with inkscape
PDFs, and then forget about or lose the folder with the inkscape source files.

------
thomasfedb
Very impressive that these figures are drawn at lecture pace. I used to write
my maths notes up in LaTeX, but it was always after the fact from my
handwriten notes. Even typesetting math takes time.

~~~
lousken
I could do math typesetting at lecture pace with my 90-100wpm.

But I can't imagine sketching my figures in inkscape.

~~~
mkagenius
Just curious, in the exams are you allowed to use Latex too? It is difficult
to think that it wouldn't be a hinderance.

~~~
lousken
Exams were pen and paper only.

------
SourPatch
An older, similar program is xfig.

~~~
raister
I use XFig - the learning curve is bad, but the results are great. And it
integrates rather easy with LaTeX.

------
ttd
Native LaTeX equation editing for technical diagrams was probably the biggest
itch I wanted to scratch with the diagramming application I wrote
([https://vexlio.com](https://vexlio.com)). Unfortunately I haven't had much
time to devote to development recently, but it's still out there and hopefully
still useful to people.

------
lame88
When I see stuff like this and the author's previous artile, it reminds me of
the overwhelming potential of scriptable systems and customizable open source
software. But at the same time, trying to pursue these things has always been
a net negative for me in terms of productivity, for several reasons: there is
often such a high learning curve, there are so many different choices of
programs that people use (with the resulting community fragmentation), and
there is so little investment in UX. So I get all caught up in learning the
systems themselves instead of dealing with the limitations of the systems I
know and getting to the actual work. So on one hand I know I'm stuck in local
maxima, but on the other hand it remains such a long and risky investment to
try to seek other more optimal solutions.

------
lottin
I really like Tikz but I find drawing anything with it _extremely_ time
consuming. At some point you have to ask yourself whether it's worth it.
Personally, I think I'm done with Tikz. Next time I'm gonna try something
else. Inkscape in particular looks like it could be a good alternative.

~~~
NowThenGoodBad
It's pretty great! I used it to build my business's logo and really enjoyed
working with such a comprehensive suite of tools, probably using a fraction of
a percent of its capability and doing so in a brutish fashion.

However, my biggest challenge with it, and I've experienced this with other
similar software, is how it handles text along a path.

After struggling with this for some time I just took a somewhat brute force
approach and made hidden arcs that achieved the target text curvature, despite
that arc not being part of the circle.

------
JohnStrangeII
It's such a pity that LatexDraw is not developed more. It would be the ideal
solution if it had a few more features. I currently use Dia for the same
purpose as the author uses, but I have to admit that the graphics in this
article look pretty good. I'll give Inkscape a try.

------
emgee_1
Yes I think serious practice is needed. There is something else that is a
disadvantage: you need anyway to review your lecture notes; but since they are
so beautiful you do not easily see mistakes; one way to avoid overly beautiful
notes is to use a kind of draft font that deliberately looks a bit off. The
drawings (with the keyholes ) are of path integrals with holomorphic functions
(something I did around 1982)

But the whole idea and execution are phenomenal.

My feeling is that using emacs it could be possibly easier but I will not try
to convert a vimmer

------
phkahler
Is inkscape unique in using standard SVG as its native file format?

~~~
petschge
Note that while inkscape SVGs do conform to the standard, they do contain
extra information in their separate namespace to preserve UI information
across save/restore cycles.

One example would be layers. They are saved as standard complient groups of
SVGs features. But not all grouped elements form their own layers. So the
groups that should be shown as layers do have extra meta data on them. Any
standard complient SVG reader while deal with that group correctly, but might
not represent it as a layer in it's GUI.

~~~
jnbiche
> but might not represent it as a layer in it's GUI.

How would you visually represent a layer in a GUI? Layers are logical, not
visual, groupings.

Edit: I wasn't considering the editor itself a GUI in this scenario, although
it clearly is. I was thinking of the GUI (such as a web browser) where the SVG
was being used.

~~~
crazygringo
In the editor, using the layers interface:

[http://wiki.inkscape.org/wiki/index.php/Layer_Dialog](http://wiki.inkscape.org/wiki/index.php/Layer_Dialog)

While obviously if you open the SVG in a web browser, layer information is
ignored.

~~~
jnbiche
OK, you mean in the editor, not in the GUI that's displaying the SVG.

(I use the layers dialog in Inkscape on a weekly basis -- and used to in
Illustrator as well).

------
stared
Even Chris Olah uses Inkscape. (Personally, I prefer TikZ, do to the easiness
to change styles in a more semantic way.)

Vide "Simple diagrams of convoluted neural networks"
[https://medium.com/inbrowserai/simple-diagrams-of-
convoluted...](https://medium.com/inbrowserai/simple-diagrams-of-convoluted-
neural-networks-39c097d2925b) with an overview of tools for drawing diagrams
for deep learning.

------
dvt
This is awesome! Doing graphics in LaTeX has always had a pretty high barrier
to entry (not to mention constant trial and error).

~~~
kccqzy
It's pretty much the same argument as web designers who choose to use a visual
design tool versus those who choose to write HTML, CSS and JS to produce their
design. Some things are easier when designed visually, others are easier when
written in code. Doing LaTeX graphics is the same.

~~~
jnbiche
As a web developer who tried various visual design tools in the 1990s and
finally eschewed them all and went back to using Vim or (later) Sublime Text
for coding markup and CSS, I'm curious what things are easier when designed
visually for you.

~~~
kccqzy
No. I started web design using Dreamweaver a long time ago. When I began, I
used its visual design features quite a bit. Nowadays I just have an editor
(usually Emacs) and a browser window side by side. I, do however, find visual
design tools useful for prototyping.

------
cies
I love Inkscape for being a great "learn once run anywhere/anytime" vector
drawing tool. No searching/cracking/paying for the few time a year I need a
tool like that.

Always there so the skill I developed with it can be put to use efficiently. I
love open source so much for this.

------
ThePhysicist
I did most of the illustrations in my PhD thesis using PowerPoint (export via
PDF and include in Latex), which I found more practical than Inkscape. Of
course it’s not designed for scientific diagrams but you can actually produce
some pretty decent looking illustrations with it.

~~~
rubidium
Was this due to already knowing PowerPoint and not knowing Inkscape? I can
think of exactly 0 ways in which PowerPoint is better :)

Can you link to your thesis?

~~~
ThePhysicist
Thesis is here: [https://github.com/adewes/phd-thesis-
physics](https://github.com/adewes/phd-thesis-physics)

Inkscape was very difficult to use at the time (IMHO) and had lots of bugs,
maybe this improved in the meantime as almost 10 years have passed.

------
quangio
If drawing some complicated geometry or high precision is not required, GNU
Texmacs is also a good choice. You can do everything in the editor and see the
immediate result, WYSIWYG style.

------
sAbakumoff
>> but once you’ve got the ba­sics down, it’s hard to get back to an ed­i­tor
with­out Vim key­bind­ings.

Right..because it's hardly possible to quit fucking vim :(

------
kacamak
This is exactly what i needed all these years i was typing in TiKz or using
corel draw without latex support.

------
mettamage
cached page:
[https://web.archive.org/web20190428003002/http://castel.dev/...](https://web.archive.org/web20190428003002/http://castel.dev/post/lecture-
notes-2/)

------
frabbit
Trivial point: `Omit text in pdf and cre­ate LaTeX file’ Should be "emit
text"!

~~~
jnbiche
No, if you look at what it's doing, I think "Omit" is the word they wanted to
use. They're saying, "Omit the (Latex code) text in pdf and create (in
addition to the pdf) a Latex file (that has references to placeholders where
the Latex code was originally)".

I've not used this feature in Inkscape, but that's how it seems to work.

~~~
frabbit
You are correct. I should have read more carefully and verified instead of
assuming.

------
posterboy
This looks really impressive, but I don't think that figure drawing should be
required in lectures. It's a huge distraction, lecturers should prepare
scripts instead, in this day and age. Redrawing the figure might help some
understanding, if construction is proof, but often it only serves to depict
labels on a graph, not to solve a geometric puzzle.

~~~
snazz
It looks more to me like this just happens to be the technique that the OP
prefers to use to take notes. I imagine most students use paper or a tablet.

