问题描述
使用通常被认为是排版语言的东西来做有趣的事情是可能的.例如,您可以使用后记来构造Mandelbrot集.
在此MathOverflow问题中,建议LaTeX可能是 Turing-complete .这意味着可以编写任意程序(尽管可能并不容易!).有人知道LaTeX中这种程序的任何具体示例吗,这在语言上有什么异常之处?
It is suggested in this MathOverflow question that LaTeX may be Turing-complete. This implies the ability to write arbitrary programs (although it may not be easy!). Does anyone know of any concrete example of such a program in LaTeX, which does something highly unusual with the language?
推荐答案
莫纳德阅读器 写道,要在TeX中实施ICFP竞赛(涉及火星漫游导航)的解决方案,并大量使用宏.有趣的是,排版时解决方案的输出是流动站路径的后记映射.
In issue 13 of The Monad Reader, Stephen Hicks writes about implementing the solution to an ICFP contest (involving Mars rover navigation) in TeX, with copious use of macros. Amusingly, the solution's output when typeset is a postscript map of the rover's path.
这篇关于我听说LaTeX已完成图灵设计.是否有用LaTeX编写的程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!