mailing-list for TeXmacs Users

Text archives Help


Re: texmacs styles programming (was: controlling table column widths)


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: address@hidden
  • Cc: address@hidden
  • Subject: Re: texmacs styles programming (was: controlling table column widths)
  • Date: Thu, 25 Oct 2001 23:30:36 +0200 (MET DST)


> One: Where are the language primitives defined?
> -----------------------------------------------
>
> I looked at the styles yesterday: I'm having problems understanding
> the style language. I've read through all the documentation---but
> over an extended period of time---so it may be that I simply haven't
> integrated it together yet.
>
> I can narrow down the problem somewhat: when I look at lists.ts, I can
> see that I have a series of assignments, functions and macros. For
> example,
>
> <assign|thetag|<with|mode|math|\<bullet\>>>
>
> Might be translated as:
>
> thetag = \<bullet\> in the environment where mode=math
>
> Ok, that makes sense, but where is '<bullet>' defined? Is there a
> place where environment variables and their meanings are listed?
> I feel like I'm reading a language where I know the grammar, but have
> no vocabulary for nouns and verbs.

Please look at Help->implementation->data format,
although this document is a bit out of date.
The main TeXmacs constructs are listed in src/Basic/Data/tree.gen.h.
<bullet> is just a symbol with a special meaning in certain fonts.
See Help->implementation->fonts, fonts/enc/*.enc and
progs/fonts/*.scm.

> Two: How can I make the code more readable?
> ---------------------------------------------------------
> Code like,
>
> <assign|itemize|<macro|body|<surround|<format|no page break
> before>|<vspace|0.5fn><format|no indentation after>|<with|left
> margin|<plus|<value|left
> margin>|3fn>|item|<macro|<vspace*|0.5fn><with|firs\
> t indentation|-1.5fn|<format|enable first
> indentation>><resize|<apply|thetag> |||r]1.5fn|>>|<arg|body>>>>>
>
>
> ...is difficult for me to follow. Do you have settings in texmacs
> that can help to make it look more readable? (The colors do help.)

Unfortunately, no.

> Just a notion, but it seems it would be much easier to read this code
> if I could simply write the style in something more lisp-like. White
> space could be used for revealing program structure.
>
>
> (assign 'itemize
> (macro '(body)
> (surround ...
> )
> )
> )

Yes, I definitely would like some tree-like representation of styles,
but this will take quite some time to implement.
Moreover, it is not yet clear which things should be seen
in code-like form and which things not.
We often would like the <bullet> to remain a real bullet for instance.
Also, we might want to have the math-mode menus displayed,
when we are in a logical position where math-mode is active.
Etc.

> Note, I'm not an expert lisp user, but I can always find my way
> through it with help from emacs. The ability to get documentation via
> docstrings and interactive help is invaluable.

Well, the main documentation and tutorial are far from finished.
Any help on documentation is welcome.

> Three: gencc and C++ coding techniques
> ---------------------------------------
>
> Is there a way to use the standard templates library in texmacs source
> code? While working on the pipes.gen.cc code, I tried using some STL
> functions and gencc didn't like it. Is there a way to get access to

No, I do not like the standard C++ template mechanism.
That is why I replaced it by the modular gencc system.
I do not intend to mix the two mechanisms.

Best regards,

Joris




Archive powered by MHonArc 2.6.19.

Top of page