Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#25 Fixes for mactex.lisp

closed
nobody
Lisp Core (472)
5
2006-03-26
2002-03-25
Jesper Harder
No

Here's a patch that fixes some problems in mactex.lisp:

* tex-mexpt

The patch fixes some different problems in tex-mexpt:

tex('diff(f,x)^2);
=> $$%DERIVATIVE^2\left(\left(f,x,1\right)\right)$$

This is not want we want, so we need to add some more
exceptions.

tex(f(x)^2);
=> $$f^2\left(\left(x\right)\right)$$

i.e. there's one set of brackets too much.

tex(f(x)^(a+b));
=> $$ Error: ((MPLUS) |$b| |$a|) is not of type (OR
RATIONAL LISP:FLOAT).

That happens because we're doing a numeric comparison
of the exponent.

* tex-mbox

\framebox doesn't work in math mode, use \boxed
instead. Also,support labelled boxes.

* tex-choose

tex(binomial(a,b));
=> $$\pmatrix{a\\b}$

which doesn't typeset a proper binomial -- use the
built-in TeX command \choose instead.

Discussion

  • Jesper Harder
    Jesper Harder
    2002-03-25

     
    Attachments
  • Raymond Toy
    Raymond Toy
    2002-06-22

    Logged In: YES
    user_id=28849

    I applied your patch, with some changes, and all of your
    examples produce the desired result now.

    You didn't give an example \boxed example, so I don't know
    what that does.

    Please try this out when you can.

     
  • Raymond Toy
    Raymond Toy
    2002-06-26

    Logged In: YES
    user_id=28849

    I'm closing this as fixed. Reopen later if necessary.

     
  • Raymond Toy
    Raymond Toy
    2002-06-26

    • status: open --> closed
     
  • Raymond Toy
    Raymond Toy
    2002-06-26

    Logged In: YES
    user_id=28849

    I'm closing this as fixed. Reopen later if necessary.

     
  • Raymond Toy
    Raymond Toy
    2002-06-26

    Logged In: YES
    user_id=28849

    I'm closing this as fixed. Reopen later if necessary.

     
  •  
    Attachments
  • Jesper Harder
    Jesper Harder
    2002-07-03

    Logged In: YES
    user_id=177224

    > You didn't give an example \boxed example, so I don't know
    > what that does.

    It just replaces \framebox with \boxed, because \framebox
    only works in text mode not in math mode. Before the patch:

    tex(box(a+b));
    ==> $$\framebox{b+a}$$

    After the patch:

    tex(box(a+b));
    ==> $$\boxed{b+a}$$

    The tex-mlabox stuff adds support for labelled boxed, e.g.

    tex(box(a+b,foo));
    ==> $$\stackrel{foo}{\boxed{b+a}}$$

    > Please try this out when you can.

    It works fine except that you missed a part of my patch:
    %lsum, %limit are also execeptions, and I think there's a typo
    -- %integral should be %integrate.

    Here a some examples:

    tex('limit(f(x),x,0)^2);
    ==>
    $$\lim ^2\left(f\left(x\right),x,0\right)$$

    tex('lsum(f(x),x,0)^2);
    ==> $$%LSUM^2\left(f\left(x\right),x,0\right)$$

    tex('integrate(f(x),x)^2);
    ==> $$%INTEGRATE^2\left(f\left(x\right),x\right)$$

    I've attached a patch against the newest version.

    (BTW, I really, really dislike this awkward Sourceforge web
    interface -- isn't there some way to submit patches via
    email instead?)

     
  • Jesper Harder
    Jesper Harder
    2002-07-03

     
    Attachments
  • Raymond Toy
    Raymond Toy
    2002-07-15

    Logged In: YES
    user_id=28849

    Sorry for messing up your original patch. I've applied your
    new patch. Let me know if it's working.

    Also, shouldn't lsum do some instead of just printing lsum?

    I have no problems if you send patches to the mailing list
    instead of here. (I'd actually prefer that because I hate
    this web thing too.)

     
  • Raymond Toy
    Raymond Toy
    2002-07-15

    • status: closed --> open
     
  • Robert Dodier
    Robert Dodier
    2006-03-26

    • status: open --> closed
    • labels: --> Lisp Core
     
  • Robert Dodier
    Robert Dodier
    2006-03-26

    Logged In: YES
    user_id=501686

    Closing this report, as it is already marked "fixed" and, on
    trying the examples mentioned in the comments, it appears
    that the patch or patches were applied. (Except
    tex(binomial(a,b)) still yields pmatrix. Oh well. If that's
    still a problem then we'll open a new report just for that.)

     
  • Logged In: NO

    Committed r1.63 src/mactex.lisp to output \choose for binomial instead of \pmatrix. Robert Dodier (not logged in)