[NTG-context] linenotes/footnotes

2006-04-22 Thread Thomas A . Schmitz
Hi gang,

I played arund some with the linenotes mechanism provided in core- 
lnt.tex and an example provided by Hans about a year ago. On p.  
398-399 of the TeXbook, Knuth shows how footnotes can be set as  
ordinary paragraphs in plain TeX, with no paragraph breaks between  
single notes. In the ConTeXt mechanism, I see only the possibility to  
determine the number of columns on which notes will be set. Can  
Knuth's solution somehow be hooked into the ConTeXt notes?

Best

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt +Tioga

2006-04-22 Thread Hans Hagen
Jilani Khaldi wrote:
 interesting (i assume that it produced pdf) 
  

 
 Yes with the difference that while Metapost, Asympthote and GLE 
 (http://glx.sourceforge.net/)  use their own proprietary language to do 
 PDF graphics, Tioga(*) uses Ruby, a full featrured and very nice 
 language. I even see more presence in the future of Ruby in ConTeXt. Isn'it?
   
well, if we can have \ruby {...} as we will have \lua {...} 

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] updating

2006-04-22 Thread Hans Hagen
Aditya Mahajan wrote:
 On Fri, 21 Apr 2006, Hans Hagen wrote:
   
 fyi:

 if you want to update (e.g. the new kurier zip) you can try something

 textools --updatetree kurier-tex e:\tex\texmf

 (take you rown tree roots)
 

 Thanks for this. I was going to ask how to install the new files :-)

   
 this will tell you what will be updated, merged and deleted (use --force
 to really do it)
 

 --merge --force is also needed
   
and --delete if you also want to clean up 

there's also tmftools --analyze 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-22 Thread Hans Hagen
nico wrote:
 On Thu, 20 Apr 2006 08:34:44 +0200, Renaud AUBIN [EMAIL PROTECTED] wrote:

   
 3. How to obtain (I,II,III,IV) for part numbering ?
 

 \setupsection[section-1][conversion=Romannumerals]

 seems ok, but I would find more natural to be able to write the following,  
 at least to make the conversion local to parts (not applied to any other  
 heading defined with the same level):

 \setuphead[part][conversion=Romannumerals]
   
\starttext

\definehead[xx][chapter]

\def\sectionofhead#1{\executeifdefined{\??ko#1\c!section}\s!unknown}

\sectionofhead{chapter}
\sectionofhead{xx}

\setupsection[\sectionofhead{part}][conversion=Romannumerals]

\stoptext


in a next release i'll implement auto-indirectness so that 

setupsection[chapter][conversion=greek]
\setupsection[section][conversion=characters]

will work as well (rather trivial patch) 

Hans 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt + asymptote

2006-04-22 Thread Hans Hagen
there's also:

ftp://tug.ctan.org/pub/tex-archive/graphics/pgf

(although for context i'd rewrite the backend drivers a bit in order to 
be more integrated)

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] linenotes/footnotes

2006-04-22 Thread Hans Hagen
Thomas A.Schmitz wrote:
 Hi gang,

 I played arund some with the linenotes mechanism provided in core- 
 lnt.tex and an example provided by Hans about a year ago. On p.  
 398-399 of the TeXbook, Knuth shows how footnotes can be set as  
 ordinary paragraphs in plain TeX, with no paragraph breaks between  
 single notes. In the ConTeXt mechanism, I see only the possibility to  
 determine the number of columns on which notes will be set. Can  
 Knuth's solution somehow be hooked into the ConTeXt notes?
   
it actually is (and has been present for a while)

n=0 should do that but a few days ago i found out that it got broken when i 
implemented multiple notes, i'll send you the latest core-not file 

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] linenotes/footnotes

2006-04-22 Thread Thomas A. Schmitz
Hans Hagen wrote:

 it actually is (and has been present for a while)

 n=0 should do that but a few days ago i found out that it got  
 broken when i implemented multiple notes, i'll send you the latest  
 core-not file

 Hans


How could I ever doubt it? :-) But the patch isn't quite working, now  
notes are typeset on top of each other.

Thanks

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt + asymptote

