integr-abile / axessibility

LaTeX package that makes mathematical formulae accessible via screen reader and braille display
14 stars 13 forks source link

added $$ and $ replacement #7

Closed AlexandrKozlovskiy closed 4 years ago

AlexandrKozlovskiy commented 4 years ago

Added $$ and $ replacement in lua mode,including feature switch on or switch off this replacement and updated tests. It seems,that now with _ character and with macro commands all ok,but it should be additionally tested,especially $$ and $ replacement. In some cases,for example in verbatim,it's not need do this replacement,but now this version of package is not detect,if it's need do this replacement,or no,so in this moment user can switch on or switch off $$ and $ replacement itself,using special comand of this version of package. Of course we can redefine verbatim environment and switch off this replacement,if need,but we will have bug,if after ending of verbatim we will have $$ or $ at the same line,because after ending of verbatim and after switching on our replacement,probably,our callback get all line,so all $$ and $ will be replace even before ending of verbatim. To avoid this situation,line must ended by end of virbatim,and the next content must be in other line. But now,as i wrote,i not redefine verbatim.

bdoubrov commented 4 years ago

Mostly looks good to me. I would only suggest not to bother the user with the option of removing empty lines in the formula. They are actually not permitted. So, you can safely remove them by default without asking the user.

AlexandrKozlovskiy commented 4 years ago

But i fixed this in the latest commit.

bdoubrov commented 4 years ago

Excellent