| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
1 <?php //$Id: filtersettings.php,v 1.1.2.2 2007/12/19 17:38:42 skodak Exp $ 2 3 require_once($CFG->dirroot.'/filter/tex/lib.php'); 4 5 $items = array(); 6 $items[] = new admin_setting_heading('filter_tex_latexheading', get_string('latexsettings', 'admin'), ''); 7 $items[] = new admin_setting_configtextarea('filter_tex_latexpreamble', get_string('latexpreamble','admin'), 8 '', " \\usepackage[latin1]{inputenc}\n \\usepackage{amsmath}\n \\usepackage{amsfonts}\n \\RequirePackage{amsmath,amssymb,latexsym}\n"); 9 $items[] = new admin_setting_configtext('filter_tex_latexbackground', get_string('backgroundcolour', 'admin'), '', '#FFFFFF'); 10 $items[] = new admin_setting_configtext('filter_tex_density', get_string('density', 'admin'), '', '120', PARAM_INT); 11 $items[] = new admin_setting_configtext('filter_tex_density', get_string('density', 'admin'), '', '120', PARAM_INT); 12 13 if (PHP_OS=='Linux') { 14 $default_filter_tex_pathlatex = "/usr/bin/latex"; 15 $default_filter_tex_pathdvips = "/usr/bin/dvips"; 16 $default_filter_tex_pathconvert = "/usr/bin/convert"; 17 18 } else if (PHP_OS=='Darwin') { 19 // most likely needs a fink install (fink.sf.net) 20 $default_filter_tex_pathlatex = "/sw/bin/latex"; 21 $default_filter_tex_pathdvips = "/sw/bin/dvips"; 22 $default_filter_tex_pathconvert = "/sw/bin/convert"; 23 24 } else if (PHP_OS=='WINNT' or PHP_OS=='WIN32' or PHP_OS=='Windows') { 25 // note: you need Ghostscript installed (standard), miktex (standard) 26 // and ImageMagick (install at c:\ImageMagick) 27 $default_filter_tex_pathlatex = "\"c:\\texmf\\miktex\\bin\\latex.exe\" "; 28 $default_filter_tex_pathdvips = "\"c:\\texmf\\miktex\\bin\\dvips.exe\" "; 29 $default_filter_tex_pathconvert = "\"c:\\imagemagick\\convert.exe\" "; 30 31 } else { 32 $default_filter_tex_pathlatex = ''; 33 $default_filter_tex_pathdvips = ''; 34 $default_filter_tex_pathconvert = ''; 35 } 36 37 $items[] = new admin_setting_configexecutable('filter_tex_pathlatex', get_string('pathlatex', 'admin'), '', $default_filter_tex_pathlatex); 38 $items[] = new admin_setting_configexecutable('filter_tex_pathdvips', get_string('pathdvips', 'admin'), '', $default_filter_tex_pathdvips); 39 $items[] = new admin_setting_configexecutable('filter_tex_pathconvert', get_string('pathconvert', 'admin'), '', $default_filter_tex_pathconvert); 40 41 foreach ($items as $item) { 42 $item->set_updatedcallback('filter_tex_updatedcallback'); 43 $settings->add($item); 44 } 45 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |