diff --git a/src/Text/TeXMath/Writers/TeX.hs b/src/Text/TeXMath/Writers/TeX.hs index c5ebc8db..f89baa3a 100644 --- a/src/Text/TeXMath/Writers/TeX.hs +++ b/src/Text/TeXMath/Writers/TeX.hs @@ -171,6 +171,7 @@ writeExp o@(EMathOperator s) = do tell [Grouped math] writeExp (ESymbol Ord (T.unpack -> [c])) -- do not render "invisible operators" | c `elem` ['\x2061'..'\x2064'] = return () -- see 3.2.5.5 of mathml spec +writeExp (ESymbol Ord "\8242") = tell [Literal "'"] -- render prime as ', #246 writeExp (ESymbol t s) = do s' <- getTeXMathM s when (t == Bin || t == Rel) $ tell [Space] diff --git a/test/writer/tex/02000_General_Punctuation.test b/test/writer/tex/02000_General_Punctuation.test index f545ae29..6d96c070 100644 --- a/test/writer/tex/02000_General_Punctuation.test +++ b/test/writer/tex/02000_General_Punctuation.test @@ -169,7 +169,7 @@ & \text{200} & \text{201} & \text{202} & \text{203} & \text{204} & \text{205} & \text{206} \\ \text{0} &   & ‐ & \dagger & ‰ & ⁀ & ⁐ & ⁠ \\ \text{1} & \quad & ‑ & \ddagger & ‱ & ⁁ & ⁑ & \\ -\text{2} &   & ‒ & \bullet & \prime & ⁂ & ./. & \\ +\text{2} &   & ‒ & \bullet & ' & ⁂ & ./. & \\ \text{3} & \quad & – & ‣ & '' & ⁃ & ⁓ & \\ \text{4} & \; & — & ․ & ''' & / & ⁔ & \\ \text{5} & \: & ― & ‥ & \backprime & ⁅ & ⁕ & @ \\ diff --git a/test/writer/tex/07.test b/test/writer/tex/07.test index 938cf6dd..605ddc7d 100644 --- a/test/writer/tex/07.test +++ b/test/writer/tex/07.test @@ -20,4 +20,4 @@ , EIdentifier "a" ] >>> tex -u'' + p(x)u\prime + q(x)u = f(x),\quad x > a +u'' + p(x)u' + q(x)u = f(x),\quad x > a diff --git a/test/writer/tex/complex3.test b/test/writer/tex/complex3.test index 34dfedb3..399570c5 100644 --- a/test/writer/tex/complex3.test +++ b/test/writer/tex/complex3.test @@ -7685,8 +7685,8 @@ >>> tex \begin{matrix} {2{\sum{ab}}} & \\ -x^{\prime 3} & \\ -{{{f^{\prime}{(x)}} + {\sin\cos\theta}} = 1} & \\ +x^{'3} & \\ +{{{f^{'}{(x)}} + {\sin\cos\theta}} = 1} & \\ {{{f{(z)}} = {\sum\limits_{n = 0}^{\infty}{a_{n}z^{n}}}}\text{, }{{|z| < R}\hspace{0pt}{({R \neq 0})}}} & \\ {\left. \int{}_{C}{\left( {\sum\limits_{n = 0}^{\infty}{a_{n}z^{n}}} \right){\mathbb{d}z}} \right. = {\sum\limits_{n = 0}^{\infty}{a_{n}\left. \int{}_{C}{z^{n}{\mathbb{d}z}} \right.}}} & \\ {{\lim\limits_{n\rightarrow\infty}\left| \left. \int{}_{C}{\left\lbrack {{f{(z)}} - {\sum\limits_{k = 0}^{n}{a_{k}z^{k}}}} \right\rbrack{\mathbb{d}z}} \right. \right|} = 0} & \\ @@ -7782,7 +7782,7 @@ c & d \begin{array}{r} {{{\mathbb{D}_{x\hspace{0pt}x}y} - y} = 0} \\ {{y{(0)}} = 1} \\ -{{y^{\prime}(0)} = 0} +{{y^{'}(0)} = 0} \end{array} & \\ {{y(x)} = {{\frac{1}{3}e^{{- \sqrt[3]{({- 1})}}x}} + {\frac{2}{3}e^{\frac{1}{2}\sqrt[3]{({- 1})}x}{\cos{\frac{1}{2}\sqrt{3}\sqrt[3]{\left( {- 1} \right)}x}}}}} & \\ {{y(t)} = {2{\tan\left( {{2t} - {\frac{1}{4}\pi}} \right)}}} & \\ @@ -7838,8 +7838,8 @@ t & x & y & z \\ {1 = 3} \end{matrix} & \\ \begin{matrix} -{{A_{1} = {{N_{0}{({\lambda;\Omega^{\prime}})}} - {\varphi{({\lambda;\Omega^{\prime}})}}}}\text{,}} \\ -{{A_{2} = {{\varphi{({\lambda;\Omega^{\prime}})}} - {\varphi{({\lambda;\Omega})}}}}\text{,}} \\ +{{A_{1} = {{N_{0}{({\lambda;\Omega^{'}})}} - {\varphi{({\lambda;\Omega^{'}})}}}}\text{,}} \\ +{{A_{2} = {{\varphi{({\lambda;\Omega^{'}})}} - {\varphi{({\lambda;\Omega})}}}}\text{,}} \\ {{A_{3} = {\mathcal{N}{({\lambda;\omega})}}}\text{.}} \end{matrix} & \\ \begin{matrix} @@ -7936,7 +7936,7 @@ b_{2\hspace{0pt}1} & b_{2\hspace{0pt}2} {{\int_{a}^{b}{{f{(x)}}{\mathbb{d}x}}} = {\lim\limits_{{\parallel P\parallel}\rightarrow 0}{\sum\limits_{i = 1}^{n}{{f\left( {\overline{x}}_{i} \right)}{\Delta x_{i}}}}}} & \\ {{\int_{a}^{b}{{f{(x)}}{\mathbb{d}x}}} = {\lim\limits_{n\rightarrow\infty}{\frac{b - a}{n}{\sum\limits_{i = 1}^{n}{f\left( {a + {i\frac{b - a}{n}}} \right)}}}}} & \\ {{\int_{0}^{2}{x^{5}\sqrt{x^{3} + 1}{\mathbb{d}x}}} = {\int_{1}^{3}{\frac{2}{3}u\frac{\sqrt{\left( u^{2} \right)}}{\left( {u^{2} - 1} \right)^{\frac{2}{3}}}\left( {{u^{2}\left( {u^{2} - 1} \right)^{\frac{2}{3}}} - \left( {u^{2} - 1} \right)^{\frac{2}{3}}} \right){\mathbb{d}u}}}} & \\ -{\left. \int{{f{({g{(x)}})}}{g^{\prime}{(x)}}{\mathbb{d}x}} \right. = \left. \int{{f{(u)}}{\mathbb{d}u}} \right.} & \\ +{\left. \int{{f{({g{(x)}})}}{g^{'}{(x)}}{\mathbb{d}x}} \right. = \left. \int{{f{(u)}}{\mathbb{d}u}} \right.} & \\ {x = {2{\sum\limits_{n = 1}^{100}{n{({n - 1})}}}}} & \\ {{\lim\limits_{x\rightarrow 0}{\sin\left( \frac{1}{x} \right)}} = {{- 1}..1}} & \\ {{h{({i,j})}} = {{{({2 - j})}{g{(i)}}} + {{({j - 1})}{f{({g{(i)}})}}}}} & \\ diff --git a/test/writer/tex/moAprime16.test b/test/writer/tex/moAprime16.test index dd2be53a..cbf9ac7b 100644 --- a/test/writer/tex/moAprime16.test +++ b/test/writer/tex/moAprime16.test @@ -6,4 +6,4 @@ , EDelimited "(" ")" [ Right (EIdentifier "x") ] ] >>> tex -f^{'}(x) = f^{\prime}(x) +f^{'}(x) = f^{'}(x) diff --git a/test/writer/tex/p.test b/test/writer/tex/p.test index 8d16c23c..7a6b6bfd 100644 --- a/test/writer/tex/p.test +++ b/test/writer/tex/p.test @@ -161,7 +161,7 @@ \text{precneqq} & ⪵ \\ \text{precnsim} & \precnsim \\ \text{precsim} & \precsim \\ -\text{prime} & \prime \\ +\text{prime} & ' \\ \text{Prime} & '' \\ \text{primes} & \mathbb{P} \\ \text{prnap} & \precnapprox \\ diff --git a/test/writer/tex/primes1.test b/test/writer/tex/primes1.test index 1218c606..827c435a 100644 --- a/test/writer/tex/primes1.test +++ b/test/writer/tex/primes1.test @@ -37,4 +37,4 @@ , ESuper (ESymbol Accent "'") (ESymbol Accent "'") ] >>> tex -x^{2} + 2^{2} + x^{\prime} + x^{'} + x^{\operatorname{''}} + x\prime + {x^{'}}^{'} + {x^{'}}^{2} + x^{' + '} + {x^{'}}^{'} + x^{'^{'}} + '^{'} + '^{'} +x^{2} + 2^{2} + x^{'} + x^{'} + x^{\operatorname{''}} + x\prime + {x^{'}}^{'} + {x^{'}}^{2} + x^{' + '} + {x^{'}}^{'} + x^{'^{'}} + '^{'} + '^{'} diff --git a/test/writer/tex/primes2.test b/test/writer/tex/primes2.test index 406e2244..d7c56583 100644 --- a/test/writer/tex/primes2.test +++ b/test/writer/tex/primes2.test @@ -27,4 +27,4 @@ , ESuper (EIdentifier "H") (ESymbol Accent "\8279") ] >>> tex -H^{"}H^{'}H^{*}H^{`}H^{ª}H^{{^\circ}}H^{²}H^{³}H^{´}H^{¹}H^{º}H^{‘}H^{’}H^{‚}H^{‛}H^{``}H^{"}H^{„}H^{‟}H^{\prime}H^{''}H^{'''}H^{\backprime}H^{‶}H^{‷}H^{⁗} +H^{"}H^{'}H^{*}H^{`}H^{ª}H^{{^\circ}}H^{²}H^{³}H^{´}H^{¹}H^{º}H^{‘}H^{’}H^{‚}H^{‛}H^{``}H^{"}H^{„}H^{‟}H^{'}H^{''}H^{'''}H^{\backprime}H^{‶}H^{‷}H^{⁗}