version 1.170, 2014/12/14 02:43:59
|
version 1.172, 2017/01/04 19:54:47
|
Line 902 sub chemparse {
|
Line 902 sub chemparse {
|
my $formula = ''; |
my $formula = ''; |
foreach my $token (@tokens) { |
foreach my $token (@tokens) { |
if ($token eq '->' ) { |
if ($token eq '->' ) { |
$formula .= '<m>\ensuremath{\rightarrow}</m> '; |
if ($external::target eq 'web') { |
|
$formula .= '→ '; |
|
} else { |
|
$formula .= '<m>\ensuremath{\rightarrow}</m> '; |
|
} |
next; |
next; |
} |
} |
if ($token eq '<-' ) { |
if ($token eq '<-' ) { |
$formula .= '<m>\ensuremath{\leftarrow}</m> '; |
if ($external::target eq 'web') { |
|
$formula .= '← '; |
|
} else { |
|
$formula .= '<m>\ensuremath{\leftarrow}</m> '; |
|
} |
next; |
next; |
} |
} |
if ($token eq '<=>') { |
if ($token eq '<=>') { |
Line 1458 sub proper_path {
|
Line 1466 sub proper_path {
|
} |
} |
} |
} |
|
|
|
sub input_id { |
|
my ($part_id, $response_id, $textline_id) = @_; |
|
return 'HWVAL_'.$part_id.'_'.$response_id.'_'.$textline_id; |
|
} |
|
|