texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Patch 1168


From: david
Subject: Re: [Texmacs-dev] Patch 1168
Date: Mon, 3 Mar 2003 12:12:43 +0100
User-agent: Mutt/1.4i

On Thu, Feb 27, 2003 at 06:24:25PM -0700, Nix N. Nix wrote:
> > OK, but then, please drop 1189 as well, since I'm going to have to
> > rewrite it, restrict myself to tmtex, and use the accessors you have
> > provided.  I will rewrite the patch today at around 18:00 -0700 == 02:00
> > +0100 and I will let you know via this thread.
> 
> Done. It's patch 1195.

Updated patch manager. But, do not have time to examine your patch in
detail at the moment.

 
> I did make a small change:  If you have a 
> 
> (colwith "1" "cell bborder" "1ln")
> 
> you will no longer end up with "|c|c|", because the colwith statement
> with a bborder argument says nothing about vertical borders.

Well, that is fine... Actually the old test suite was designed that
way so I would be necessary to review it when the tmtable would become
liess stupid.

> > > If you change tmtable, please check that all conversion test suite
> > > still run correctly.
> > 
> > Well, that hasn't happened yet, but, for when it does, OK.
> 
> I /have/ corrected a few copy/paste errors that were breaking LaTeX
> creation (i.e., instead of LaTeX code, the .tex file contained Scheme
> error messages).  They are in patch #1195 as well.  Nothing major, just
> the kinds of things you forget to do when you copy/paste code.

Seems okay from the patch. You see, repetitive code often cause that
kind of stupid errors. That is why it should be avoided.

> Unfortunately, I don't know how to execute these test suites.  I have
> tried adding either of the followings to my my-init-texmacs.scm file,
> but I got an "unbound variable" error in both cases:
> 
> (regtest-tmtex-table)
> 
> (regtest-tmtex)

The test suite are not loaded at initialization (because the casual user never 
need them).

So you need to load them first, with something like:

  (exec-file "$TEXMACS_PATH/progs/convert/tmtex/tmtex-test.scm")


> Consequently, I was unable to verify the test suites, even the small
> change I made in tmtex-test.scm . I was also unable to add new tests to
> the tmtex test suite, although I did test my code by converting this
> file (attached["*.tm"]) to LaTeX to correctly obtain all table borders
> (attached["*.pdf"]).  I have also converted the same file to html, and
> it seems OK, although I don't know what the capabilities of the html
> converter are.

For tables, the same as the old tmtex converter.

 
> One bug does, however, come to mind:  If I set, say, a column border to
> "0ln", it will still show up in my LaTeX, because TeXmacs does not
> remove "0ln" cwith entries from the list of cwith entries.  How /do/ you
> remove a border once set ? Do you simply type "0" for the border width,
> and not "0ln" ?

Well... Currently tmtable is not that smart... Ultimately, the right
way would probably be to have null border values be #f, and other
border be tmlength objects.

If you you think you are getting in the spirit of it, you can try
improving the tmtable code.

BTW: a few notes about style.

  -- all code must be line wrapped at the 79th column.

  -- really try hard to make your code as readable as possible (your
     tmtex patch is not yet quite okay in that respect).

     That involves not trying to pack as much stuff as possible in a
     line, instead a line should be a unit of significance. But also
     you should try to keep the code compact.

     Any good hacker will tell you: good code lends itself well to a
     pretty presentation. You can often tell good code from bad code
     simply by the shape of the text blocks on the screen.

  -- try to mimic the whitespace conventions you see in the rest of
     the code.

I appreciate very much your code contributions. Keep going.

-- 
David Allouche         | GNU TeXmacs -- Writing is a pleasure
Free software engineer |    http://www.texmacs.org
   http://ddaa.net     |    http://alqua.com/tmresources
   address@hidden  |    address@hidden
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.




reply via email to

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