2006-04-22 Thread andrea valle
I discovered conTeXt+metapost because I was not satisfied with the 
limited capabilties of pgf for my graph music project.
I have to say that I was forcing pgf beyond its scope, but in any case 
it is not intended as a complex, global plotting system, as far as I 
understand.

Best

-a-


On 22 Apr 2006, at 10:38, Hans Hagen wrote:

 ftp://tug.ctan.org/pub/tex-archive/graphics/pgf
Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
[EMAIL PROTECTED]

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-22 Thread nico
On Sat, 22 Apr 2006 10:24:58 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

 nico wrote:
 On Thu, 20 Apr 2006 08:34:44 +0200, Renaud AUBIN [EMAIL PROTECTED]  
 wrote:


 3. How to obtain (I,II,III,IV) for part numbering ?


 \setupsection[section-1][conversion=Romannumerals]

 seems ok, but I would find more natural to be able to write the  
 following,
 at least to make the conversion local to parts (not applied to any other
 heading defined with the same level):

 \setuphead[part][conversion=Romannumerals]

 \starttext

 \definehead[xx][chapter]

 \def\sectionofhead#1{\executeifdefined{\??ko#1\c!section}\s!unknown}

 \sectionofhead{chapter}
 \sectionofhead{xx}

 \setupsection[\sectionofhead{part}][conversion=Romannumerals]

 \stoptext


 in a next release i'll implement auto-indirectness so that

 setupsection[chapter][conversion=greek]
 \setupsection[section][conversion=characters]

 will work as well (rather trivial patch)

Ok, but then

\definehead[xx][chapter]

\setupsection[\sectionofhead{chapter}][conversion=Romannumerals]
\setupsection[\sectionofhead{xx}][conversion=Character]

will put Character conversion for both chapter and xx heading. That's why  
i thought it could be interesting to have the conversion option also for  
setuphead, to limit the conversion to one heading.

btw, it seems strange to have so many setuphead command options  
(textcommand, numbercommand, deepnumbercommand) to format completely the  
head rendering, and not the ability to change only the head number  
conversion without changing the whole global section level.

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt +Tioga

2006-04-22 Thread Taco Hoekwater
Hans Hagen wrote:
 Jilani Khaldi wrote:
 
interesting (i assume that it produced pdf) 
 

Yes with the difference that while Metapost, Asympthote and GLE 
(http://glx.sourceforge.net/)  use their own proprietary language to do 
PDF graphics, Tioga(*) uses Ruby, a full featrured and very nice 
language. I even see more presence in the future of Ruby in ConTeXt. Isn'it?
  
 well, if we can have \ruby {...} as we will have \lua {...} 

It is just my 2c, but I really dislike the Tioga approach. It feels
like typesetting a book in TeX by writing a single-shot pascal
program. ;-)

Specifically, I find code like this (Tioga):

   move_to_point(x0, y0)
   append_curve_to_path(x1, y1, x2, y2, x3, y3)

far uglier than this (Asymptote/MetaPost):

   z0.. controls z1 and z2 .. z3

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] First space shown in a referenced itemize head

2006-04-22 Thread nico
Hello,

When a reference is set to \head, a space after the square brackets  
appears in the output. Shouldn't it be ignored? Applying a reference to  
\item does not show the problem.

Besides, what is the best way to put item or head text in square brackets?  
Using \relax works but I'm not sure if it's the recommended method.

Here is an example:

\starttext

\startitemize[n][headstyle=bold]
\head Head1 \par
   Body1
\head Head2 \par
   Body2
\head[u]Head3 \par
   Body3
\head[v] Head4 \par
   Body4
\head[v]  Head4 \par
   Body4
\head\relax[Head in brackets] \par
   Body5
\head\relax  [Head in brackets] \par
   Body6
\item Item1
\item   Item2
\item[w]Item3
\item[x] Item4
\item[y] Item4
\item\relax[Item in bracket]
\item\relax  [Item in bracket]
\stopitemize

