Share

Maxima -- GPL CAS based on DOE-MACSYMA

Tracker: Bugs

5 mactex ignores aliases / FIX - ID: 955404
Last Update: Comment added ( robert_dodier )

Mactex ignores aliases; here is an example

(%i1) ordergreat(a);
(%o1) DONE
(%i2) tex(a);
$$_101a\leqno{\tt NIL}$$
(%o2) NIL
(%i3) build_info();

Maxima version: 5.9.0.1cvs
Maxima build date: 12:29 5/12/2004
host type: i686-pc-mingw32
lisp-implementation-type: Kyoto Common Lisp
lisp-implementation-version: GCL 2.7.0

Here is one way fix this bug; change tex-atom to

(defun tex-atom (x l r) ;; atoms: note: can we lose by
leaving out {}s ?
(if (symbolp x) (setq x (or (get x 'reversealias) x)))
(append l
(list (cond ((numberp x) (texnumformat x))
((and (symbolp x) (get
x 'texword)))
((stringp x) (tex-string x))
((characterp x) (tex-char x))
(t (tex-stripdollar x))))
r))

Testing ...

(%o3)
(%i4) load("c:/maximacvs/maxima/src/mactex.lisp");

(%o4) c:/maximacvs/maxima/src/mactex.lisp
(%i5) tex(a);

$$a\leqno{\tt NIL}$$
(%o5) NIL
(%i6)

Ordergreat isn't all that useful, but it is a good way to
change the ordering of an expression to something more
standard for typesetting.

Barton


Barton Willis ( willisbl ) - 2004-05-17 19:01

5

Closed

Fixed

Nobody/Anonymous

Lisp Core

Includes proposed fix

Public


Comments ( 5 )




Date: 2008-01-17 15:21
Sender: robert_dodierSourceForge.net SubscriberProject Admin


Closing this report as fixed.


Date: 2008-01-17 04:48
Sender: robert_dodierSourceForge.net SubscriberProject Admin


I've pasted (if (symbolp x) (setq x (or (get x 'reversealias) x))) into
TEX-ATOM and the result seems to work as expected. Committed as r1.58
src/mactex.lisp.



Date: 2006-07-29 06:31
Sender: robert_dodierSourceForge.net SubscriberProject Admin

Logged In: YES
user_id=501686

Observed in 5.9.3cvs.


Date: 2004-11-23 17:19
Sender: willisbl

Logged In: YES
user_id=895922

I can't think of any reason to not apply it---I've used
the patch a few times to help tidy tex output. For
this purpose, it doesn't work all that well. Say I want
all x's before y's. Using ordergreat works in a sum, but
not in a product

(%i1) x+y+x*y;
(%o1) x y + y + x
(%i2) ordergreat(x,y,z);
(%o2) done
(%i3) x+y+x*y;
(%o3) y x + x + y


(The funny \leqno{\tt ...} stuff in my first posting was due to
a mactex bug that is no longer with us, I think).

Barton


Date: 2004-11-23 16:02
Sender: rtoy

Logged In: YES
user_id=28849

Is there a reason not to apply this fix?


Log in to comment.




Attached File

No Files Currently Attached

Changes ( 5 )

Field Old Value Date By
status_id Open 2008-01-17 15:21 robert_dodier
resolution_id None 2008-01-17 15:21 robert_dodier
close_date - 2008-01-17 15:21 robert_dodier
artifact_group_id None 2006-09-09 15:10 robert_dodier
category_id None 2006-07-29 06:31 robert_dodier