* (bug 19547): Apostrophe / single quotes in math \text{...}

Reapplied r87092 (tests added, tweaked for merge, no functional diff) to allow "'" and "`" in \text{...} bits.
I'm not convinced this is a sufficient fix -- there are probably a *lot* more where this came from.
But it doesn't hurt to add them!
This commit is contained in:
Brion Vibber 2011-09-13 22:24:27 +00:00
parent 8d495dcc32
commit d2cf3c244b
2 changed files with 15 additions and 2 deletions

View File

@ -11,8 +11,8 @@ let literal_uf_lt = [',' ':' ';' '?' '!' '\'']
let delimiter_uf_lt = ['(' ')' '.']
let literal_uf_op = ['+' '-' '*' '=']
let delimiter_uf_op = ['/' '|']
let boxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' ' ' '\128'-'\255']
let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' ' ']
let boxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' '\'' '`' ' ' '\128'-'\255']
let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' '\'' '`' ' ']
rule token = parse
space + { token lexbuf }

View File

@ -85,3 +85,16 @@ BUG 27754: Archaic Greek letters for math (may require texlive-lang-greek)
<img class="tex" alt="\Stigma\stigma\varstigma" src="/images/math/7/b/9/7b9233276816994a33a5e968202cef6e.png" />
</p>
!! end
!! test
BUG 19547: Apostrophe / single quotes in math \text{...}
!! input
<math>\text{next years}</math>
<math>\text{next year's}</math>
<math>\text{`next' year}</math>
!! result
<p><span class="texhtml" dir="ltr">next years</span>
<span class="texhtml" dir="ltr">next year's</span>
<span class="texhtml" dir="ltr">`next' year</span>
</p>
!! end