unescaped underscore

7 views
Skip to first unread message

Ralf Hemmecke

unread,
Apr 15, 2014, 5:02:29 PM4/15/14
to fricas-devel
BTW, although the original generation of the book seems to have taken
care of the underscore by means of an awk script, I consider the
following a bug. It should be escaped by a backslash like this: \_.

(5) -> )set output algebra off
(5) -> )set output tex on
(5) -> escape()

$$
_
\leqno(5)
$$

Same here.

(6) -> 1.2345678901234567890123

$$
1.2345678901_23456789
\leqno(6)
$$

Furthermore:

(1) -> "a_b_"\"

(1) "a_b"\"
$$
\mbox{\tt "a_b"\"}
\leqno(1)
$$

That is wrong in many places.

I've fixed that here:
https://github.com/hemmecke/fricas/commits/escape-in-tex-context

With that the output is as follows:

(1) -> escape()

(1) _
$$
\_
\leqno(1)
$$

Type:
Character
(2) -> 1.2345678901234567890123

(2) 1.2345678901_23456789
$$
1.2345678901_23456789
\leqno(2)
$$

Type:
Float
(3) -> "a_b_"\"

(3) "a_b"\"
$$
\verb#"a_b"\"#
\leqno(3)
$$

The use of \verb is perhaps questionable, since I don't know whether it
is plain TeX, but one can certainly provide such a macro in plain TeX.

Ralf

Ralf Hemmecke

unread,
Apr 15, 2014, 7:27:29 PM4/15/14
to fricas-devel
Ooops. New output is, of course with escaped underscore also for floats.

Ralf

(3) -> 123456.12345678912334352

(3) 123456.1234567891_2334
$$
123456.1234567891\_2334
\leqno(3)
$$

Reply all
Reply to author
Forward
0 new messages