texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Re: GNU Octave interface


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Re: GNU Octave interface
Date: Sat, 5 Oct 2002 11:16:24 +0200 (MET DST)

> Some problems with the Octave interface
> (I mean my interface, but most of the same problems are surely present in
> the other one, too):
> 
> 1. Octave uses \ as the reverse-division operator. It is very often used,
> e.g., to solve linear systems. How can I input \ in the octave-input
> environment? Is there a way to disable the special treatment od the \ key
> in this environment?

This can be done by redefining the keyboard shortcut for \
inside octave mode. The best would be to take a look
inside progs/keyboard in order to see how that works.

> 2. I guess that the following code in, e.g., maxima.scm:
> 
> (define (maxima-input-rows t)
>   (display "matrix(")
>   (maxima-input-row (car t))
>   (maxima-input-var-rows (cdr t))
>   (display ")"))
> 
> deals with the conversion of 2-dimensional matrix input to the Maxima
> syntax.

Exactly.

> If I want the Matlab-like syntax
> [a,b,c;d,e,f;g,h,i]
> instead, how should I adapt this for octave.scm?

Define a similar routine for Octave...
In fact, I think that this is not necessary, because the Matlab-like
syntax is the default one (it is also used by Pari). In general,
you can take a look at what has been done in the other cas'
(as you did for Maxima); with a certain probability,
you will find something similar...

> 3. In my interface, error messages are sent to TeXmacs as
> \2latex:\\red <error message> \\black\5
> in order to have them in red. This leads to problems if the <error
> message> involves ^ or \. Can I use verbatim:, but have red text?

Not yet, because the [DATA_BEGIN]-[DATA_END]-scheme
does not properly nest in a systematic way.
I might define a [DATA_BEGIN]color:...[DATA_END] for this purpose
as a temporariry fix. You may also use the verbatim environment
in LaTeX, or directly send your verbatim text in Scheme format.

> 4. When run from TeXmacs, Octave does not call less and info (a good
> thing). Instead, simple help commands dump huge portions of the manual
> into TeXmacs. So, help is not usable.

What format is being used for the help?

> 5. I think thar writing matrices without alignment at the decimal point is
> *absolutely inacceptable*. The first need to understand a matrix is to see
> at a glance, where the essential entries are. I can generate LaTex like
> following:
> 
> address@hidden
> ...
> ... & 123 & 456 & ... \\
> ...
> \end{array}
> 
> to produce 123.456 (each number takes two columns of the array,
> there is . between the columns, and no extra space around this dot). This
> is the standard technique in LaTeX. Will TeXmacs understand it?

I can make TeXmacs to understand this, but it probably is not
a good method, because it breaks the semantics. What I should do,
is provide a new markup tag "decimal-number", which has the effect
of moving the box so that the decimal point will be at the origin.
We may then align columns at the origin position.

But at the moment, I do have the no-verbatim output does
not work whatsoever for me, so let us deal with this problem
at a second stage.

> 6. Octave supports tab-completion. Probably, with the new features for
> tab-completion in TeXmacs, we can support it, too. But I don't know how to
> do this.

I will put an example of this online soon (remind me).

> To summarize: I think that if we'll work really hard, we'll have a
> deteriorated replica of the command-line interface of Octave.

I know, but we *will* have real two dimensional output.
And we *will* be able to copy and paste formulas to other cas'.
And ...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]