Providing PDF evidence using Java (via LaTex?)

I am currently working on an automatic prototype of a theorem in Java.

I would like to provide this evidence as a PDF. Preferably, it will go something like LaTeX using proof.sty or qtree.sty . However, I read that rendering LaTeX code with Java can be a bit problematic .

In Java, proofs are proven by simple trees inspired by Haskell trees, like:

class Tree<A> {
  A       value;
  List<A> subForest;
}

Does anyone have any ideas on how best to do this?

Regarding a related note (i.e. solutions with the rest), what are the best methods for invoking an executable pdflatexfrom Java? (Regarding location, finding out whether or not there, etc.)

+3
source share
1 answer

You can use jproc to run pdflatex. It allows you to specify a timeout and take care of the processing of stdout and stderr, as well as interpret the return code. Make sure you run pdflatex with the -interaction = batchmode parameter, so it does not stop with every error. In addition, I would recommend using a template engine, such as speed or a line table, to create an input for latex. Alternatively, you can look at jlatexmath, the purpose of which is to offer java api to latex formulas.

+4
source

Source: https://habr.com/ru/post/1784595/


All Articles