[cl-typesetting-devel] Couple of silly questions

Marc Battyani marc.battyani at fractalconcept.com
Mon Jan 9 21:02:51 UTC 2006


"C Y" <smustudent1 at yahoo.com> wrote:

> --- Marc Battyani <marc.battyani at fractalconcept.com> wrote:
>
> > No. cl-typesetting has a simple Lisp syntax so that it's
> > easy to implement higher level syntaxes like TeX, make macros,
> > etc.
>
> Cool!  How much of TeX do you think cl-typesetting could support, in
> theory?  I've got a copy of TeX - The Program on order so maybe I could
> use that to get some ideas.

Well in theory cl-typesetting is much more powerful than TeX. In practice TeX as a huge
collections of libraries and packages.
The "macro" language of cl-typesetting is Common Lisp ;-)

> > A lot of people said they will implement front-ends
> > like this but to far AFAIK only Klaus Weidner and
> > Peter Seibel have done so.
>
> Which ones did they implement?

Klaus wrote the XHTML renderer in the contrib directory.
Peter wrote a small syntax to write his book: http://www.gigamonkeys.com/lisp/markup/

> Cool.  The only reason I ask is I'm returning to an idea I had a while
> back (and may have actually discussed with you once, a long time back)
> of implementing a real mathematical GUI for Axiom and Maxima.  Given
> the Axiom project's goal of literate programming and use of TeX, and
> the normal text problems that will need to be solved by a notebook
> style interface anyway (I'm just starting to appreciate the difficulty
> of line breaking + Mathematics, even for suboptimal solutions) the most
> logical thing to do seems to be to use cl-typesetting's rendering and
> layout abilities as the foundation for a notebook style UI (possibly
> using Garnet, which is beginning to show some life again).  Axiom is
> Modified BSD licensed, which so far has seemed a lot simpler than the
> GPL issues Maxima occasionally delt with, so I'm hoping as much as
> possible to base a GUI solution on Modified BSD licensed code so
> everyone can use it.  I just wan't sure how cl-typesetting's license
> played into that, and experience has taught me that if things are clear
> at the beginning it pays off big down the road.
>
> Anyway.  I have a few notions about 2D mathematical line breaking,
> inspired by the breqn package and comments by Knuth in the TeXbook.
> Knuth was aware of the problem but purposefully avoided imposing a
> solution at the TeX level, since there is no one "right way" to line
> break equations.  He did illustrate some ways for a human to break
> things up, which were very instructive and taught me things about TeX I
> didn't know.  That's fine when a human being is doing it, but for CAS
> output there are lots of cases where no sane human wants to deal with
> it and so some kind of reasonable ruleset is needed.  I figure
> cl-typesetting would be the perfect place to define that logic, if
> indeed it can be defined and would be of interest to the project.  I'd
> rather not do it at the Garnet level since I would like both Garnet and
> McCLIM to be viable GUI options (although I'm a bit concerned about the
> license on the CLIM specification document) and it seems like something
> that cl-typesetting could benefit from if I can manage to pull it off.
>
> I THINK, as a first cut, that the way to handle things will be to treat
> each input "object as its own "mini-document" and avoid calling the
> full typesetting logic on the whole document on a per-keypress basis.
> Math notebooks are fairly structured in the vertical direction,
> although the height of "lines" might change.  Perhaps the thing to do
> is simply "move" objects over if an insertion is being done, and when
> the changes propagate to a "hard" edge (e.g. a margin) re-render
> everything that needs it inside the input line, and simply shift
> everything else down the specific change in the height of the input
> object.  I expect reading the TeXbook and the cl-typesetting code will
> help me think about those points.  Can cl-typesetting do that kind of
> "localized" rendering?

Yes, I do it all the time. For instance in tables, each cell contain an instance of a
cl-typesetting engine.

> The main problem is that until the math editing environment is
> addressed there isn't much point in doing anything else GUI wise, since
> everything else is so trivial compared to that problem.  :-/

I have started some math functions in cl-typesetting. But it's not finished yet.

BTW with cl-typesetting you get the position of each character so in a notebook interface
you can easily detect where a user has clicked for instance.

Marc





More information about the cl-typesetting-devel mailing list