Examples of TranslateHTMLToLatex


Examples of org.openiaml.docs.generation.TranslateHTMLToLatex

  public void testTranslateHTMLToLaTeX() throws Exception {
    File root = new File("../org.openiaml.model/model/docs/");
    assertTrue(root + " should exist", root.exists());
    assertTrue(root + " should be a directory", root.isDirectory());
   
    TranslateHTMLToLatex converter = new TranslateHTMLToLatex();
   
    // for each .html file
    for (File html : root.listFiles(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.toLowerCase().endsWith(".html");
      }} )) {

      // translate it
      System.out.println("Reading in " + html.getName() + "...");
      try {
        String output = converter.convertToTex(html);
     
        // write it out
        File tex = new File(html.getAbsolutePath().replace(".html", ".tex"));
        System.out.println("Writing to " + tex.getName() + "...");
       
View Full Code Here

Examples of org.openiaml.docs.generation.TranslateHTMLToLatex

   *
   * @throws Exception
   */
  public void testExpected() throws Exception {
 
    TranslateHTMLToLatex c = AllExpectedTests.getConverter();
   
    String inputText = TranslateHTMLToLatex.readFile(getInputFile());
    assertNotNull(inputText);
    String outputText = TranslateHTMLToLatex.readFile(getExpectedFile());
    assertNotNull(outputText);
    // replace \r\n with \n
    outputText = outputText.replace("\r\n", "\n");

    String result = c.convertToTex(getInputFile());
    assertStringEquals(outputText, result);

  }
View Full Code Here

Examples of org.openiaml.docs.generation.TranslateHTMLToLatex

   * Get the converter to test.
   *
   * @return
   */
  public static TranslateHTMLToLatex getConverter() {
    return new TranslateHTMLToLatex();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.