lib/LaTeXML/Post/LexMath.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 39 CC 1 SCAR 6.9
CC
1
Cov
0%
convertNode
2.0
rawIDSuffix
2.0
BEGIN
2.0
CRAP 2.0
1 # /=====================================================================\ #
2 # | LaTeXML::Post::LexMath | #
3 # | Copy Lexemes as parallel Math | #
4 # \=========================================================ooo==U==ooo=/ #
5  
6 # ================================================================================
7 # Trivial Math PostProcessor which supplies the lexemes string
8 # (if deposited in the lexemes attribute of the XMath)
9 # currently required to --preload=llamapun.sty to achieve that
10 # ================================================================================
11  
12 package LaTeXML::Post::LexMath;
13 use strict;
14 use warnings;
15 use LaTeXML::Common::XML;
16 use LaTeXML::Post;
17 use base qw(LaTeXML::Post::MathProcessor);
18  
19 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20 # Top level
21 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22  
23 our $lxMimeType = 'application/x-llamapun';
24  
25 sub convertNode {
26 my ($self, $doc, $xmath, $style) = @_;
27 my $math = $xmath->parentNode;
28 my $lexemes = $math && isElementNode($math) && $math->getAttribute('lexemes');
29 return { processor => $self, encoding => $lxMimeType, mimetype => $lxMimeType,
30 string => $lexemes }; }
31  
32 sub rawIDSuffix {
33 return '.lm'; }
34  
35 #================================================================================
36  
37 1;