I've heard that LaTeX is Turing complete. Are there any programs written in LaTeX?

后端 未结 6 959
無奈伤痛
無奈伤痛 2021-01-30 03:43

It\'s possible to do interesting things with what would ordinarily be thought of as typesetting languages. For example, you can construct the Mandelbrot set using postscript.

6条回答
  •  你的背包
    2021-01-30 04:38

    The pgfmath library still amazes me. But on a more Turing-related note: it is possible to write an actual Turing machine in TeX, as per http://en.literateprograms.org/Turing_machine_simulator_(LaTeX). It's just a nifty way of using expansions in TeX.

    PostScript is Turing complete as well, if you'll read the manual you'll be amazed by the general programming capabilities of it (at least, I was).

提交回复
热议问题