LaTex and Prolog code to allow calling Prolog from LaTeX