Exemple #1
0
 /**
  * Builds an instance of the translator which uses the specified latex formatter to generate a
  * proof for the specified trace.
  *
  * @param trace the trace describing the proof.
  * @param formatter the LaTeX formatter.
  */
 public LatexTranslator(Trace trace, _LatexCTreeFormatter formatter) throws TraceSupportException {
   super();
   if (trace.getStatus() != ProofSearchResult.SUCCESS)
     throw new TraceSupportException(
         TraceSupportMessageManager.getMsg(
             "latex.trace.is.not.a.proof", trace.getStatus().name()));
   if (!trace.isPruned())
     throw new TraceSupportException(
         TraceSupportMessageManager.getMsg("latex.trace.is.not.pruned"));
   this.trace = trace;
   this.formatter = formatter;
 }
Exemple #2
0
 private void generateTableauxStyle(PrintStream out) {
   out.print(LATEX_PREAMBLE);
   out.print(TAB_MACRO);
   String str = formatter.getPreamble();
   if (str != null) out.print(str);
   out.print(LATEX_BEGIN_DOCUMENT);
   str = formatter.getIntro();
   if (str != null) out.print(str);
   out.print(LATEX_BEGIN_PROOF);
   _AbstractGoal initialNodeSet = trace.getInitialNodeSet();
   _proofTableaux(out, trace.getProofSearchTree(), initialNodeSet);
   out.print(LATEX_END_PROOF);
   out.print(LATEX_END_COCUMENT);
 }