diff --git a/lbu_files/Makefile.am b/lbu_files/Makefile.am index 36299352..c38a1d5c 100644 --- a/lbu_files/Makefile.am +++ b/lbu_files/Makefile.am @@ -24,6 +24,8 @@ lbu_files_DATA = \ nemeth.ctb \ nemeth.sem \ nemeth_edit.ctb \ + nemeth_edit_en_ueb_with_switch_indicators.ctb \ + nemeth_edit_en_us_with_switch_indicators.ctb \ nimas.cfg \ nimas.sem \ package.sem \ diff --git a/lbu_files/nemeth.ctb b/lbu_files/nemeth.ctb index 1a83daf6..31d51cb0 100644 --- a/lbu_files/nemeth.ctb +++ b/lbu_files/nemeth.ctb @@ -5,6 +5,7 @@ # # Copyright (C) 2004-2008 ViewPlus Technologies, Inc. www.viewplus.com # Copyright (C) 2004-2006 JJB Software, Inc. www.jjb-software.com +# Expanded and modified by Norbert Márkus (hamilfonz at gmail dot com), Hungary, 2023. # # This file is part of liblouis. # @@ -22,8 +23,61 @@ # License along with liblouis. If not, see # . -include en-chardefs.cti All character definition opcodes +space \x001b 1b escape character for html back-translation +include loweredDigits6Dots.uti +include latinLetterDef6Dots.uti +include latinUppercaseComp6.uti +replace \x00AF \x2015 +punctuation ( 12356 +punctuation } 12456 +punctuation ] 124567 +punctuation ? 1456 +punctuation : 156 +punctuation ) 23456 +punctuation ! 2346 +punctuation { 246 +punctuation [ 2467 +punctuation ' 3 +punctuation - 36 +punctuation . 46 +punctuation " 5 +punctuation ; 56 +punctuation , 6 +sign & 12346 +sign $ 1246 +sign | 1256 +sign \\ 12567 +sign % 146 +sign * 16 +sign # 3456 +punctuation ` 4 +sign _ 456 +sign ^ 457 +sign @ 47 +math = 123456 +math < 126 +math / 34 +math > 345 +math + 346 +math ~ 45 +punctuation : 456-25-0 +punctuation ; 456-23-0 + +math \x2218 45-46-16-5 degrees sign (actually a composit sign, in Braille shown in superscript) + +#Reversed the order of the two include lines below to give priority to the math character definitions include nemethdefs.cti +include en-chardefs.cti All character definition opcodes +attribute spacetildedotfive \x0020\x00A0~\x0022 +attribute rightbrace } +attribute mathdot \x00B7\x02D9\x22C5 +attribute greekletter abgdez:?jklmnxoprstuf&yw3 + +math \x00a8 16-16 DIAERESIS (double dots) in math expressions +math \x2322 1246-1 FROWN (CONCAVE UPWARD ARC) +math \x2323 1246-3 SMILE (CONCAVE DOWNWARD ARC) + +math \x0023 3456a pseudo hash mark for further processing # Braille indicators multind 56-6 letsign capsletter @@ -43,24 +97,22 @@ endcomp 456-156 prepunc " 236 postpunc " 356 -prepunc ' 6-236 -postpunc ' 356-3 postpunc , 6 +always \e0 5 always , 6-a -always # 35-2345 print number sign before number +#always # 35-2345 print number sign before number +always # 3456a number sign (hashmark) in print - a temporary representation for further processing decpoint . 46 hyphen - 36 postpunc . 456-256 endnum . 456-256 always . 256 -postpunc ; 456-23 -postpunc : 456-25 always ! 12346 factorial always < a-5-13-a always = a-46-13-a always > a-46-2-a postpunc ? 456-236 -endnum % 4-356 +#endnum % 4-356 always ~~ 4-156-5-4-156 always ~ 4-156 always & 456-12346 @@ -73,10 +125,11 @@ always @ 4-1 always \\ 456-16 always | 1256 always $ 4-234 +always \x2015 156 horizontal bar above accented centered repeated \s 0 noback context ["\x25A1"]$d @1246-256-5 noback context ["\x25A0"]$d @1246-456-256-5 -always \x00b0 45-46-16 +always \x00b0 45-46-16-5 #This is not a simple symbol. It contains a local superscript and a base-line suffix that may get removed if it is not needed always \x00B1 346-36 # semantic character pairs @@ -172,16 +225,17 @@ always ^| 1256 always ^/ 34 always ^* 16 repeated ^1 a - +always ^ 456-126 #default the CARET character to its Nemeth Braille representation if it has not been consumed as a prefix in the lines above +always % 4-356 #default the actual percent sign to its Nemeth Braille representation if it has not been consumed earlier # Function names and abbreviations always acos 1-14-135-234-a -always antilog 1-1345-2345-24-123-135-1234-a +always antilog 1-1345-2345-24-123-135-1245-a always arc 1-1235-14-a always arccos 1-1235-14-14-135-234-a always arg 1-1235-1245-a always asin 1-234-24-1345-a always atan 1-2345-1-1345-a -always colog 14-123-135-1245-a +always colog 14-123-135-1245 #-a always cos 14-135-234-a always cosh 14-135-234-125-a always cot 14-135-2345-a @@ -192,7 +246,7 @@ always csch 14-234-14-125-a always erf 15-1235-124-a always inf 24-1345-124-a always ln 123-1345-a -always log 123-135-1234-a +always log 123-135-1245 #-a always max 134-1-1346-a always min 134-24-1345-a always sec 234-15-14-a @@ -202,8 +256,12 @@ always sinh 234-24-1345-125-a always tan 2345-1-1345-a always tanh 2345-1-135-125-a always vers 1236-15-1235-234-a - - +always sgn 234-1245-1345-a +always tg 2345-1245-a +always ctg 14-2345-1245-a +always lg 123-1245-a +always arcsin 1-1235-14-234-24-1345-a +always arctg 1-1235-14-2345-1245-a # computer braille character sequences compbrl :// URLs @@ -226,22 +284,74 @@ compbrl .wav compbrl .tar compbrl .zip -# pass 2 corrections +# multipass corrections +#Process print number sign (hash mark) +noback pass2 [@3456a]$d @46-3456-3456 #a digit following a print hash mark needs its own Braille number sign +noback pass2 @3456a @46-3456 #produce a hash mark symbol when not followed by a number +#Fix the context of the hollow dot for its uses as degrees sign or composit operator +noback pass2 @45[@45-46-16-5]@5 * #remove the nesting superscript in cases the degrees sign happens to be in the correct syntax +noback pass3 $d@45-46-16[@5]@6-124 @a #insert space before the F for Fahrenheit +noback pass3 $d@45-46-16[@5]@6-14 @a #insert space before the C for Celsius +noback pass2 $l[@45-46-16-5]$l @46-16 #composit sign between two functions like f ring g # get rid of base-line ind. after subscripts -noback pass2 @56[$d1-5]@5!$d * -# insert another superscript ind. on doube superscripts -noback pass2 @45[]$d@5-5 @45 +#Handle stand-alone subscripts +noback pass2 @1b-12-56[]$d1-5@5-1b-15 @3456 +noback pass2 @1b-12-56[]$d1-5@5$s @3456 +noback pass2 $s@56[]$d1-5@5-1b-15 @3456 +noback pass2 $s@56[]$d1-5@5$s @3456 + +#handle prescribed subscripts +noback pass2 @1b-12-56$d1-5[@5]@45 ? #testing for a preceding letter won't work because the math start sign ends with letter b +noback pass2 @1b-12-56$d1-5[@5]@56 ? +noback pass2 @1b-12-56$d1-5[@5] @5 +noback pass3 @1b-12-56$d1-5[@5] @5 + +#Preserve the subscript ind. and the base-line ind. if the subscript is not preceded by a letter +#but remove the base-line ind. if the subscript is either followed by a superscript or a subscript +#Remove the subscript prefix if it is preceded by a letter or a letter and prime(s). +#But after this numeric subscript, do not remove the base-line ind. if it is followed by a number +noback pass2 @123-135-1245-56$d1-5[@5] @a #following a numeric subscript, introduce a space required for the function abbreviation (log) +#If the function "log" has a subscript or superscript, find the indication of its end (\e0 or quotation mark" and replace it with a dot 5 followed by a space +noback context "log"["^;"] @56#11=1 +noback context "log"["^~"] @45#11=1 +noback context #11=1["\e0"] #11=0@5-a +noback context #11=1["\""] #11=0@5-a + +#Handle when a letter has a prime or a double prime in superscript and something else in subscript (needs to be shown in reverse order in Nemeth) +noback context $l[]"^;"!$w1-100"~'^\"" #19=1@3 +noback context $l[]"^;"!$w1-100"~\x2032^\"" #19=1@3 +noback context $l[]"^;"!$w1-100"~''^\"" #18=1@3-3 +noback context $l[]"^;"!$w1-100"~\"^\"" #18=1@3-3 +noback context $l[]"^;"!$w1-100"~\x2033^\"" #18=1@3-3 +noback context #19=1["^~'^\""] #19=0@5 +noback context #19=1["^~\x2032^\""] #19=0@5 +noback context #18=1["^~''^\""] #18=0@5 +noback context #18=1["^~\"^\""] #18=0@5 +noback context #18=1["^~\x2033^\""] #18=0@5 +#Else replace \e0 with a dot 5 unconditionally +noback context "\e0" @5 +noback pass2 $l@56$d1-5[@5]!$d ? +noback pass2 $l@3-56$d1-5[@5]!$d ? +noback pass2 $l@3-3-56$d1-5[@5]!$d ? +noback pass3 $l[@56]$d1-5 ? +noback pass3 $l@3[@56]$d1-5 ? +noback pass3 $l@3-3[@56]$d1-5 ? + #get rid of extra baseline inds. -noback pass2 @5-5 @5 +noback pass4 @5-5 @5 noback pass2 @5-0 @0 +noback pass3 @5-0 @0 noback pass2 @5-a @a +noback pass3 @5-a @a noback pass2 @5-1b-15 @1b-15 -# get rid rid of superscript ind. on prime sign +noback pass3 @5-1b-15 @1b-15 +# get rid of superscript ind. on prime sign noback pass2 @45-3-5 @3 +noback pass2 @45-3-3-5 @3-3 # Put 456 in mixed numbers -noback pass2 $d[]@1456 @456 -noback pass2 @456-1456!$s3-8[]@3456 @456 +noback pass2 $d[]@1456 @456#1=1 +noback pass2 #1=1[]@3456 @456#1=0 # # Put number sign on numbers after spaces noback pass2 @a[]$d @3456 noback pass2 [@a-0]$d @a-3456 @@ -254,11 +364,52 @@ noback pass2 @0-a @a # fix anomaly with superscripts noback pass2 @45-0-5 @45 noback pass2 @45-5 @45 + +#Handle bold prefix on English and Greek lower-case and capital letters +#noback pass2 @456-56-46 @456-46 #remove English letter sign from before Greek letters +noback pass2 @456-56-46-6[%greekletter] @456-46-6* #remove the unnecessary English letter sign +noback pass2 @456-56-46-4[%greekletter] @456-46-4* #remove the unnecessary English letter sign +noback pass2 @456-56-46[%greekletter] @456-46* #remove the unnecessary English letter sign +noback pass2 @456-56-6$l * #English capital letter with bold prefix must remain unchanged +noback pass2 @456-56$l * #English lower-case letter must remain unchanged +noback pass2 @456-56 ? #Otherwise the prefix is removed + # Fix single letter and digit with overbar -noback pass2 @5$l[@126-12456] @156 -noback pass2 @5-6$l[@126-12456] @156 -noback pass2 [@5]!$s@156 @a +#noback pass2 @5$l[@126-12456] @156 +noback pass2 @5[$l]@126-156-12456 *@156 #English small letter +noback pass2 @5[@6$l]@126-156-12456 *@156 #English capital letter +noback pass2 @5[@456-56$l]@126-156-12456 *@156 #boldface English small letter +noback pass2 @5[@456-56-6$l]@126-156-12456 *@156 #boldface English capital letter +noback pass2 @5[@46%greekletter]@126-156-12456 *@156 #Greek small letter +noback pass2 @5[@46-4%greekletter]@126-156-12456 *@156 #Greek small letter math variant +noback pass2 @5[@46-6%greekletter]@126-156-12456 *@156 #Greek capital letter +noback pass2 @5-456-56[@46%greekletter]@126-156-12456 @456*@156 #boldface Greek small letter +noback pass2 @5-456-56[@46-4%greekletter]@126-156-12456 @456*@156 #boldface Greek small letter math variant +noback pass2 @5-456-56[@46-6%greekletter]@126-156-12456 @456*@156 #boldface Greek capital letter +noback pass2 @5[$d]@126-156-12456 *@156 #digit + +# Fix single letter and digit with bar directly under +noback pass2 @5[$l]@146-156-12456 *@146-156 #English small letter +noback pass2 @5[@6$l]@146-156-12456 *@146-156 #English capital letter + +noback pass2 @5[@456-56$l]@146-156-12456 *@146-156 #boldface English small letter +noback pass2 @5[@456-56-6$l]@146-156-12456 *@146-156 #boldface English capital letter +noback pass2 @5[@46%greekletter]@146-156-12456 *@146-156 #Greek small letter +noback pass2 @5[@46-4%greekletter]@146-156-12456 *@146-156 #Greek small letter math variant +noback pass2 @5[@46-6%greekletter]@146-156-12456 *@146-156 #Greek capital letter +noback pass2 @5-456-56[@46%greekletter]@146-156-12456 @456*@146-156 #boldface Greek small letter +noback pass2 @5-456-56[@46-4%greekletter]@146-156-12456 @456*@146-156 #boldface Greek small letter math variant +noback pass2 @5-456-56[@46-6%greekletter]@146-156-12456 @456*@146-156 #boldface Greek capital letter +noback pass2 @5[$d]@146-156-12456 *@146-156 + +#It is sufficient to indicate one dot above a series of digits if two or more consecutive digits each have a dot above +noback pass2 @5$d2-100@126[%mathdot2-100]@12456 @16 +#Fix the appearance of double dots in overscript or underscript +noback pass2 @126[@456-256-456-256]@12456 @16-16 +noback pass2 @146[@456-256-456-256]@12456 @16-16 + noback pass2 @46-a @456-256 +noback pass2 [@456-256]@5$d @46 # get rid of space for overscripts noback pass2 @126-a @126 noback pass2 @146-a @146 @@ -268,17 +419,85 @@ noback pass2 @a-12456 @12456 # fix complex fraction begin and end (not perfectly) noback pass2 @1456-1456 @6-1456-1456 noback pass2 @3456-3456 @3456-6-3456 + +#Insert the missing space for "lim" after the termination of the "directly under" passage +noback context []"^\"lim^%"!$x1-100"}" #20=1 +noback context #20=1["^}"] #20=0@12456-a # Fix lim with overbar sign noback pass2 @5-123-24-134-126-12456 @126-123-24-134 +#Fix the modified right arrow: use the full form of the arrow and move its surrounding spaces outside the five-step modification structure +noback context ["^\"\x2192^<"] #21=1@a-5-1246-25-25-135-126 #when something is placed over the arrow +noback context ["^\"\x2192^%"] #21=1@a-5-1246-25-25-135-146 #when something is placed under the arrow +noback context #21=1["^}"] #21=0@12456-a #the space is moved beyond the termination of the modification # Get rid of open paren before matrices noback pass2 @12356-4-6-12356 @4-6-12356 noback pass2 @1256-4-6-12356 @4-6-12356 # take off baseline ind. comma space noback pass2 [@5-6]!$l @6 noback pass2 @1b-12[]$d @3456 number sign before digit at beginning +noback pass2 @1b-12[]@5$d @3456 +noback pass2 $s[]@5$d @3456 +noback pass3 @1b-12[]$d @3456 noback pass2 @1b-12-36[]$d @3456 number sign before minus before digit at beginning +noback pass2 @1b-12-5-36[]$d @3456 +noback pass2 @1b-12-36[]@5$d @3456 +noback pass2 $s@5-36[]$d @3456 +noback pass2 $s@36[]@5$d @3456 +noback pass3 @1b-12-36[]$d @3456 noback pass2 [@12e]$d @3456 noback pass2 [@12e-36]$d @36-3456 noback pass2 [@12e-46]$d @3456-46 noback pass2 @12e ? noback pass2 @15e ? +#Remove space from behind colon or semicolon when followed by other than a number +noback pass2 @456-25[@0]!$d ? +noback pass2 @456-23[@0]!$d ? +#Insert space between {} for the empty set +noback pass2 @46-12356[]@46-23456 @a +#Remove space between a grouping symbol and a horizontal ellipsis +noback pass2 @46-46-12356[@0]@3-3-3 ? +noback pass2 @46-12356[@0]@3-3-3 ? +noback pass2 @4-12356[@0]@3-3-3 ? +noback pass2 @12356[@0]@3-3-3 ? +noback pass2 @3-3-3[@0]@46-46-23456 ? +noback pass2 @3-3-3[@0]@46-23456 ? +noback pass2 @3-3-3[@0]@4-23456 ? +noback pass2 @3-3-3[@0]@23456 ? + +#function names with superscript, remove the space from before the superscript prefix +noback pass2 @1-14-135-234[@a]@45 ? #acos +noback pass2 @1-1345-2345-24-123-135-1245[@a]@45 ? #antilog +noback pass2 @1-1235-14[@a]@45 ? #arc +noback pass2 @1-1235-14-14-135-234[@a]@45 ? #arccos +noback pass2 @1-1235-1245[@a]@45 ? #arg +noback pass2 @1-234-24-1345[@a]@45 ? #asin +noback pass2 @1-2345-1-1345[@a]@45 ? #atan +noback pass2 @14-135-123-135-1245[@a]@45 ? #colog +noback pass2 @14-135-234[@a]@45 ? #cos +noback pass2 @14-135-234-125[@a]@45 ? #cosh +noback pass2 @14-135-2345[@a]@45 ? #cot +noback pass2 @14-135-2345-125[@a]@45 ? #coth +noback pass2 @14-135-1236-15-1235-234[@a]@45 ? #covers +noback pass2 @14-234-14[@a]@45 ? #csc +noback pass2 @14-234-14-125[@a]@45 ? #csch +noback pass2 @15-1235-124[@a]@45 ? #erf +noback pass2 @24-1345-124[@a]@45 ? #inf +noback pass2 @123-1345[@a]@45 ? #ln +noback pass2 @123-135-1245[@a]@45 ? #log +noback pass2 @134-1-1346[@a]@45 ? #max +noback pass2 @134-24-1345[@a]@45 ? #min +noback pass2 @234-15-14[@a]@45 ? #sec +noback pass2 @234-15-14-125[@a]@45 ? #sech +noback pass2 @234-24-1345[@a]@45 ? #sin +noback pass2 @234-24-1345-125[@a]@45 ? #sinh +noback pass2 @2345-1-1345[@a]@45 ? #tan +noback pass2 @2345-1-1345-125[@a]@45 ? #tanh +noback pass2 @1236-15-1235-234[@a]@45 ? #vers +noback pass2 @234-1245-1345[@a]@45 ? #sgn +noback pass2 @123-1245[@a]@45 ? #lg +noback pass2 @2345-1245[@a]@45 ? #tg with superscript +noback pass2 @14-2345-1245[@a]@45 ? #ctg with superscript +noback pass2 @1-1235-14-234-24-1345[@a]@45 ? #arcsin with superscript +noback pass2 @1-1235-14-2345-1245[@a]@45 ? #arctg with superscript + +noback pass4 [$s]$s ? diff --git a/lbu_files/nemeth.sem b/lbu_files/nemeth.sem index 8abeff18..8fbff3f8 100644 --- a/lbu_files/nemeth.sem +++ b/lbu_files/nemeth.sem @@ -1,6 +1,7 @@ # Licensed under LGPL # Updated 6-18-08 by Mike Sivill +# Updated and modified by Norbert Márkus (hamilfonz at gmail dot com), Hungary, 2023. # You must edit this file as explained in the documentation to get # proper output. @@ -10,6 +11,7 @@ maligngroup maligngroup malignmark malignmark math math \eb,\*\ee menclose menclose +mfrac mfrac,bevelled,true ^?,^_/,^# mfrac mfrac ^?,/,^# mfenced mfenced ^(,^) mfenced mfenced,open,{ ^{,^} @@ -27,13 +29,16 @@ ms ms mspace mspace msqrt msqrt ^>,\*^} mstyle mstyle -msub msub ,^;,^" +#There is an escape sequence instead of The dot 5 at the end +msub msub ,^;,\e0 msubsup msupsup ,^~,^~^~,^" msubsup msubsup ,^;,^~,^" -msup msup ,^~,^" +#There is an escape sequence instead of The dot 5 at the end +msup msup ,^~,\e0 matrix mtable mtd mtd \*\ec -mtext mtext +#text items are surrounded by a preceding and a trailing space and receive a single-word switch indicator +mtext mtext \s^\,^',\s mtr mtr ^`^\,^(,\*^`^\,^)\er munder munder ^",^%,^} munderover munderover ^",^%,^<,^} @@ -101,7 +106,7 @@ skip mphantom no mo,maxsize no mo,maxsize,3 no mo,mathsize -no mi,mathvariant +mi mi,mathvariant,bold ^_^; no mo,mathvariant no munder,accentunder no mn,mathvariant diff --git a/lbu_files/nemeth_edit.ctb b/lbu_files/nemeth_edit.ctb index 6ae8296f..3cf658cd 100644 --- a/lbu_files/nemeth_edit.ctb +++ b/lbu_files/nemeth_edit.ctb @@ -1,4 +1,9 @@ # liblouis Table for Post-Translation Editing +#Use it for EBAE literary texts surrounding Nemeth math blocks +#Typical usecase: +# mathtextTable en-us-g1.ctb or en-us-g2.ctb +# mathexprTable nemeth.ctb +# editTable nemeth_edit.ctb # # Based on the Linux screenreader BRLTTY, copyright (C) 1999-2006 by # The BRLTTY Team @@ -22,19 +27,46 @@ # License along with liblouis. If not, see # . +#liblouisutdml inserts a space before and after each math block to separate it from the literary text. +#Such spaces are often undesirable, e.g., for punctuation and grouping symbols around the math blocks. +#In many cases these signs do not take their most appropriate forms as the math blocks +#are not yet present at the stage of literary Braille translation. +#This table makes a limited attempt to reconstruct the most likely form of some of the signs +#directly preceding or following a math block and to decide which of the automatically added spaces +#are to be kept or removed. + include en-chardefs.cti +#remove any extra spaces added by shapes or ellipses at the beginning of Nemeth blocks +noback correct "\eb\s" "\eb" repeated \s 0 -always \ee\s`4 456-256 -always \ee\s`1 6 -always \ee\s`3 456-25 -always \ee\s`2 456-23 -always `7\s\eb 12356 -always \ee\s`7 23456 +#corrections after the math blocks +always \ee\s,8;s 456-3-234 plural or possessive +always \ee\s`4 456-256 period +always \ee\s`6 456-235 exclamation point +#Try to detect whether the math excerpt is preceded and followed by double quotes and then restore the ending quotation mark. +noback context ["`8\s\eb"] #1=1@236 +noback context #1=1["\ee\s`8"] #1=0@456-356 +#Otherwise consider it as a question mark following the Nemeth block +always \ee\s`8 456-236 +#Try to detect whether the math excerpt is preceded and followed by single quotes (apostrophe) and then restore the ending single quotation mark. +noback context ["`'\s\eb"] #2=1@6-236 +noback context #2=1["\ee\s`'"] #2=0@456-356-3 +#Otherwise consider it as an apostrophe following the Nemeth block +always \ee\s`' 456-3 +always \ee\s`1 6-0 comma after the math block +#prevent the first two cells of a percent sign from being treated as a prefixed colon after the math block +always \ee\s`3p 0-4-25-1234 +always \ee\s`3 456-25 colon +always \ee\s`2 456-23 semicolon +always `7\s\eb 12356 left parenthesis before math block +always \ee\s`7' 0-4-2356-3 right bracket after math block +always \ee\s`72 0-4-2356-23 right brace after math block +always \ee\s`7 23456 right parenthesis after math block always "\s 0 -always \s,\s 6-0 -noback context "\eb"[]$l"\ee" @56 -noback context "\eb"[]","$l"\ee" @56 +always \s,\s 6-0 use a Nemeth comma +noback context "\eb"[]$l"\ee" @56 add a letsign (letter prefix) when the math block contains a single letter only +noback context "\eb"[]","$l"\ee" @56 add a letsign to a single capital letter making up the math block -noback pass2 @1b-12 ? -noback pass2 @1b-15 ? +noback pass2 @1b-12 ? remove the escape sequences for the beginning of math blocks +noback pass2 @1b-15 ? remove the escape sequences for the end of math blocks noback pass2 @1b-12-4-4 @4 diff --git a/lbu_files/nemeth_edit_en_ueb_with_switch_indicators.ctb b/lbu_files/nemeth_edit_en_ueb_with_switch_indicators.ctb new file mode 100644 index 00000000..66d8bc2a --- /dev/null +++ b/lbu_files/nemeth_edit_en_ueb_with_switch_indicators.ctb @@ -0,0 +1,205 @@ +# liblouis Table for Post-Translation Editing +#Use it for UEB literary texts surrounding Nemeth math blocks +#Typical usecase: +# mathtextTable en-ueb-g1.ctb or en-ueb-g2.ctb +# mathexprTable nemeth.ctb +# editTable nemeth_edit_en_ueb_with_switch_indicators.ctb +# +# Based on the Linux screenreader BRLTTY, copyright (C) 1999-2006 by +# The BRLTTY Team +# +# Copyright (C) 2004-2006 ViewPlus Technologies, Inc. www.viewplus.com +# Copyright (C) 2004-2006 JJB Software, Inc. www.jjb-software.com +# Copyright (C) 2023 Norbert Márkus (hamilfonz at gmail dot com), +# Hungary +# +# This file is part of liblouis. +# +# liblouis is free software: you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 2.1 of the +# License, or (at your option) any later version. +# +# liblouis is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with liblouis. If not, see +# . + +#liblouisutdml inserts a space before and after each math block to separate it from the literary text. +#Such spaces are often undesirable, e.g., for punctuation and grouping symbols around the math blocks. +#In many cases these signs do not take their most appropriate forms as the math blocks +#are not yet present at the stage of literary Braille translation. +#This table makes a limited attempt to reconstruct the most likely form of some of the signs +#directly preceding or following a math block and to decide which of the automatically added spaces +#are to be kept or removed. + +include en-chardefs.cti +#helps decide whether a preceding space can be removed +attribute herethisisapunctuation 432 +#when followed by these below, the ones above are punctuations rather than contractions +attribute thecharbeforeitisnotacontraction \x0023-'0 +#single-cell signs that may follow a seqafterpattern +attribute wordfinalpunctuation 1234680- +#used to reduce the number of rules dealing with the seqafterpatterns 're and 've +attribute RorV rv +#remove an extra space added by an ellipsis, shape, etc. at the beginning of the math block following the switch indicator +noback correct "\eb\s" "\eb" +repeated \s 0 +#unconditionally remove the space before punctuation following a math block +always \ee\s6 1b-15-235 exclamation point +always \ee\s1 1b-15-2 comma +always \ee\s.0 1b-15-46-356 percent sign +always \ee\s- 1b-15-36 hyphen +always \ee\s,- 1b-15-6-36 long dash +always \ee\s",- 1b-15-5-6-36 horizontal line +always \ee\s.- 1b-15-46-36 underline +always \ee\s"9 1b-15-5-3 asterisk +always \ee\s44 1b-15-256-256 +#conditional treatment of punctuation and spacing following a math block +#question mark +noback context "\ee"["\s;8"]$s @236 drop the grade-1 prefix +noback context "\ee\s;8"~ @1b-15-236 +always \ee\s;8 1b-15-56-236 keep the prefix +#period +always \ee\s;4 1b-15-56-256 preserve the grade-1 prefix +noback context "\ee"["\s4"]$s @256 +noback context "\ee\s4"~ @1b-15-256 +#colon +always \ee\s;3 1b-15-56-25 preserve the grade-1 prefix +noback context "\ee"["\s3"]$s @25 +noback context "\ee\s3"~ @1b-15-25 +#semicolon +noback context "\ee"["\s;2"]$s @23 drop the grade-1 prefix +noback context "\ee\s;2"~ @1b-15-23 drop the prefix +always \ee\s;2 1b-15-56-23 keep the prefix +#common rules for periods, colons and semicolons +#drop the space if $w below is a punctuation rather than a contraction +noback context "\ee"["\s"]$w$x ? $w cannot be a contraction here because of $x +noback context "\ee"["\s"]$w",7" ? followed by quotation mark +noback context "\ee"["\s"]$w"`>" ? right angle bracket +noback context "\ee"["\s"]$w"\">" ? right parenthesis +noback context "\ee"["\s"]$w".>" ? right bracket +noback context "\ee"["\s"]$w"_>" ? right brace +noback context "\ee"["\s"]$w"`.>" ? end of transnote +noback context "\ee"["\s"]$w",0" ? right single quote +noback context "\ee"["\s"]$w"\"9" ? asterisk +noback context "\ee"["\s"]$w",-" ? long dash +noback context "\ee"["\s"]$w"\",-" ? horizontal line +noback context "\ee"["\s"]$w".-" ? underline +#conditional treatment of grouping symbols and spacing +#opening apostrophe before a math block +noback context $s["'\s"]"\eb" @6-236 +#noback context `["'\s\eb"] @6-236-1b-12 #the ` operand doesn't seem to work +noback context ",7"["'\s"]"\eb" @6-236 preceded by quotation mark +noback context "\"<"["'\s"]"\eb" @6-236 left parenthesis +noback context ".<"["'\s"]"\eb" @6-236 left bracket +noback context ["`_<'\s\eb"] * preserve the apostrophe and space, this is not a grouping symbol: normal subgroup +noback context ["__<'\s\eb"] * preserve the apostrophe and space: normal subgroup or equal +noback context "_<"["'\s"]"\eb" @6-236 preceded by left brace +noback context "`.<"["'\s"]"\eb" @6-236 beginning of transnote +noback context ",8"["'\s"]"\eb" @6-236 left single quote +noback context $a["'\s"]"\eb" @3-0 in any other case preserve the apostrophe and space +noback context ["'\s"]"\eb" @6-236 #assumed to be a single quote at the beginning of the string +#closing apostrophe after a math block +noback context "\ee"["\s'"]$s @6-356 +noback context "\ee"["\s'"]~ @6-356 +noback context "\ee"["\s'"]",7" @6-356 followed by quotation mark +noback context "\ee"["\s'"]"\">" @6-356 right parenthesis +noback context "\ee"["\s'"]".>" @6-356 right bracket +noback context "\ee"["\s'"]"_>" @6-356 right brace +noback context "\ee"["\s'"]"`.>" @6-356 end of transnote +noback context "\ee"["\s'"]",0" @6-356 right single quote +#opening quotation mark before a math block +noback context $s[",7\s"]"\eb" @236 +#noback context `[",7\s\eb"] @236-1b-12 #the ` operand does not appear to be working +noback context "\"<"[",7\s"]"\eb" @236 +noback context ".<"[",7\s"]"\eb" @236 +noback context ["`_<,7\s\eb"] * preserve the general quotation mark and space +noback context ["__<,7\s\eb"] * keep it as it is +noback context "_<"[",7\s"]"\eb" @236 preceded by left brace +noback context "`.<"[",7\s"]"\eb" @236 beginning of transnote +noback context ",8"[",7\s"]"\eb" @236 left single quote +noback context $a[",7\s"]"\eb" @6-2356-0 in any other case keep it as it is +noback context [",7\s"]"\eb" @236 #assumed to be a left quotation mark at the beginning of the string +#closing quotation mark after a math block +noback context "\ee"["\s,7"]$s @356 +noback context "\ee"["\s,7"]~ @356 +noback context "\ee"["\s,7"]"\">" @356 +noback context "\ee"["\s,7"]".>" @356 +noback context "\ee"["\s,7"]"_>" @356 +noback context "\ee"["\s,7"]"`.>" @356 +noback context "\ee"["\s,7"]",0" @356 +#unconditionally remove the space adjacent to grouping symbols and others +#before a math block +always _`<\s\eb 456-4-126-0-1b-12 preserve the space, this isn't a grouping symbol: less than or equal to +always .`<\s\eb 46-4-126-0-1b-12 keep the space: much less than +always `<\s\eb 4-126-1b-12 can be a left angle bracket +always .<\s\eb 46-126-1b-12 left bracket +always `.<\s\eb 4-46-126-1b-12 beginning of transnote +always ,-\s\eb 6-36-1b-12 preceding long dash +always ",-\s\eb 5-6-36-1b-12 horizontal line +always ~.-\s\eb 45-46-36-0-1b-12 keep the space, this isn't an underline: low tone +always .-\s\eb 46-36-1b-12 underline +always _-\s\eb 456-36-0-1b-12 keep the space: minus or plus +always #-\s\eb 3456-36-0-1b-12 keep the space, this isn't a hyphen: uptack or perpendicular +always -\s\eb 36-1b-12 hyphen +always ~;8\s\eb 45-56-236-1b-12 inverted question mark +always ~;6\s\eb 45-56-235-1b-12 inverted exclamation point +always `s\s\eb 4-234-1b-12 Dollar sign +always `l\s\eb 4-123-1b-12 Pound +always `y\s\eb 4-13456-1b-12 Yen +always `f\s\eb 4-124-1b-12 Franc +always `n\s\eb 4-1345-1b-12 Naira +always `e\s\eb 4-15-1b-12 Euro +always `_<\s\eb 4-456-126-0-1b-12 keep the space, not a left brace: normal subgroup +always __<\s\eb 456-456-126-0-1b-12 keep the space, not a left brace: normal subgroup or equal +always _<\s\eb 456-126-1b-12 left brace +always "<\s\eb 5-126-1b-12 left parenthesis +#grouping and others after a math block +always \ee\s"> 1b-15-5-345 right parenthesis +always \ee\s.> 1b-15-46-345 right bracket +always \ee\s_> 1b-15-456-345 right brace +always \ee\s`>`: 1b-15-0-4-345-4-156 keep the space, not a right angle bracket: not greater than +always \ee\s`> 1b-15-4-345 can be a right angle bracket +always \ee\s`.> 1b-15-4-46-345 end of transnote +always \ee\s`c 1b-15-4-14 Cent sign +#handle seqafterpatterns following a math block +always \ee\s';s 1b-15-3-234 +always \ee\s';d 1b-15-3-145 +always \ee\s';ll 1b-15-3-123-123 +#More seqafterpatterns +noback context "\ee"["\s"]"'"$z"e\s" ? where $z either represents the letter r or v +noback context "\ee"["\s"]"'"$z"e"~ ? +noback context "\ee"["\s"]"'"$z"e"$y1-10~ ? +noback context "\ee"["\s"]"'"$z"e"$y1-10"\s" ? +noback context "\ee"["\s"]"'"$z"e,7" ? +noback context "\ee"["\s"]"'"$z"e\">" ? +noback context "\ee"["\s"]"'"$z"e`>" ? +noback context "\ee"["\s"]"'"$z"e.>" ? +noback context "\ee"["\s"]"'"$z"e_>" ? +noback context "\ee"["\s"]"'"$z"e`.>" ? +noback context "\ee"["\s"]"'"$z"e,0" ? +noback context "\ee"["\s"]"'"$z"e\"9" ? +noback context "\ee"["\s"]"'"$z"e,-" ? +noback context "\ee"["\s"]"'"$z"e\",-" ? +noback context "\ee"["\s"]"'"$z"e.-" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10",7" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10"\">" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10"`>" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10".>" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10"_>" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10"`.>" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10",0" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10"\"9" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10",-" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10"\",-" ? +noback context "\ee"["\s"]"'"$z"e"$y1-10".-" ? + +#noback context "\eb"[]$l"\ee" @56 +#noback context "\eb"[]","$l"\ee" @56 +noback pass2 @1b-12 @456-146-0 #Nemeth block start indicator +noback pass2 @1b-15 @0-456-156 Nemeth block end indicator diff --git a/lbu_files/nemeth_edit_en_us_with_switch_indicators.ctb b/lbu_files/nemeth_edit_en_us_with_switch_indicators.ctb new file mode 100644 index 00000000..491abf67 --- /dev/null +++ b/lbu_files/nemeth_edit_en_us_with_switch_indicators.ctb @@ -0,0 +1,80 @@ +# liblouis Table for Post-Translation Editing +#with Nemeth switch indicators added +# +#Use it for EBAE literary texts surrounding Nemeth math blocks +#Typical usecase: +# mathtextTable en-us-g1.ctb or en-us-g2.ctb +# mathexprTable nemeth.ctb +# editTable nemeth_edit_en_us_with_switch_indicators.ctb +# +# Based on the Linux screenreader BRLTTY, copyright (C) 1999-2006 by +# The BRLTTY Team +# +# Copyright (C) 2004-2006 ViewPlus Technologies, Inc. www.viewplus.com +# Copyright (C) 2004-2006 JJB Software, Inc. www.jjb-software.com +# Copyright (C) 2023 Norbert Márkus (hamilfonz at gmail dot com), +# Hungary +# +# This file is part of liblouis. +# +# liblouis is free software: you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 2.1 of the +# License, or (at your option) any later version. +# +# liblouis is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with liblouis. If not, see +# . + +#This table marks the beginning and end of math blocks with Nemeth switch indicators. +#The switch indicators help distinguish literary text from technical content. +# +#liblouisutdml inserts a space before and after each math block to separate it from the literary text. +#Such spaces are often undesirable, e.g., for punctuation and grouping symbols around the math blocks. +#In many cases these signs do not take their most appropriate forms as the math blocks +#are not yet present at the stage of literary Braille translation. +#This table makes a limited attempt to reconstruct the most likely form of some of the signs +#directly preceding or following a math block and to decide which of the automatically added spaces +#are to be kept or removed. + +include en-chardefs.cti +#remove any extra spaces added by shapes or ellipses at the beginning of Nemeth blocks +noback correct "\eb\s" "\eb" +repeated \s 0 +#corrections after the math blocks +always \ee\s`4 1b-15-256 period +always \ee\s`6 1b-15-235 exclamation point +#Try to detect whether the math excerpt is preceded and followed by double quotes and then restore the ending quotation mark. +noback context ["`8\s\eb"] #1=1@236-1b-12 +noback context #1=1["\ee\s`8"] #1=0@1b-15-356 +#Otherwise consider it as a question mark following the Nemeth block +always \ee\s`8 1b-15-236 +always \ee\s`1 1b-15-2 comma after the math block +#prevent the first two cells of a percent sign from being treated as a prefixed colon after the math block +always \ee\s`3p 1b-15-4-25-1234 +always \ee\s`3 1b-15-25 colon +always \ee\s`2 1b-15-23 semicolon +#Try to detect whether the math excerpt is preceded and followed by single quotes (apostrophe) and then restore the ending single quotation mark. +noback context ["`'\s\eb"] #2=1@6-236-1b-12 +noback context #2=1["\ee\s`'"] #2=0@1b-15-356-3 +#Otherwise consider it as an apostrophe following the Nemeth block +always \ee\s`' 1b-15-3 +always \ee\s- 1b-15-36 hyphen +always \ee\s99 1b-15-35-35 asterisk +always `,7\s\eb 6-2356-1b-12 left bracket before math block +always `;7\s\eb 56-2356-1b-12 left brace before math block +always `7\s\eb 2356-1b-12 left parenthesis before math block +always \ee\s`7 1b-15-2356 right parenthesis after math block +always \ee\s,8;s 1b-15-3-234 plural or possessive +always \ee\s''' 1b-15-3-3-3 horizontal ellipsis +noback context "\eb"[]$l"\ee" @56 add a letsign (letter prefix) when the math block contains a single letter only +noback context "\eb"[]","$l"\ee" @56 add a letsign to a single capital letter making up the math block +noback pass2 @1b-12 @456-146-0 add Nemeth block start indicators +noback pass2 @1b-15 @0-456-156 add Nemeth block end indicators + +noback pass2 @1b-12-4-4 @456-146-0-4 diff --git a/tests/Makefile.am b/tests/Makefile.am index 7a6e45c2..b915a617 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -439,40 +439,28 @@ XFAIL_TESTS += \ firstLineIndent.test \ mixed_content.test \ printPageNumberRange_03.test \ - mathml_nemeth/general_001.test \ mathml_nemeth/general_002.test \ mathml_nemeth/general_003.test \ - mathml_nemeth/mfrac_02.test \ - mathml_nemeth/mfrac_03.test \ mathml_nemeth/mfrac_04.test \ mathml_nemeth/mfrac_06.test \ mathml_nemeth/mfrac_07.test \ mathml_nemeth/mixed_scripts_01.test \ mathml_nemeth/mixed_scripts_02.test \ mathml_nemeth/mixed_scripts_03.test \ - mathml_nemeth/mixed_scripts_04.test \ mathml_nemeth/mixed_scripts_05.test \ mathml_nemeth/mixed_scripts_06.test \ mathml_nemeth/mixed_scripts_07.test \ mathml_nemeth/msub_02.test \ mathml_nemeth/msub_03.test \ - mathml_nemeth/msub_04.test \ - mathml_nemeth/msub_05.test \ - mathml_nemeth/msub_06.test \ - mathml_nemeth/msub_07.test \ mathml_nemeth/msub_08.test \ mathml_nemeth/msub_09.test \ mathml_nemeth/msub_10.test \ - mathml_nemeth/msubsup_02.test \ mathml_nemeth/msubsup_03.test \ - mathml_nemeth/msubsup_04.test \ mathml_nemeth/msubsup_05.test \ - mathml_nemeth/msubsup_06.test \ - mathml_nemeth/msubsup_07.test \ mathml_nemeth/msup_02.test \ + mathml_nemeth/msup_03.test \ mathml_nemeth/msup_06.test \ mathml_nemeth/msup_09.test \ - mathml_nemeth/msup_10.test \ mathml_nemeth/msqrt_03.test \ mathml_nemeth/mmultiscripts_01.test \ mathml_nemeth/mmultiscripts_02.test \ @@ -481,41 +469,27 @@ XFAIL_TESTS += \ mathml_nemeth/mmultiscripts_05.test \ mathml_nemeth/mmultiscripts_06.test \ mathml_nemeth/mmultiscripts_07.test \ - mathml_nemeth/mover_01.test \ - mathml_nemeth/mover_02.test \ - mathml_nemeth/mover_03.test \ - mathml_nemeth/mover_04.test \ mathml_nemeth/mover_05.test \ - mathml_nemeth/mover_06.test \ mathml_nemeth/mover_07.test \ - mathml_nemeth/mover_08.test \ mathml_nemeth/mover_13.test \ - mathml_nemeth/mover_14.test \ mathml_nemeth/mover_15.test \ - mathml_nemeth/munder_02.test \ mathml_nemeth/munder_03.test \ - mathml_nemeth/munder_06.test \ - mathml_nemeth/munder_07.test \ - mathml_nemeth/munderover_02.test \ mathml_nemeth/munderover_03.test \ nemeth_MathCAT/above_and_below_88_2.test \ nemeth_MathCAT/arrow_96_4.test \ nemeth_MathCAT/as_multiscript_nested_sub_sup_74_c_5.test \ nemeth_MathCAT/bar_97_b_1.test \ - nemeth_MathCAT/beveled_frac_62_b_1.test \ nemeth_MathCAT/binomial_90_1.test \ nemeth_MathCAT/boldface_32_b_3.test \ nemeth_MathCAT/boldface_32_b_6.test \ nemeth_MathCAT/cap_22_a_1.test \ nemeth_MathCAT/cap_roman_numeral_18_a_3.test \ - nemeth_MathCAT/carrot_98_1.test \ nemeth_MathCAT/comma_78_2.test \ nemeth_MathCAT/comma_78_2_invisible.test \ nemeth_MathCAT/comma_78_3.test \ nemeth_MathCAT/comma_78_6.test \ nemeth_MathCAT/comma_ellipsis_in_sub_79_b_5.test \ nemeth_MathCAT/comma_in_sup_79_b_4.test \ - nemeth_MathCAT/comma_number_77_4_20.test \ nemeth_MathCAT/comma_space_78_1.test \ nemeth_MathCAT/comparison_79_g_2.test \ nemeth_MathCAT/complex_frac_66_1.test \ @@ -558,7 +532,6 @@ XFAIL_TESTS += \ nemeth_MathCAT/menclose_lesson_12_5_5_5.test \ nemeth_MathCAT/menclose_primed_86_b_6.test \ nemeth_MathCAT/menclose_top_bottom_88_1.test \ - nemeth_MathCAT/mixed_frac_63_a_1.test \ nemeth_MathCAT/mixed_frac_64_2.test \ nemeth_MathCAT/mmultiscripts_77_4_10.test \ nemeth_MathCAT/mmultiscripts_77_4_18.test \ @@ -573,13 +546,10 @@ XFAIL_TESTS += \ nemeth_MathCAT/mmultiscripts_82_b_6.test \ nemeth_MathCAT/ms.test \ nemeth_MathCAT/ms_38_4_8.test \ - nemeth_MathCAT/msubsup_82_a_3.test \ nemeth_MathCAT/multipurpose_177_2_1.test \ nemeth_MathCAT/multipurpose_177_2_2.test \ - nemeth_MathCAT/multipurpose_177_3_1.test \ nemeth_MathCAT/multipurpose_177_5_1.test \ nemeth_MathCAT/multipurpose_177_7_1.test \ - nemeth_MathCAT/munder_lesson_12_5_5_5.test \ nemeth_MathCAT/nested_root_105_2.test \ nemeth_MathCAT/nested_sqrt_105_1.test \ nemeth_MathCAT/nested_sqrt_105_3.test \ @@ -589,39 +559,24 @@ XFAIL_TESTS += \ nemeth_MathCAT/nested_sup_74_b_4.test \ nemeth_MathCAT/nested_sup_mmultiscripts_74_b_1.test \ nemeth_MathCAT/nested_sup_sup_space_79_d_9.test \ + nemeth_MathCAT/nested_super_79_a_3.test \ nemeth_MathCAT/nested_super_space_79_d_3.test \ nemeth_MathCAT/nested_super_space_79_d_7.test \ nemeth_MathCAT/non_hyper_complex_frac_67_1.test \ nemeth_MathCAT/non_list_10_4.test \ + nemeth_MathCAT/number_space_after.test \ nemeth_MathCAT/number_space_before.test \ nemeth_MathCAT/number_space_before_and_after.test \ - nemeth_MathCAT/numeric_sub_81_a_1.test \ nemeth_MathCAT/order2_overbar_87_a_1.test \ - nemeth_MathCAT/overbar_86_a_4.test \ - nemeth_MathCAT/overbar_86_a_5.test \ - nemeth_MathCAT/overbar_86_b_1.test \ - nemeth_MathCAT/overbar_86_b_10.test \ - nemeth_MathCAT/overbar_86_b_11.test \ - nemeth_MathCAT/prescript_77_4_18.test \ nemeth_MathCAT/prescript_77_4_6.test \ nemeth_MathCAT/prescript_77_4_7.test \ - nemeth_MathCAT/prime_172_5.test \ - nemeth_MathCAT/prime_172_6.test \ - nemeth_MathCAT/prime_172_8.test \ - nemeth_MathCAT/prime_172_9.test \ - nemeth_MathCAT/prime_77_4_4.test \ - nemeth_MathCAT/prime_83_b_1.test \ nemeth_MathCAT/prime_83_b_3.test \ - nemeth_MathCAT/prime_83_b_4.test \ nemeth_MathCAT/prime_83_b_5.test \ nemeth_MathCAT/prime_83_b_6.test \ nemeth_MathCAT/prime_83_b_8.test \ - nemeth_MathCAT/prime_mathjax_83_b_2.test \ nemeth_MathCAT/prime_mmultiscripts_83_b_2.test \ nemeth_MathCAT/prime_mmultiscripts_83_b_4.test \ nemeth_MathCAT/prime_wiris_83_b_2.test \ - nemeth_MathCAT/primed_86_b_6.test \ - nemeth_MathCAT/product_77_4_24.test \ nemeth_MathCAT/punct_37_1_2.test \ nemeth_MathCAT/punct_37_2_2.test \ nemeth_MathCAT/punct_37_7_1.test \ @@ -634,14 +589,11 @@ XFAIL_TESTS += \ nemeth_MathCAT/sub_ind_80_b_3.test \ nemeth_MathCAT/sub_ind_80_b_4.test \ nemeth_MathCAT/sub_ind_mmultiscripts_80_b_3.test \ - nemeth_MathCAT/sum_77_4_23.test \ nemeth_MathCAT/superscript_80_a_2.test \ nemeth_MathCAT/tensor_from_mathml_spec.test \ - nemeth_MathCAT/test_9_d_2.test \ nemeth_MathCAT/test_9_d_3.test \ nemeth_MathCAT/text_after_sup_79_c_3.test \ nemeth_MathCAT/trilinear_not_ratio_151_11.test \ - nemeth_MathCAT/underbar_86_a_1.test \ nemeth_MathCAT/vertical_bar_145_4.test \ nemeth_MathCAT/whitespace_in_sup_79_e_1.test \ nemeth_MathCAT/word_77_4_12.test \ diff --git a/tests/mathml_nemeth/mover_01.test/expected.txt b/tests/mathml_nemeth/mover_01.test/expected.txt index 9bcdfb5d..8ea5bb64 100755 --- a/tests/mathml_nemeth/mover_01.test/expected.txt +++ b/tests/mathml_nemeth/mover_01.test/expected.txt @@ -1 +1 @@ -"X%:] +"X+Y<:] diff --git a/tests/mathml_nemeth/mover_06.test/input.xml b/tests/mathml_nemeth/mover_06.test/input.xml index d1e79d33..cd8d486e 100755 --- a/tests/mathml_nemeth/mover_06.test/input.xml +++ b/tests/mathml_nemeth/mover_06.test/input.xml @@ -1,19 +1,21 @@ - - - a - ¯ - - A - + - - b - ¯ - - B - + + + + a + ¯ + + A + + + + b + ¯ + + B + + ¯ diff --git a/tests/mathml_nemeth/mover_08.test/expected.txt b/tests/mathml_nemeth/mover_08.test/expected.txt index f755b640..1aad7bde 100755 --- a/tests/mathml_nemeth/mover_08.test/expected.txt +++ b/tests/mathml_nemeth/mover_08.test/expected.txt @@ -1 +1 @@ -"X+Y<:< - - - - - - a - k - - - 0 - n - - + + + 0 + n + + + a + k + diff --git a/tests/mathml_nemeth/munder_01.test/expected.txt b/tests/mathml_nemeth/munder_01.test/expected.txt index 9bcdfb5d..9079ce70 100755 --- a/tests/mathml_nemeth/munder_01.test/expected.txt +++ b/tests/mathml_nemeth/munder_01.test/expected.txt @@ -1 +1 @@ -"X%:] +X%: diff --git a/tests/mathml_nemeth/munder_03.test/expected.txt b/tests/mathml_nemeth/munder_03.test/expected.txt index 2831509b..c96fb097 100755 --- a/tests/mathml_nemeth/munder_03.test/expected.txt +++ b/tests/mathml_nemeth/munder_03.test/expected.txt @@ -1 +1 @@ -"LIM%X $O #0] F(X) +"X+Y%:%%A .K #3%%%B .K #2] diff --git a/tests/mathml_nemeth/munderover_02.test/expected.txt b/tests/mathml_nemeth/munderover_02.test/expected.txt index e618349a..60b8988c 100755 --- a/tests/mathml_nemeth/munderover_02.test/expected.txt +++ b/tests/mathml_nemeth/munderover_02.test/expected.txt @@ -1 +1 @@ -"K,S%N .K #1<,=]?1/2^N"# .K #1 +".,S%N .K #1<,=]?1/2^N"# .K #1 diff --git a/tests/mathml_nemeth/styles.cfg b/tests/mathml_nemeth/styles.cfg index e69de29b..ba0a0661 100644 --- a/tests/mathml_nemeth/styles.cfg +++ b/tests/mathml_nemeth/styles.cfg @@ -0,0 +1,2 @@ +style matrix + format alignColumnsLeft