Closed denismaier closed 2 years ago
Use case: I'm thinking about converting my LaTeX training docs to context, but I'll need to have code examples in there and show the results.
You mean something like this TeX.SE example? This only shows the result, but you can show the results via \typebuffer
or using the vim
module for syntax highlighting.
Yes, that looks intersting. Thanks for the hint. So, you'll just need to define wrapper commands that will construct a valid latex document?
Yes. The way to think about it is as follows. The \start<filter>
... \stop<filter>
environment writes a file with the following content:
and then runs the filtercommand
. So, if you can generate a valid LaTeX file such that running pdflatex
gives you a cropped PDF, it is easy to include it back in ConTeXt.
Is it possible to process LaTeX fragments with this? Of course, I could use pandoc but that may add too much unnecessary complexity.