\stoptext

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-22 Thread Hans Hagen
nico wrote:
 On Sat, 22 Apr 2006 10:24:58 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

   
 nico wrote:
 
 On Thu, 20 Apr 2006 08:34:44 +0200, Renaud AUBIN [EMAIL PROTECTED]  
 wrote:


   
 3. How to obtain (I,II,III,IV) for part numbering ?

 
 \setupsection[section-1][conversion=Romannumerals]

 seems ok, but I would find more natural to be able to write the  
 following,
 at least to make the conversion local to parts (not applied to any other
 heading defined with the same level):

 \setuphead[part][conversion=Romannumerals]

   
 \starttext

 \definehead[xx][chapter]

 \def\sectionofhead#1{\executeifdefined{\??ko#1\c!section}\s!unknown}

 \sectionofhead{chapter}
 \sectionofhead{xx}

 \setupsection[\sectionofhead{part}][conversion=Romannumerals]

 \stoptext


 in a next release i'll implement auto-indirectness so that

 setupsection[chapter][conversion=greek]
 \setupsection[section][conversion=characters]

 will work as well (rather trivial patch)
 

 Ok, but then

 \definehead[xx][chapter]

 \setupsection[\sectionofhead{chapter}][conversion=Romannumerals]
 \setupsection[\sectionofhead{xx}][conversion=Character]

 will put Character conversion for both chapter and xx heading. That's why  
 i thought it could be interesting to have the conversion option also for  
 setuphead, to limit the conversion to one heading.

 btw, it seems strange to have so many setuphead command options  
 (textcommand, numbercommand, deepnumbercommand) to format completely the  
 head rendering, and not the ability to change only the head number  
 conversion without changing the whole global section level.
   
it can be done at the sectionblock level (see chinese) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] linenotes/footnotes

2006-04-22 Thread Hans Hagen
Thomas A. Schmitz wrote:
 Hans Hagen wrote:

   
 it actually is (and has been present for a while)

 n=0 should do that but a few days ago i found out that it got  
 broken when i implemented multiple notes, i'll send you the latest  
 core-not file

 Hans

 

 How could I ever doubt it? :-) But the patch isn't quite working, now  
 notes are typeset on top of each other.
   
hm, can you send me your (small) test file? 

(make sure that at place time the same settings apply ! so either use 
\setupnote or also provide the setting sto \place...

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt +Tioga

2006-04-22 Thread Jilani Khaldi

It is just my 2c, but I really dislike the Tioga approach. It feels
like typesetting a book in TeX by writing a single-shot pascal
program. ;-)

Specifically, I find code like this (Tioga):

   move_to_point(x0, y0)
   append_curve_to_path(x1, y1, x2, y2, x3, y3)

far uglier than this (Asymptote/MetaPost):

   z0.. controls z1 and z2 .. z3

  

Very true, but you forgot that in Tioga everything is done inside Ruby 
interpreter. Tioga is a Ruby extension so you could use the power of 
Ruby, its standard library and all the other extensions made for it 
inside Tioga.
However, I don't like Asymptote, just seeing things like this:
--
struct parent {
real x=1;
public void virtual(int) {write (0);}
void f() {virtual(1);}
}
parent operator init() {return new parent;}
void write(parent p) {write(p.x);}
struct child {
parent parent;
real y=2;
void virtual(int x) {write (x);}
parent.virtual=virtual;
void f()=parent.f;
}
parent operator cast(child child) {return child.parent;}
child operator init() {return new child;}
parent p;
child c;
write(c); // Outputs 1;
p.f(); // Outputs 0;
c.f(); // Outputs 1;
write(c.parent.x); // Outputs 1;
write(c.y);
---
But, do we really need a baroque language like this to just draw some 
primitive graphics?

jk

--
Jilani KHALDI
http://jkhaldi.oltrelinux.com

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] 2c considerations about win installer

