Welcome to the *TeXtalk!* We have a very special guest for today: our friend [Andrew Stacey](http://tex.stackexchange.com/users/86), a well-known member of our community, trusted user, 40k+ rep, 274 badges, and one of the resident TikZ experts. Get ready for this great interview! From this episode on, we are using the [new interview format as discussed in our meta site](http://meta.tex.stackexchange.com/questions/2399/clearer-formatting-of-dialogue-in-textalk). Hope you guys like it! `:)`
- Paulo Cereda
- Could you tell us a bit about yourself?
- Andrew Stacey
- Mathematician, British, living in Norway, married with three kids (not yet asleep, judging by the singing).
I used to have lots of hobbies but now that I have several children I don’t have so much time.
- Paulo
- How’s the weather in Norway?
:)
- Andrew
- Quite sunny at the moment, though it did snow on 1st June.
- Joseph Wright
- Does TeX count as a hobby, or a crucial work tool?
- Andrew
- Both.
It is a crucial work tool because I write articles as I go along, rather than waiting until I’ve finished. It’s often only when I actually write it down with the intention that others will read it that I sort out all the little bits that weren’t that important when I started thinking about the maths.
So it’s important that the writing be easy and flexible (how many times have I changed notation mid article!) and not interfere with the thinking (remind me, which menu did I have to click through to get the Greek letters?). So in that sense, it’s a crucial work tool.
But it’s a lot of fun too, and a source of relatively straightforward puzzles.
- Joseph
- I assume that, as you are a mathematician you got into TeX as a student?
- Andrew
- Yes. I was aware of TeX (LaTeX, really) as a student and that some lecturers used it for problem sets, so when I had an extended problem set to do (with a prize of a bottle of sherry) then I decided to try typesetting it in LaTeX.
(That was, I think, in the middle of my fourth year at university.)
- Joseph
- From that point of view, I guess you are a ‘core’ TeX user: do you use plain much?
- Andrew
- No, never. I’ve always been a LaTeX user. Now that I’ve been exposed to more of TeX (and things like ConTeXt), I’d be less scared of using them. But for the main, TeX is a means to an end so until I have a need to use them I’ll probably not experiment much with formats other than LaTeX.
- N3buchadnezzar
- What answer are you most satisfied with Andrew?
- Andrew
- That’s a really hard one. I was just looking earlier at my list of answers and top of the list (for votes) is the Christmas tree! I think that it’s easier to identify the type of answer I’m most satisfied with. Those are the ones where I’ve had to dig deep in the code to really understand some strange behaviour and I come out the other end feeling like I know something that I didn’t before.
A good example would be the ones pertaining to
tikz-qtree. I’ve never used the package myself, but Stefan’s bounty on the first question said “Here’s something someone would really like to know the answer to” so I thought I’d have a go, and it was complicated but it worked, and it got converted to a patch in the package.
- Joseph
- You are one of the ‘resident’ TikZ experts: is that also work-related or more ‘just for fun’?
- Andrew
- Again, both. One of my current mathematical projects is about knots and links, and I got involved because someone wanted some particular links drawn because he thought one really needed to see the pictures and see them drawn well rather than just his hand-drawn sketches. So what started as a hobby – drawing nice pictures with TikZ – has become an active research project.
(I’ve linked to it before, but just for the fun of it: webpage
;) - Alan Munn
- One thing that often distinguishes your TikZ answers from others is your knowledge of the much lower level
pgf
layer of TikZ. What got you into that part (which most of us steer away from)?
- Andrew
- You’ve answered your own question! I like finding things that others don’t know – part of my mathematical heritage, I guess. It’s partly egoistical, but also because I want to be as helpful as I can, and simply repeating what everyone else knows isn’t all that helpful.
So I want to maximise the help I can give, and the best way to do it is to find something that not many others know about.
- N3buchadnezzar
- Also seeing you are quite well-versed in TikZ, and making figures, do you have any tips for beginners such as myself starting to learn TikZ?
- Andrew
- Ooof, that’s difficult. For me, it’s about the problem. I learn something when I have something that I want to do. So if I felt I wanted to learn a particular piece of TikZ (maybe a new library), I’d have to find some use for it. Otherwise, just reading the documentation and trying a couple of examples doesn’t get it properly into my head.
I think the main tips I’d give for learning TikZ are: 1) read the manual; 2) remember that the pictures are programmed, not drawn; 3) read the manual.
- Alan
- I think you also need to read the manual.
:)
- Werner
- I think we’re all still looking for the TikZ code that produced these pictures:
- Andrew
- The code for that is so embarrassingly awful that I’ve erased it from my hard drive. You’ll have to ask Matthew for that.
- percusse
- You have also a quite interesting collection of solutions that I like a lot (For those who have not yet encountered these goodies, the code repository in Launchpad). What kind of structure do you have in mind when you intend to create one of those? Or better how do you decide to start with one such solution? Even better, what do you eat for breakfast, man?
:-D
- Andrew
- Bran flakes.
Do you mean: how do I decide which solutions should end up as packages?
- percusse
- Yes, that’s a better wording.
- Andrew
- If I see the potential for a wider usage, then I start thinking about making it into a package. To actually get it into a CTAN-able form, it helps if there’s someone bugging me about it … I mean, someone who’s actually using it and has feedback about it.
- Joseph
- You’ve been on the site from day 1 (Andrew has user ID 86), and you were also one of the pro tem moderator team. What led you to the site so early, and how do you feel being a moderator was?
- Andrew
- I was on MathOverflow from fairly near the start and so learnt about the SE model, but also went through the SE1.0 saga and their conversion to SE2.0. So I was on the edge of the SE/SO community and kept an eye on the mysterious Area 51 looking for interesting proposals.
When I saw one about TeX then I thought that it was a fantastic idea as there was much about TeX and LaTeX that I didn’t know but wanted to know (I think that by then – my chronology may be out – that I’d already tried my hand at writing a PHP version of TeX) and given the importance of TeX for my work, I thought that if there was another SE site that I got involved with, TeX would have to be it.
- Joseph
- Ah yes, I remember mention of TeX-PHP: sounded (and still sounds) bonkers
:-)
- Andrew
- It was. Absolutely, utterly, completely Bonkers.
Its successor, PerlTeX, was equally bonkers.
But what isn’t quite so bonkers is my
internetclass. That’s working quite well, though there’s still a fair bit to do before it becomes usable by anyone other than me.
And I probably wouldn’t have gotten to that if I hadn’t realised the inanity of programming TeX in any other language than TeX. Again, earlier today I came across the thread where I mentioned those attempts and there is a fantastic comment/answer by Herbert about how easy it is to start but how somehow these implementations never get finished.
- Joseph
- Yup, see ExTeX (TeX in Java)
- Andrew
- (I’ve seriously considered a lua version of TeX … for the iPad)
- Joseph
- LuaLuaTeX?
- Andrew
- That would be deliciously Godelian.
Being a pro-tem moderator was good. It gave me a wider view of the site. One thing I would worry about with sites like this is the formation of cliques. Being a pro-tem moderator made me much more aware of what it’s like to be a newcomer to this place, and so more tolerant (in comparison to how I am on MathOverflow).
- N3buchadnezzar
- This might seem like quite the odd question, but hopefully not require you to write a book to answer it. What made you move to Norway, and why choose NTNU as your working place?
- Andrew
- Simple: job. More complicated: I had a post-doc here a few years ago and when one does a post-doc, location is very secondary – after all, if it’s awful you’re only going to be there for a year or so. But we liked it, and so when a job offer came up then we figured we may as well apply. It was the job I got, so it was the job I took.
- Paulo
- CTAN lists two packages of yours:
tqft
and
braids. Could you tell us a bit about those two packages?
:) - Andrew
- I guess those two were the easiest to get to a finished state. The “problem” each solves is fairly well constrained so there’s not the potential for continually thinking “I should just add one more feature …” (though there are some obvious ones that are still lacking). I’d like to get more finished: the TeX-SX launchpad shows quite a few potential packages, but I need some time to clean them up.
- Paulo
- You are close to 40k, 274 badges. What’s your secret?
:)
- Andrew
- Finding interesting problems.
If I get caught by a problem, it doesn’t let me go until I’ve solved it. I tell myself that I’ll probably want to know the answer myself one day so I’m sort of storing up ideas and techniques that I can call on when I have to. Whilst this is true, nothing beats the buzz of solving a Real Problem.
- Ryan Reich
- And to add to Paulo’s question: how do you do it without spending all your time on this site?
- Andrew
- Err … who says I don’t?
- Ryan
- Is TeX then as satisfying a source of Real Problems as math? You say you treat it as more than just a diversion or a utility.
- Andrew
- It’s different to math(s). With TeX, then the puzzles are like those mind-teasers in books: you know there’s an answer there somewhere, you just have to find it. I sometimes imagine Knuth chuckling to himself as we all try to solve these problems he’s left for us. Maths is open-ended and it’s just you against the universe. Sometimes that’s scary, and TeX is a safe haven.
- Ryan
- There is this interesting phenomenon of academics with a parallel career in pro bono TeX work. Is this happening to you?
- Andrew
- Not really. I do help out a bit round the department, if asked, but it’s a bit like being the only native English speaker – I get more than my fair share of translation requests, but then I balance that by asking for more than my fair share of translation into Norwegian.
- egreg
- Linking to Ryan’s question: don’t you think that a mathematician is always looking for interesting problems?
- Andrew
- Of course. But there’s a big difference between a problem where you know there’s an answer, you just can’t find it, and a problem where you don’t even know what the problem really is yet.
As a kid (and still now), I used to do a vast number of those logic puzzles. I’d say that they’re a bit like warm-up exercises: they keep the brain in shape for the real thing. TeX/LaTeX questions are a bit like that for me.
(Shame I’m not in my office – I’d take a photo of all the varieties of Rubik’s cube and other puzzles on my desk.)
- N3buchadnezzar
- Andrew do you have any other hobbies you mind sharing with us?
=)
- Andrew
- Well, the quip about children is fairly true: a lot of my old hobbies aren’t feasible with children around. I really like calligraphy, for example, but it’s hard to do calligraphy when your pens keep getting “borrowed”.
- Canageek
- Funny, my Dad gave up calligraphy when I was young as well.
- Andrew
- It’s definitely a pause for me. I’ll take it up again, and I still like doing birthday cards osv. But I used to write out poems for people (which is how I got into it: it’s much cheaper to make a calligraphic present than to buy something).
- Paulo
- How does your current keyboard layout look like? (Background: this question)
- Andrew
- Ah, I’m on my new Mac right now. I haven’t quite tamed the keyboard yet. I have defined new layouts, one of which is a TeX-based one, but I’ve not yet gotten straight how the interaction between normal-Mac and X11-Mac works.
- egreg
- Don’t worry: just know where the backslash and braces are.
- Andrew
- What makes it more confusing is that when I’m at work, I hook up my old USB keyboard and that seems to swap a load of keys around. But that keyboard will go by the board soon so I can’t be bothered to solve that problem.
- Canageek
- Might want to look at here.
- N3buchadnezzar
- DVORAK
:D
- Andrew
- I regard that as a bit like plain TeX. I can see the rationale, I can agree with the rationale, but until I really need to convert, the required activation energy is too high.
- Paulo
- Can you name something you really like in TeX/LaTeX? And is there something you dislike?
- Andrew
- Bran flakes.
Sorry, stalling for time!
TeX just fits in with my way of working: I’m a command line junkie (hate menus), and my slogan is that the computer should do what I want, not the other way around. With TeX and LaTeX, I get as close to that as possible for my documents. When I want to focus on the document, I can do so, and I don’t have to contend with it suddenly deciding to reformat all my tables or drop dead of myxomatosis (one for the proof-readers, I think [fixed! -AM])
Nothing springs to mind with regard to “dislike”.
- Ryan
- Plain TeX is quite different from LaTeX and what’s built on it: there is more of a focus on tricks and “wizardry” than on machinery. You’re obviously expert in (at least)
pgf
; do you consider yourself not a “wizard” even so?
- Andrew
- Isn’t the rule that you’re not a “wizard” until the current “wizards” regard you as one? (That’s certainly how it is for “mathematician”!). No, I still have a real sense that I’m a Cargo Cult TeXer. A lot of what I do is “cut-and-paste” coding with no real understanding of what’s going on underneath. I look at what some do and am left wondering how they knew that that was where the problem was.
It’s like when you take the car to the garage and after humming and hawing (and charging you loads for it), the mechanic turns one bolt and suddenly that strange rattling sound disappears. How they knew which bolt to turn is a mystery.
- egreg
- You mentioned Plain TeX. How’s it going with expl3?
- Andrew
- Now that I’ve actually had a proper go with it, I confess to really liking it.
It’s almost completely unlike any other programming language I’ve tried (well, it is TeX-based, I suppose) but there is a certain twisted logic to it that I found myself able to follow. When occasion demands, I’ll certainly use it again.
My experiences with LaTeX3 bring up something that I think is worth saying about this site. I would never have considered using LaTeX3 (or lualatex, which I used in another solution somewhere) if I hadn’t seen lots of answers using it and so gotten exposed to it in a more low-key way than if I were trying to actually use it. This place is great for finding out what TeX is capable of, without having to go looking for yourself.
- Canageek
- We have a simpler tests for chemists: How do you pronounce unionized?
- Andrew
- In knot theory you have to be able to draw a trefoil without thinking about it.
- Joseph
- I think you mentioned an upcoming sabbatical in Oxford: is that still on, and will a few of the UK-based TeX-sx regulars have a chance to meet you in person?
- Andrew
- Yes, we’re moving in just over a fortnight. The October meeting is in my head, I just need to get it into the calendar.
I intend to write lots of articles, which will mean that I’ll be using TeX/LaTeX even more and trying to do really weird stuff.
(I’m sure I’ve said this before: I once wrote an article in such a way that one could change a boolean at the start to flip all compositions from right to left, so that instead of
f \circ g (x)it became
(x) g f)
- Ryan
- Regarding exposure to new things, I can definitely point specifically at you for the motivation to start using TikZ.
- percusse
- I think it’s a good time about ask TikZ vs. PSTricks looks if Herbert is around…. How can you explain TikZ hanging in there (with great potential) while PSTricks has ridiculous power under the hood already regarding the 3D support, math engine etc. Is it just the pdflatexableness that makes the difference? (not to mention the fantastic manual of TikZ/PGF)
- Andrew
- That’s actually something that makes me a little nervous: the perceived rivalry between TikZ and pstricks. Maybe I’d feel a bit more settled if Herbert was less enigmatic, but I always have a worry that by saying how great I think TikZ is, I’ll annoy him.
Which is never my intent. I know a bit about TikZ, and having picked that up then it seems silly to learn another tool that has such a large overlap, particularly when there isn’t anything that I want to do that I can’t do with TikZ.
- percusse
- I meant quite the contrary. The rivalry is not defined in the question. I asked solely considering the recent popularity boost of TikZ-pgf while PSTricks is not so popular.
- Andrew
- I don’t know how to explain the perceived popularity of TikZ. Maybe, it’s actually a skewed perspective from the number of questions here: if it were easier to use, maybe we wouldn’t get so many questions! I can only say why I like it.
Whilst that’s partly a case of “It’s what I’m most used to”, it’s also the flexibility of the syntax. When I see a graphical question, I always think “There must be a way to do this with TikZ”. The simplicity and flexibility of the syntax are seductive: you end up thinking that anything is possible. Often, it isn’t, until you make it so.
- N3buchadnezzar
- Perhaps the fantastic manual has something to do with it ?
- Andrew
- Yes, it helps. Till Tantau (and the rest of the PGF and beamer teams) are to be commended for those. The tutorial sections are a brilliant idea, and they go to great lengths to explain how things work. So it’s never a case of “If you want this, type that”.
Mind you, these days
texdoc pgfis being overtaken by
kpseless tikz.code.tex - percusse
- Indeed 🙂
- Ryan
- Is it, then, a wizardry versus machinery thing?
- Andrew
- You mean that PGF seems like magic whereas PSTricks just gets the job done? I don’t know. I’ve never used PSTricks so I can’t say anything to compare them.
- Ryan
- Actually, I was thinking the other way around: is it that pgf is a big machine and pstricks is magic? But since neither of us has used pstricks I guess it’s a rhetorical question.
- Andrew
- Maybe. I don’t like using packages or code or mathematics that I don’t understand. I don’t need to feel that I could have written it, but I need to have a feel for what they do at a deeper level than “Type this to get that”.
Incidentally, Ryan, while you’re here:
trace-pgfkeysis absolutely fantastic.
- Ryan
- Thanks! Now that I am active again perhaps I will polish it up.
- Paulo
- Any new package in mind?
:)
- Andrew
- Plenty that I’d like to get finished off – knots, internet, matrices. I did some quiz cards the other day which involved hacking
pgfpages
to get the layout right so there’s a potential package there
pgfmorepages.
- Paulo
- What do you recommend for a newbie eager to learn TikZ? And LaTeX? 🙂
- Andrew
- If you’re a problem-solver, like me, find a problem to solve.
Other advice: look through people’s questions and answers on this site and read them properly. Take a look at how people attack a particular problem, find questions which make you think “How do you do that?” Or even, “Why would anyone want to do that?”.
There are some people whose answers I do my best to always look at because I know I’ll learn something by reading them, ditto some people with questions – asking a good question is at least as important as giving a good answer.
I think it’s important for us to remember that this is a public site – that there are more people involved in a Question-and-Answer exchange than just the original questioner and the few who answer. So adding that extra bit of explanation is really, really useful and something to be encouraged.
You never know who’s reading and who might get a flash of inspiration that will help them solve something they’ve been battering their head against for weeks.
Which gets me back to my picture of Knuth chuckling at us trying to solve the problems he’s set for us. I feel that with TeX, there’s a real feeling of everyone working together to produce the best documents (in the broadest sense of the word) possible and when someone writes a beautiful article, we’ve all won, no matter who contributed the necessary code.
I don’t think I’ve ever felt a competitiveness on the site where people try to outdo each other to prove that their answer is The Best Answer. Often we improve on each other’s answer, but when that happens I almost always see the original person comment something like “That’s a great addition, I was wondering how to do that but couldn’t see it.”
- egreg
- That’s probably an atmosphere that you and the others that founded the site contributed to create.
- Andrew
- I like to think that we helped, certainly when Joseph, Stefan, Konrad, and I were pro tem moderators then we were very conscious (spelling’s gone, must be too much tea) that we wanted to have a friendly place.
But I think that the nature of the game has a lot to do with it.
I just contrast myself with how I am on MathOverflow, for example. I’m much more strident and loud and belligerent there than I am here.
Almost no-one’s real-life reputation or job depends on how good they are with TeX, but there are a lot of people who use it every day and so want to make the best use of it that they can. Also, TeX has a reasonable “activation barrier”: it takes a step of courage to start using it, and I think we all remember just how scary that was so have some sympathy with people encountering it for the first time and saying “I have to type
\begin{center}just to get centred text?”
So we’re much more tolerant of new users than, say, mathematicians are of people encountering, say, infinity for the first time and thinking “Wow, what happens if I divide 1 by 0?”
- N3buchadnezzar
- What kind of adult beverages do you enjoy to indulge yourself on?
- Andrew
- Tea.
- N3buchadnezzar
- Not whiskey, nor coffee? Strange
- Joseph
- Ah, the cup that cheers
:-)
- N3buchadnezzar
- Well Andrew if I ever run into you at school, and I happen to carry some delicious cinnamon buns, I will be sure to give some to you. You deserve that, and much more for your amazing contributions to this site.
- Andrew
- Great! I’ll stop hiding behind the pillars when I see you, then.
- barbara beeton
- i’d like to go back to the question about TikZ and pstricks. i have the feeling that these days more people want to go directly to pdf, and it’s not obvious how to do that with pstricks.
- Andrew
- That’s probably got a fair bit of truth in it. I know that I regard PostScript as something deeply mysterious, a bit like algebraic geometry, so I use it if I really have to but only with a long rope so that I can find my way out again.
- percusse
- Indeed that’s one thing that crosses my mind but a simple google search is sufficient for that nowadays but I’m trying hard to see why even TikZ exists since PSTricks was, as far as I know, around when PGF project was initiated. I remember myself seeing wonderful gallery of PSTricks but reading TikZ manual. So porting everything to PDF might not be the original intention.
And I would love to understand the rationale behind these tools and the difficulty of different engines.
- Ryan
- Sounds like a candidate for our next 30-vote soft question!
- percusse
- that’s a call for comment wars
:)
Andrew, so relating the discussion to your fantastic answer to the MetaPost question, are you aware of a fundamental shortcoming of PGF framework that probably PSTricks offers and would not be imitated soon? And vice-versa of course….
- Andrew
- Short answer: No.
- percusse
-
\long\thanks:)
- Andrew
- Actually, that brings to mind the type of question that really, really irritates me! The ones that say “X can’t do Y, and it ought to be able to. Make it do so.” Where X could be anything, but TikZ and (La)TeX are common ones.
It’s the “ought” and “make” that really annoy me, not the wanting to make TeX do something it wasn’t designed for. I’m quite happy with that.
There was a question somewhere which led to me tracking down an old list by Till Tantau on what was lacking in PGF. But I think that’s out of date, now.
I do think that there’s great potential in mixing lua(la)tex with PGF.
- percusse
- Ah yes, I didn’t do justice by leaving the Lua part out.
- egreg
- That’s exactly what I was thinking: you can make MetaPost do the work, load the result and massage it with Lua to fetch it to PGF.
- Andrew
- But more than that. TeX is not … fantastic when it comes to mathematics, so you can palm off the heavy maths/programming stuff to Lua and read in the result.
Ages ago, I thought about ball-and-sticks pictures of chemicals, but getting the depth stuff was too much work. Then I did something similar in Lua (not TeX-related) where it was really quite straightforward. It would be great to bring the two together: get Lua to do the processing and TeX to do the rendering.
- egreg
- One answer might be “do like Jonathan Kew [author of XeTeX] did”.
:)
- Andrew
- (That was over my head, but a quick search put me right … yes, I’ll use that next time one of these questions comes up.)
- Ryan
- It sounds like you agree with the sentiments I expressed in my question here. At the risk of really really irritating you, ought TeX be a programming language in the first place? Is the programming inextricably linked with the typesetting?
- Andrew
- I think that programming is inevitable, but that might be the benefit of hindsight. I can’t imagine not being able to program within my articles any more.
- egreg
- That’s a big part of the fun, of course!
- Andrew
- I’m still “undecided” on the LaTeX3/Lua/something else stuff. A big part of me likes setting up a “world” and just exploring it with the rules as laid down. So that part says, “It’s TeX, deal with it.”. But then breaking or extending the “world” is also fun. The important thing is to know which you are doing. So when writing a package, I’ll try to be conventional and “play by the rules”, but in my own documents … well … I’d better not let the source of them see the light of day.
- Ryan
- Naturally it’s essential to be able to program inside a document. I meant to ask whether TeX should do that along side the typesetting part, or should offload it to (say) Lua. You seem to have answered that in the indecisive.
- Andrew
- Yes. I’m happy to do so myself (farm off to Lua), but I’d be reluctant to impose it on anyone else.
- David Carlisle
- so if you were planning this would you keep latex3 running on classic TeX or would you jump to luatex or xetex or phptex or something?
- Andrew
- “If I ruled the world, every day would be the first day of spring”
- David
- so, wet and cold then
- Andrew
- I think my best response to that is to say that when reading about “Who doesn’t use etex?”, I thought that I wouldn’t not use etex. It’d be nice if luatex got to the same stage: we were wondering “Who doesn’t use luatex?”
- Joseph
- No so straight-forward, and many, many years off
- Andrew
- I realise that. Which is why I’m glad I’m not “in charge”.
- Paulo
- Thank you very much for this great interview!
:)
- Andrew
- My pleasure.
- Ryan
- Thanks from me too.
- Paulo
- Thanks everybody!
- Andrew
- Yes, it was fun. Let’s do it again sometime!
—
Stay tuned for the next episode of *TeXtalk!*