Beispiel #1
0
static int latex_compile_graph_page (void)
{
    char *fname;
    int err;

    /* ensure we don't get stale output */
    if (gpage.term == GP_TERM_EPS) {
	fname = gpage_fname(".ps", 0);
    } else {
	fname = gpage_fname(".pdf", 0);
    }

    gretl_remove(fname);

    err = latex_compile(gpage_tex_base);

    if (err == LATEX_ERROR) {
	char *fname = gpage_fname(".log", 0);

	view_file(fname, 0, 1, 78, 350, VIEW_FILE);
    }

    if (gpage.term == GP_TERM_EPS && !err) {
	err = dvips_compile(gpage_base);
    }    

    return err;
}
Beispiel #2
0
int main(int argc , char ** argv) {
  bool ok;
  const char * input_path = argv[1];
  const char  * tex_file = argv[2];
  test_work_area_type * work_area = test_work_area_alloc("latex-test");
  test_work_area_copy_parent_content(work_area , input_path );
  {
    bool in_place = false;
    latex_type * latex = latex_alloc( tex_file , in_place);
    ok = latex_compile( latex , true , true , true);
    test_assert_true( in_place == latex_compile_in_place( latex ));
    latex_free( latex );
    test_assert_true( ok );
  }

  {
    latex_type * latex = latex_alloc( tex_file , false );
    test_latex_link( latex );
    latex_free( latex );
  }

  {
    bool in_place = true;
    latex_type * latex = latex_alloc( tex_file , in_place);
    test_assert_true( in_place == latex_compile_in_place( latex ));
    test_latex_link( latex );
    latex_free( latex );
  }
  test_work_area_free(work_area);
  exit(0);
}
Beispiel #3
0
int main( int argc , char ** argv) {
  latex_type * latex = latex_alloc( argv[1] , false );

  latex_link_path( latex , "include/figs");
  if (latex_compile( latex , false , false ))
    printf("Have created pdf: %s \n",latex_get_target_file( latex ));
  else
    printf("Compilation failed - check directory: %s \n",latex_get_runpath( latex ));

  latex_free( latex );
}