Expose math lexemes in final output #947

Merged
merged 12 commits into from Jul 27, 2018

Conversation

Projects
None yet
2 participants
Collaborator

dginev added some commits Jul 9, 2018

 remove debug package 
 478644e 
 lint MathParser 
 810a861 

dginev reviewed Jul 9, 2018

 $text = 'Unknown' unless defined$text; my $lexeme =$role . ":" . $text . ":" . ++$i; $lexeme =~ s/\s//g; my$lexeme = $self->node_to_lexeme($node) . ":" . ++\$i;

dginev Jul 9, 2018

Collaborator

ah, I forgot I was reusing the method in the internal parse, I need to be a little more careful here - my font changes broke a test I'm afraid.

 keep node_to_lexeme experimental for now for more freedom 
 77acb29 
Collaborator

dginev commented Jul 9, 2018 • edited

 Removed a small hiccup, now fully separating the experimental lexeme syntax serialization from the internal parser lexemes. Could be cleaned further, but I prefer waiting for feedback. Tests should pass again.
Owner

brucemiller commented Jul 11, 2018

 Yeah, the font size stuff is silly! :> I'd thought there was the beginnings of a notion of math-meaningful font attributes, but can't quite find it. I do find the inverse: there's a couple of methods in Common::Font regarding "pursestyle", which give the parts of a font which are (presumably) not meaningful. Perhaps that's a good place to start with a new method to get the meaningful parts, which would be only family, series, shape, I guess.
 use only family, series and shape for Font-enhanced lexemes 
 ceb3c69 
Collaborator

dginev commented Jul 18, 2018

 Quick update here, as discussed, now explicitly only using the family, series and shape of the font, as relative to the default text font. The example from my previous comments with the direct sum now produces: italic-x SUMOP:direct-sum bold-italic-y RELOP:equals NUMBER:0  which seems quite reasonable.

brucemiller merged commit 44ecafb into brucemiller:master Jul 27, 2018 1 check passed

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details