Skip to content

Commit

Permalink
MDL-44925 fixup default settings in TeX filter
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jul 22, 2014
1 parent 82f88ca commit fce6c70
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions filter/tex/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,20 @@
$items[] = new admin_setting_configtext('filter_tex/latexbackground', get_string('backgroundcolour', 'admin'), '', '#FFFFFF');
$items[] = new admin_setting_configtext('filter_tex/density', get_string('density', 'admin'), '', '120', PARAM_INT);

$default_filter_tex_pathlatex = '';
$default_filter_tex_pathdvips = '';
$default_filter_tex_pathdvisvgm = '';
$default_filter_tex_pathconvert = '';
if (PHP_OS=='Linux') {
$default_filter_tex_pathlatex = "/usr/bin/latex";
$default_filter_tex_pathdvips = "/usr/bin/dvips";
$default_filter_tex_pathdvisvgm = "/usr/bin/dvisvgm";
$default_filter_tex_pathconvert = "/usr/bin/convert";

} else if (PHP_OS=='Darwin') {
// most likely needs a fink install (fink.sf.net)
$default_filter_tex_pathlatex = "/sw/bin/latex";
$default_filter_tex_pathdvips = "/sw/bin/dvips";
$default_filter_tex_pathdvisvgm = "/usr/bin/dvisvgm";
$default_filter_tex_pathconvert = "/sw/bin/convert";

} else if (PHP_OS=='WINNT' or PHP_OS=='WIN32' or PHP_OS=='Windows') {
Expand All @@ -54,12 +58,6 @@
$default_filter_tex_pathlatex = "\"c:\\texmf\\miktex\\bin\\latex.exe\" ";
$default_filter_tex_pathdvips = "\"c:\\texmf\\miktex\\bin\\dvips.exe\" ";
$default_filter_tex_pathconvert = "\"c:\\imagemagick\\convert.exe\" ";

} else {
$default_filter_tex_pathlatex = '';
$default_filter_tex_pathdvips = '';
$default_filter_tex_pathdvisvgm = '';
$default_filter_tex_pathconvert = '';
}

$items[] = new admin_setting_configexecutable('filter_tex/pathlatex', get_string('pathlatex', 'filter_tex'), '', $default_filter_tex_pathlatex);
Expand Down

0 comments on commit fce6c70

Please sign in to comment.