2006-04-22 Thread olivier
On Fri, 21 Apr 2006 01:33:04 +0200, andrea valle wrote:

 Dear all,
 I'm using conTeXt to create automatic documentation about sound 
 classification. The idea is that starting from an html file collecting 
 infos about sounds my program can generate some schematic images using 
 R and POV-Ray and to create a conTeXt file including both images  and 
 textual information.
 
 Now, I'd like to share this work with my students. I'm on macosx, 
 they're typically on win. My program is in python so it's 
 cross-platform, so no problem. Obviously they can annotate sounds,  
 generate images and include them manually in a MS word file. But I'd 
 prefer that they compile the conTeXt file.
 
 On two win machines I tried to install conTeXt using the complete 
 package (shipped with Scite: nice). I had always (different) troubles 
 (on each machine) with environment variable (e.g. for Perl): actually 
 I'm not able to run conTeXt.
 
 Hacking a bit, eventually asking the list, I think I will solve the 
 problem. But I don't think that my students can do, as I suspect that 
 they probably not even know what is PATH. And I cannot help them on 
 each installation.
 
 So, more generally, I was asking myself if it would not be possible 
 (and better) to have an .exe installer as usual happens in win, 
 including Perl, maybe Ruby (+ or- 20 Mb doesn't change too much). 
 Double click, and it set ups all the installation parameters. A 
 completely autonomous installer would allow many people to try, use  
 and  get fond conTeXt (and maybe to leave Word) without having to 
 struggle with problems which typically lead people to leave out.
 
 It seems to me that a similar installer would be a refinement in the 
 spirit of the actual mswincontext distro.
 At the end, it's not that far form Gerben's distro on macosx. It does 
 everything for me...
 Or maybe am I missing something?
 
 Just my 2 c
 
 Best
 
 -a-
 
 
 
 Andrea Valle
 DAMS - Facoltà di Scienze della Formazione
 Università degli Studi di Torino
 http://www.semiotiche.it/andrea
 [EMAIL PROTECTED]

If I'm not wrong,

If you go on http://www.pragma-ade.com/dir/context/install/ (click
documents  directory view  context  install), you will find that the
bigger *.zip (cdwincontext.zip) contains Perl  Ruby, while
mswincontext.zip no. So you can run Context out of the box with
cdwincontext. (untested, because I got Perl  Ruby already)

