This is a sort of continuation to this question. I would like to know how does LaTeX generate pictures with its 'picture' environment. Since TeX deals with typesetting and not with graphics, I suppose LaTeX uses METAPOST. So I guess once you ask it to compile, LaTeX translates the 'picture' code into METAPOST. Am I correct?

  • 1
    Latex does not use metapost. Picture is a fairly simple construction (though I don't know the details). Why do you want to know? Picture is not really relevant nowadays when we have tikz/pgf. Though there are certain things that are a he'll of a lot easier to do in metapost that in tikz/pgf – daleif Mar 19 '18 at 17:50
  • I have 'developing' in the back of my mind, that's why I ask strange questions. I am not that interested in 'driving the car' than knowing how does it work. – Lagrange.el.Ciencia Mar 20 '18 at 9:52

The standard picture mode places lines and small arcs and circles by using fonts with the relevant pieces. That is the reason for the slightly weird line syntax where you specify a fixed slope and a horizontal length, the slopes are constrained to the slopes of the available line segments in the fonts.

There are re-implementations for picture mode using pdf or postscript specials that allow a wider range of slopes and circles of larger sizes.

| improve this answer | |
  • Thanks for the answer. Is there any documentation about the internal works of 'picture' environment and the like? Where can I get detailed information? – Lagrange.el.Ciencia Mar 20 '18 at 9:47
  • 1
    @Lagrange.el.Ciencia yes sure: texdoc source2e or online at ctan.org/pkg/source2e chapter D ltpictur (page 343) – David Carlisle Mar 20 '18 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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