[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string parsing/preparation for latex
From: |
Jon Wilson |
Subject: |
Re: string parsing/preparation for latex |
Date: |
Wed, 09 Nov 2005 07:24:14 -0600 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050324) |
Hi Klaus,
scheme->LaTeX would have to be a macro, then it receives its arguments
before they are evaluated. Unless of course I'm mistaken about the
nature of macros. (I'm still relatively new to the idea.)
eg (simple example, its 7am here and I got to sleep at 2.):
(define-macro (+->LaTeX +expr)
(string-append
(number->string (cadr +expr))
"+"
(number->string (caddr +expr))))
(+->LaTeX (+ 9 15))
=>
"9+15"
Unless I've screwed something up in my sleepiness, but I just tested
it and yeah that seems to work as far as a proof of concept goes.
Guile version 1.6.4, I don't know if things have changed in unstable
version.
Regards,
Jon
klaus schilling wrote:
Jon Wilson writes:
>
> (scheme->LaTeX (+ 7 (/ 18 5)))
> =>
> "7 + \frac{18}{5}"
shouldn't the argument be quoted? otherwise it will be evaluated
straight to 10.6 (or whatever style of representation has been
chosen for rationals, the unstable versions for guile seem to
provide for more possibilities)
Klaus Schilling
- string parsing/preparation for latex, David Pirotte, 2005/11/07
- Re: string parsing/preparation for latex, Jose Roberto B. de A. Monteiro, 2005/11/07
- Re: string parsing/preparation for latex, Jon Wilson, 2005/11/07
- Re: string parsing/preparation for latex, David Pirotte, 2005/11/08
- Re: string parsing/preparation for latex, Jon Wilson, 2005/11/08
- Re: string parsing/preparation for latex, klaus schilling, 2005/11/09
- Re: string parsing/preparation for latex,
Jon Wilson <=
- Re: string parsing/preparation for latex, Stephen Compall, 2005/11/13
- Re: string parsing/preparation for latex, Jon Wilson, 2005/11/14
- Re: string parsing/preparation for latex, Stephen Compall, 2005/11/15