mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
"FILTER/MDL-18230, remove hardcoded style for TeX formulas image, merged from 1.9"
This commit is contained in:
parent
37d975e11f
commit
e47d5adef3
@ -40,13 +40,24 @@ function string_file_picture_tex($imagefile, $tex= "", $height="", $width="", $a
|
||||
if($alt==='') {
|
||||
$alt=s($tex);
|
||||
}
|
||||
// Given the path to a picture file in a course, or a URL,
|
||||
// Given the path to a picture file in a course, or a URL,
|
||||
// this function includes the picture in the page.
|
||||
global $CFG;
|
||||
|
||||
$output = "";
|
||||
$origtex = $tex;
|
||||
$style = 'style="border:0px; vertical-align:'.$align.';';
|
||||
if ($align !== 'middle') {
|
||||
$style = ' style="vertical-align:'.$align.';';
|
||||
} else {
|
||||
$style = '';
|
||||
}
|
||||
if ($height) {
|
||||
$style .= " height:{$height}px;";
|
||||
}
|
||||
if ($width) {
|
||||
$style .= " width:{$width}px;";
|
||||
}
|
||||
$style .= '"';
|
||||
if ($tex) {
|
||||
$tex = str_replace('&','&',$tex);
|
||||
$tex = str_replace('<','<',$tex);
|
||||
@ -60,13 +71,6 @@ function string_file_picture_tex($imagefile, $tex= "", $height="", $width="", $a
|
||||
// code.
|
||||
$title = "title=\"$tex\"";
|
||||
}
|
||||
if ($height) {
|
||||
$style .= " height:{$height}px;";
|
||||
}
|
||||
if ($width) {
|
||||
$style .= " width:{$width}px;";
|
||||
}
|
||||
$style .= '"';
|
||||
if ($imagefile) {
|
||||
if (!file_exists("$CFG->dataroot/filter/tex/$imagefile") && has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
$output .= "<a href=\"$CFG->wwwroot/filter/tex/texdebug.php\">";
|
||||
|
@ -939,6 +939,10 @@ table.navbar {
|
||||
margin:0px;
|
||||
margin-left:0.5em;
|
||||
}
|
||||
.texrender {
|
||||
border:0px;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
|
Loading…
x
Reference in New Issue
Block a user