Your students can also install Ruby (single click .exe
 : Rubyinstaller from
 : http://rubyforge.org/frs/download.php/9417/ruby184-16_rc1.exe) 
and Perl (single click .exe : activePerl
:http://www.activestate.com/Products/ActivePerl/) whithout any pb's of
adding new executables to the path, since it's done while installation. 

Cheers

-- 
olivier Turlier


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-22 Thread nico
On Sat, 22 Apr 2006 12:16:10 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

 nico wrote:
 nico wrote:

 \setuphead[part][conversion=Romannumerals]
 [...]
 Ok, but then

 \definehead[xx][chapter]

 \setupsection[\sectionofhead{chapter}][conversion=Romannumerals]
 \setupsection[\sectionofhead{xx}][conversion=Character]

 will put Character conversion for both chapter and xx heading. That's  
 why
 i thought it could be interesting to have the conversion option also for
 setuphead, to limit the conversion to one heading.

 btw, it seems strange to have so many setuphead command options
 (textcommand, numbercommand, deepnumbercommand) to format completely the
 head rendering, and not the ability to change only the head number
 conversion without changing the whole global section level.

 it can be done at the sectionblock level (see chinese)

Hm, I've missed something. I see nothing about sectionblock in chinese,  
but at page 10 there is:

\setuphead [section] [conversion=chinese]

\setuphead [chapter] [conversion=]
\setuphead [section] [conversion=numbers]

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] 2c considerations about win installer

2006-04-22 Thread Mari Voipio
olivier wrote:
 Your students can also install Ruby (single click .exe
  : Rubyinstaller from
  : http://rubyforge.org/frs/download.php/9417/ruby184-16_rc1.exe) 
 and Perl (single click .exe : activePerl
 :http://www.activestate.com/Products/ActivePerl/) whithout any pb's of
 adding new executables to the path, since it's done while installation. 

Except that I found out the very hard way, that at least Ruby installs 
nicely for a power user, but doesn't change the path unless the 
installation is done when logged in as Administrator - which may be a 
problem in a multi-user environment.

Other than that, I haven't had any problems with newer versions of the 
MSWinConTeXt distribution (the one that unzips into 'isoimage' folder). 
I'm currently running the April 10 version from CD at work and once Perl 
and Ruby got installed into the path, the system has been really easy to 
use. [I downloaded the mswincontext.zip, unzipped and burned the 
*contents* of the isoimage folder onto a CD - and that's it, then.)

Yes I agree, it is harder to put a working ConTeXt into Windows than 
into a Mac where it was *very* easy, but with Administrator rights to 
Windows2000/XP, the abovementioned Perl and Ruby installation packages 
are no problem and after that things just work.


Mari
(multi-OS user, but best in Windows)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Feature request: Creating tables from (tab-separated) values

2006-04-22 Thread Mojca Miklavec
Hello,

This idea described below was partially inspired by gnuplot
contemptations, but mainly because writing tables with both LaTeX 
ConTeXt is too complex in most cases.

Natural tables are great since they offer anough flexibility to do
just about anything with tables, but many tables are still simple m
values in n rows and for those it's an annoying task to write those
\NCs, \eTR\bTRs, ... even if it's just a matter of writing a
script to transform the values to a suitable form.

Christopher Creutzig has sent an interesting solution to the mailing
list some time ago (see
http://wiki.contextgarden.net/TABLE#Creating_tables_from_CSV_data_.28Comma_Separated_Values.29)
and since then I've been thinking about a similar, slightly more
powerful solution which could make table-typesetiting easier.

I don't have enough skills to implement it, but here are some
properties listed that such a solution should have. In case anyone
finds this little project doable ... It would solve quite some
headaches.

- [very important] a possibility to define own macros, so that it
would be easy to print any type of tables (natural tables, TaBlEs, ...
or whatever form that could possibly come to someone's mind); for
example \def\MyDef#1#2{\bTR\bTD#1\eTD\bTD#2\eTD\eTR}; the machinery
behind would only have to feed these macros properly according

- [important] possible to separate the data with different characters:
tab, comma, multiple spaces, ampersand (), ...

- [very useful] a possibility to read the data from a block
(\start...\stop...) or from a file; it would be handly to be able to
use the same data file for making a plot and for printing the data
into a table

- [useful] possibility to ignore lines starting with '#' (optional;
usually these are comments)

- [not crucial] if comma (,) is separating the data, a possibility to escape it

- [useful] a possibility to select which rows (columns) to print (for
example rows 1-3,8-last or even, ...)

- [optional, but still useful] replacing decimal points with commas

- [optional] if the table was supposed to have 4 colums and only 2 are
available, ignore/fill with empty arguments (don't panic with
unnecessary errors)

- [with luaTeX in mind] calculating sums of rows  columns  other
Excel-like calculations  references accross tables ;) - well, that
one wasn't meant seriously.

Thanks a lot,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt +Tioga

2006-04-22 Thread andrea valle
As far as we are discussing about graphics, actually my favorite and 
quick (and powreful) solution to produce pdf graphics not TeX-related 
is to use the graphic facilities of R, generating automatically scripts 
with code
(http://www.r-project.org/).

Best

-a-



On 22 Apr 2006, at 14:12, Jilani Khaldi wrote:


 It is just my 2c, but I really dislike the Tioga approach. It feels
 like typesetting a book in TeX by writing a single-shot pascal
 program. ;-)

 Specifically, I find code like this (Tioga):

   move_to_point(x0, y0)
   append_curve_to_path(x1, y1, x2, y2, x3, y3)

 far uglier than this (Asymptote/MetaPost):

   z0.. controls z1 and z2 .. z3



 Very true, but you forgot that in Tioga everything is done inside Ruby
 interpreter. Tioga is a Ruby extension so you could use the power of
 Ruby, its standard library and all the other extensions made for it
 inside Tioga.
 However, I don't like Asymptote, just seeing things like this:
 --
 struct parent {
 real x=1;
 public void virtual(int) {write (0);}
 void f() {virtual(1);}
 }
 parent operator init() {return new parent;}
 void write(parent p) {write(p.x);}
 struct child {
 parent parent;
 real y=2;
 void virtual(int x) {write (x);}
 parent.virtual=virtual;
 void f()=parent.f;
 }
 parent operator cast(child child) {return child.parent;}
 child operator init() {return new child;}
 parent p;
 child c;
 write(c); // Outputs 1;
 p.f(); // Outputs 0;
 c.f(); // Outputs 1;
 write(c.parent.x); // Outputs 1;
 write(c.y);
 ---
 But, do we really need a baroque language like this to just draw some
 primitive graphics?

 jk

 --
 Jilani KHALDI
 http://jkhaldi.oltrelinux.com

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context


Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
[EMAIL PROTECTED]

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Feature request: Creating tables from (tab-separated) values

2006-04-22 Thread Peter Münster
On Sat, 22 Apr 2006, Mojca Miklavec wrote:

 - [with luaTeX in mind] calculating sums of rows  columns  other
 Excel-like calculations  references accross tables ;) - well, that
 one wasn't meant seriously.

Hello Mojca,
should be possible even without luaTeX:

\input realcalc % can be found on CTAN

\def\SumFF{0}
\def\SumEUR{0}

\def\AddEUR#1{\Radd\SumEUR\SumEUR{#1}%
  \Rmul\R{#1}{6.55957}\Radd\R\R{0.005}\Rtrunc\R2\R
  \Radd\SumFF\SumFF\R \bTR \bTD\eTD \bTD#1\eTD \expanded{\bTD\R\eTD} \eTR}

\def\PrintSums{\bTR \bTD Sums: \eTD
  \bTD\Rtrunc\SumEUR2\SumEUR \SumEUR\eTD
  \bTD\Rtrunc\SumFF2\SumFF   \SumFF \eTD \eTR}

\starttext
\setupTABLE[r][each][align=flushright]
\setupTABLE[r][1][align=middle]
\bTABLE
\bTR \bTH\eTH \bTH Euro \eTH \bTH FF \eTH \eTR
\AddEUR{1.23}
\AddEUR{2.34}
\AddEUR{45.67}
\PrintSums
\eTABLE
\stoptext

With LaTeX, you can even replace the . by a , :

\documentclass{article}
\usepackage{dcolumn}
\input{realcalc}% on CTAN
\newcommand*\cc[1]{\multicolumn{1}{c}{#1}}
\def\scanwert\ignorespaces#1\unskip{\gdef\WERT{#1}#1}
\begin{document}
\begin{tabular}{{\scanwert}D{.}{,}{-1}%
{\Rmul\res\WERT{6.55957}\Radd\res\res{0.005}\Rtrunc\res2\res\res}%
D{.}{,}{-1}}%
  \cc{Euro}  \cc{FF}\\\hline
  20.33  \\
  20.3   \\
  20 \\
  14.46 
\end{tabular}
\end{document}

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Fieldstack Walk

2006-04-22 Thread Peter Rolf
Michal Kvasnička wrote:
 Good afternoon.
 
 Many thanks, this  solves the problem -- at least partially. The frames
 are `walking' now, but new problems appeared. I found that when I set
 `clickin=...', it is set it automatically to `clickout' as well, so one
 mouse click runs the JavaScript code twice. So I've set it this way:
 
 \definefieldstack[fgolds2]
  [sgolds1,sgolds2a,sgolds2b,sgolds2c,sgolds2d,sgolds2]
  [frame=off,option=,clickout=JS(Walk_Field{fgolds3}),clickin=]
 
 It's better, but I found that now frames are walking in a strange order.
 It is rather puzzling, since when it is invoked by \goto{...}[JS(...)],
 it works well. Moreover, it does different things at AdobeReader 7.x
 under Linux, and Acrobat 4.x under Windoze.
 
 Can you help me to solve it?

Took some time, but it works now. What I don't understand, is the
strange behaviour of the offset parameter in this case. See attached file.

Greets, Peter

 Many thanks once more.
 M.K.
 
 

% interface=en output=pdftex
% Time-stamp: Samstag, 22 April 2006 21:53:30; test.tex
%
\setupinteraction[state=start]
\setupcolors[state=start]

\starttext

\tracefieldstrue

\switchtobodyfont[96pt]

\def\FS#1{\framed[width=4cm,height=4cm,strut=no]{\red\bf#1}}%

\definesymbol [empty]   []

\definesymbol [one] [\FS{1}]
\definesymbol [two] [\FS{2}]
\definesymbol [three]   [\FS{3}]
\definesymbol [four][\FS{4}]
\definesymbol [five][\FS{5}]


\setupfield[interaction]
  [width=4cm,height=4cm,
%   frame=off,
   framecolor=blue,
   offset=none,% default offset causes different positioning of walk button and 
fieldstack
   clickin=JS(Walk_Field{sequence})]

\definefield[Walk][check][interaction][empty][empty]


\definefieldstack[sequence]
  [one,two,three,four,five]
  [frame=off,
   offset=none,% default offset causes different positioning of walk button and 
fieldstack
   clickin=JS(Walk_Field{sequence})]


\defineproperty[interaction][layer][title=walkfield, state=start]


\vbox{\forgetall
\nointerlineskip\smashedvbox{\fieldstack[sequence]}%
%
\startproperty[interaction]%
\nointerlineskip\field[Walk]
\stopproperty%
}

\blank[2cm]
\showfields

\stoptext


%%% Local Variables:
%%% mode: context
%%% TeX-master: 
%%% End:
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Table width trouble

2006-04-22 Thread nico
Hello,

I come back with that damn table test case. With release 2006.04.22:

- it works fine when the column width is passed as table option,
- it's wrong when the width is passed via a column setup only,
- it works ok when both table and column option are passed, and it's the  
column option that is used (which is the expected behaviour).
- it's ok when no width specified at all.

\starttext

\startbuffer
\bTR \bTD[nc=2] A \eTD\bTD x \eTD \bTD[nc=2] B \eTD \eTR
\bTR \bTD X \eTD \bTD[nc=3] C \eTD \bTD x \eTD \eTR
\bTR \bTD[nc=2] D \eTD \bTD x \eTD \bTD[nc=2] E \eTD \eTR
\stopbuffer

% ok
\bTABLE[frame=on,width=3em]
\getbuffer
\eTABLE

% nok, messy table
\bTABLE[frame=on]
\setupTABLE[c][each][width=3em]
\getbuffer
\eTABLE

% ok, width=3em for each column
\bTABLE[frame=on,width=0.1pt]
\setupTABLE[c][each][width=3em]
\getbuffer
\eTABLE

% ok
\bTABLE[frame=on]
\getbuffer
\eTABLE

\stoptext


Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] 2c considerations about win installer

2006-04-22 Thread Mojca Miklavec
On 4/21/06, Jilani Khaldi wrote:

 So, more generally, I was asking myself if it would not be possible
 (and better) to have an .exe installer as usual happens in win,
 including Perl, maybe Ruby (+ or- 20 Mb doesn't change too much).
 Double click, and it set ups all the installation parameters. A
 completely autonomous installer would allow many people to try, use
 and  get fond conTeXt (and maybe to leave Word) without having to
 struggle with problems which typically lead people to leave out.
 
 It seems to me that a similar installer would be a refinement in the
 spirit of the actual mswincontext distro.
 At the end, it's not that far form Gerben's distro on macosx. It does
 everything for me...
 Or maybe am I missing something?

 No, nothing; and it is very easy to do it, above all when it could be
 done with Ruby using the gem installation.

Have you already done that? If it's easy to do it, I think that there
would be many users would be really thankful if someone would have
written an one-click-installer.

MikTeX developer doesn't listen too much to requests from ConTeXt
users (although he does a marvellous job with MikTeX otherwise and has
enough of other things to do). But if I don't count the troubles
connected with not-so-good-support for ConTeXt in MikTeX, it stil
remains one of the easiest ways to install and update it.

It's staightforward to install standolne-ConTeXt, but not for
beginners and those having almost no knowledge about computers. An
installation .exe would be warmly welcome.

Mojca


 You can install and update
 ConTeXt with a single comand controlling indipendies and everything else
 needed. It is also very easy using InnoSetup
 (http://www.jrsoftware.org/isdl.php).
 Cheers,
 jk
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context