lib/LaTeXML/Post/TeXMath.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::TeXMath | #
3 # | Copy TeX as parallel Math | #
4 # |=====================================================================| #
5 # | Part of LaTeXML: | #
6 # | Public domain software, produced as part of work done by the | #
7 # | United States Government & not subject to copyright in the US. | #
8 # |---------------------------------------------------------------------| #
9 # | Bruce Miller <bruce.miller@nist.gov> #_# | #
10 # | http://dlmf.nist.gov/LaTeXML/ (o o) | #
11 # \=========================================================ooo==U==ooo=/ #
12  
13 # ================================================================================
14 # Trivial Math PostProcessor which supplies the TeX string
15 # ================================================================================
16  
17 package LaTeXML::Post::TeXMath;
18 use strict;
19 use warnings;
20 use LaTeXML::Common::XML;
21 use LaTeXML::Post;
22 use base qw(LaTeXML::Post::MathProcessor);
23  
24 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 # Top level
26 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
27  
28 our $lxMimeType = 'application/x-tex';
29  
30 sub convertNode {
31 my ($self, $doc, $xmath, $style) = @_;
32 my $math = $xmath->parentNode;
33 my $tex = $math && isElementNode($math) && $math->getAttribute('tex');
34 return { processor => $self, encoding => $lxMimeType, mimetype => $lxMimeType,
35 string => $tex }; }
36  
37 sub rawIDSuffix {
38 return '.tm'; }
39  
40 #================================================================================
41  
42 1;