[NTG-context] Re: listings.sty

2004-06-28 Thread Patrick Gundlach
Hello Peter,

 I suggested to the author of the very feature rich LaTeX-Listings package,
 Carsten Heinz, to port this package to ConTeXt, and it seems, that he is
 interested. But before doing it, there are some questions:

 * What do Hans and other people thing about that?

Hmm, I never use listings.sty with LaTeX. Once I used the ConTeXt
variant of listings.sty. Perhaps the ConTeXt built in support for
listings is sufficient.

 * listings.sty uses keyval.sty, how is the proper ConTeXt-way to do the
   same things as keyval, or should listings stay with keyval?

I'd suggest to go for the ConTeXt specific. I could help with it. See
syst-gen.tex and syst-ext.tex for details on the macros for a=b kind
of assignments in ConTeXt.

Patrick

-- 
texshow-web:  http://members.ping.de:8061
ConTeXt wiki: http://members.ping.de:8062
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: listings.sty

2004-06-28 Thread Hans Hagen
Patrick Gundlach wrote:
Hello Peter,
 

I suggested to the author of the very feature rich LaTeX-Listings package,
Carsten Heinz, to port this package to ConTeXt, and it seems, that he is
interested. But before doing it, there are some questions:
* What do Hans and other people thing about that?
   

what is listings.sty providing? 

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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: ConTeXt-Wiki

2004-06-28 Thread Patrick Gundlach
Hi,

 the idea of the keywords is very nice...
 in
 http://wiki.tcl.tk
 you can search for a specific page using the url
 http://wiki.tcl.tk/file

 even more, you can search all pages containing a word like in:

 http://wiki.tcl.tk/menu*

But this is not a pure keyword serach. This is just a fulltext search.

 perhaps it could be copied for ConTeXt wiki...

No, different software. But this is not the point, since you can
search though all pages with the instiki software that I use.

Patrick
-- 
texshow-web:  http://members.ping.de:8061
ConTeXt wiki: http://members.ping.de:8062
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: ConTeXt-Wiki

2004-06-28 Thread Patrick Gundlach
Hi,


 Also, this could be the url for hight level FAQ
 (this forum it not realy a hight level forum!)

Go ahead and put it in the wiki! Its up to us all to put content in
there.


 - how about ConTeXt future (why it is not open source?)

It is open source, even free software. You can go ahead and change
everything yourself. Pragma ADE has licenced this impressive and
valuable macro package under the terms of the GNU Public License
(GPL)! This is really great! (See mreadme.pdf for details.)


Patrick
-- 
texshow-web:  http://members.ping.de:8061
ConTeXt wiki: http://members.ping.de:8062
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] High level user macro (howto?)

2004-06-28 Thread Maurice Diamantini dom
Bonjour à tous,
One thing is missing in context (or not documented in reference manual?)
is a standard and easy way to build arbitrary parametrised high level 
macros.

For exemple, instead of
   \def\myCommand#9{...}
That I should call by
   \myCommand{param1}{param2}{...} {param9}
Id'like too keep default value for most of the parameters but param7
and write something like:
   \myCommand[param7=value7]{body}
In LaTeX, there is a package keyval for doing this
And context use this everywere, but I haven't seen anything for
a user beeing able to do this.
This is the base for building arbitrary complex user commands with
some defauld behavior, and then, if this personal macro is usefull
enough, building some user contribution library.
As a true exemple, see a latex package I've written some years
ago for drawing uml diagramms whith LaTeX command (using PsTricks).
This file is available at
  http://www.ensta.fr/~diam/latex/pst-uml/pst-uml-981218-09h41.tar.gz
(should now be available on CTAN too)
See documents for the samples (in french but the samples are in LaTeX 
and
drawing are in picture !)

One of the first exemple I'd like is some command to put some little
table as caractere in a line (see that as some personalised box):
  start of line
  $-$\myStack[border=1ex,baseline=0.5]{
  aaa  bbb \\
  aaa  bbb \\
  aaa  bbb
  }$-$
  end of line
Or a little command to draw some picture, with default but modifiable
parameters:
  $-$\myzigzag[dir=down,linewith=1pt,color=red,with=3\em]$-$
Using Metafun.
Cordialement,
-- Maurice
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: listings.sty

2004-06-28 Thread Holger Schöner
Hello,

 I suggested to the author of the very feature rich LaTeX-Listings package,
 Carsten Heinz, to port this package to ConTeXt, and it seems, that he is
 interested. But before doing it, there are some questions:
 
 * What do Hans and other people thing about that?
 
 what is listings.sty providing? 

listings.sty is one of the very few packages from LaTeX, which I am still 
missing in ConTeXt. I yet never extensively used the listings functionality 
provided by ConTeXt, but from what I remember from reading the 
documentation, the liststings.sty is much more flexible.

It has an easy interface to define new languages (like Opal, a functional
programming language used in courses at my university), allows flexible line
numbering (all, every n lines), it allows customization of all fonts (line
numbers, keywords, comments, ...), indenting, ...

Most importantly for me: It allows easy escaping to TeX. One option is to 
interpret all comments as (La)TeX code. This was very useful for typesetting 
correctness proofs of programs using the Hoare Calculus, because it makes 
such listings much more readable. Then there are other niceties already 
provided by ConTeXt, like frames, floats, etc.

Oh, one other nice thing is, that it allows to use proportional fonts (is 
that the right translation? I mean non-fixed width fonts), and still can 
keep indentations correctly, e.g. with assignments like

alongvariable = 1;
short = 2;

I think the algorithm is described a little in the documentation. As far as 
I remember, it assumes a (configurable) average character width of 
proportional fonts and typesets every word in a box of the width 
corresponding to the number of characters included in the word.

These were at least the features most important to me ...

-- 
Holger F. Schoener  TU Berlin; Dept. IV: EE and Computer Science
[EMAIL PROTECTED]   http://www.cs.tu-berlin.de/~hfsch/
Rooms FR2525Tel: +49-30-314-73115, Fax: -73121
Office FR 2-1   Franklinstr. 28/29, D-10587 Berlin, Germany
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Extending metapost

2004-06-28 Thread Taco Hoekwater

Hi Hans, group,


I saw this passing by in another thread, and since I am myself currently working
on a C port of metapost:

 (and ... i also want to look into extending tex and metapost)

What kind of extensions to metapost do you (or anyone else) have in mind?

Progress update: 

Work on the C port of MP is coming along nicely. Work progress is fairly slow 
because I have to make change quite a lot of small changes to the code.
I expect to have a 'working' test executable in about 3 or 4 weeks.

libMP will have (at least) the following changes wrt. the Web source code:

- C strings instead of a string pool ( and no pool file).
- A struct METAPOST instance that gets moved around, instead of global variables
  (libMP will be thread-safe)
- A namespace for all externally visible procedures and enums (prefix 'mp')
- mp_initialize() and mp_finish() calls to allow clean restarts.
- All file I/O will be configurable (through callbacks)
- PostScript output will be isolated from the other output. (to allow other
  output backends in the future).




-- 
groeten,

Taco
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] High level user macro (howto?)

2004-06-28 Thread Giuseppe Bilotta
Saturday, June 26, 2004 Maurice Diamantini dom wrote:

 Bonjour à tous,

 One thing is missing in context (or not documented in reference manual?)
 is a standard and easy way to build arbitrary parametrised high level
 macros.

 For exemple, instead of
 \def\myCommand#9{...}
 That I should call by
 \myCommand{param1}{param2}{...} {param9}

 Id'like too keep default value for most of the parameters but param7
 and write something like:

 \myCommand[param7=value7]{body}

It is true, we need a programming in ConTeXt manual. It is
still possible to 'know' how to do things by looking at the way
things are done in ConTeXt itself. For example, in your case
you want something like this:

\def\myCommand[#1]#2{%
 \rawgetparameters[myCommand][param1=defaultvalue1,param2=defaultvalue2,#1]%
 do something with \csname myCommandparam1\endcsname and #2}


This is of course very draft, and can be highly tuned and done
multilingual, but that's much more complex.

-- 
Giuseppe Oblomov Bilotta



___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] High level user macro (howto?)

2004-06-28 Thread Taco Hoekwater

Hi Maurice,

The 'key' to the keyval functionality in ConTeXt are two macros called
\getparameters and \processaction.

Here is a 'quickstart', assuming you want to define \myzigzag:

%
\unprotect % enable exclamations in macro names

\def\myzigzag#1[#2]{% 
  % the #1 makes sure we allow a space before the bracket
  %
  \getparameters[ZZ][Dir=,Linewidth=1pt,Color=Red,Width=3em,#2]
  %
  % Now you have a set of new macros that all start with ZZ. 
  % At least there are \ZZDir,\ZZLinewidth, \ZZColor and \ZZWidth
  % (these have default values) but possibly others as well, 
  % depending on user input.
  % 
  % Here's a usage example: 
  %
  \edef\mywidth{\ZZWidth}%
  %
  % If you want to use keyword values, then you also need 
  % to use \processaction.
  % 
  % Say you want Dir to be mandatory and that it 
  % accepts 4 directional keywords, as well as a direct 
  % angle specification.
  %
  % I've used all mixed case keywords, because otherwise
  % you might run into conflicts with the multilingual interface
  %
  \expandafter\processaction\expandafter[\ZZDir]
[Down   =\def\Dir{270},
 Left   =\def\Dir{180},
 Up =\def\Dir{90},
 Right  =\def\Dir{0},
 \s!default =\errorDir, 
 \s!unknown =\checkDir{\ZZDir}]
  % 
  % \s!default may be triggered because \ZZDir's expansion is 
  % empty unless the user supplied something.
  %
  % The first argument to \processaction has to be expanded,
  % so you need the \expandafter's.q
}

% for completeness, here is an example definition of \checkDir and
% \errorDir:

\def\errorDir{%
   \def\Dir{0}% error recovery
   \message{Please supply Dir argument}%
}

\def\checkDir#1{%
  \doifnumberelse {#1}
  {\def\Dir{#1}}
  {\message{Invalid Dir argument! (#1)}}
}

\protect % end of definitions


On Sat, 26 Jun 2004 11:51:14 +0200, Maurice wrote:

 Bonjour à tous,
 
 One thing is missing in context (or not documented in reference manual?)
 is a standard and easy way to build arbitrary parametrised high level 
 macros.
 


-- 
groeten,

Taco
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: High level user macro (howto?)

2004-06-28 Thread Patrick Gundlach
Bonjour Maurice,

 One thing is missing in context (or not documented in reference manual?)
 is a standard and easy way to build arbitrary parametrised high level
 macros.


what about:

\def\myCommand{\dosingleempty\doMyCommand}

\def\doMyCommand[#1]{%
  \getparameters[XYZ][#1]% define your own ``namespace''
  \getvalue{XYZtexti}
}
\starttext
\startlines
Hello \myCommand
\setvalue{XYZtexti}{World}
Hello \myCommand
Hello \myCommand[texti=Maurice]
\stoplines
\stoptext


Patrick
-- 
texshow-web:  http://members.ping.de:8061
ConTeXt wiki: http://members.ping.de:8062
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] High level user macro (howto?)

2004-06-28 Thread Hans Hagen
Giuseppe Bilotta wrote:
It is true, we need a programming in ConTeXt manual. It is
still possible to 'know' how to do things by looking at the way
things are done in ConTeXt itself. For example, in your case
you want something like this:
\def\myCommand[#1]#2{%
\rawgetparameters[myCommand][param1=defaultvalue1,param2=defaultvalue2,#1]%
do something with \csname myCommandparam1\endcsname and #2}
 

There is 

 \setvariables [yournamespace] [yourvar=yourval]
which operates independent of the language interface
 \getvariable{yournamespace}{yourvar} 

can be used to pick up a var
The most important issue here is that you need to use some unique prefix, preferable something MyPrefix (capital and verbose). 

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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] compile problems

2004-06-28 Thread Olaf Weber
Hans Hagen writes:
 Idris Samawi Hamid wrote:

 TeX run : 1
 
 EOMEGA: unrecognized option `-translate-file=natural.tcx'
 Try `EOMEGA --help' for more information.
 
 Maybe GB/Olaf can let aleph/eomega ignore that (or other unknown)
 switches? (so that we don't need to set up those tex's differently)

Upcoming TeXlive should do that; you do get a warning but the program
will muddle on.

-- 
Olaf Weber

   (This space left blank for technical reasons.)

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re[2]: [NTG-context] High level user macro (howto?)

2004-06-28 Thread Giuseppe Bilotta
Monday, June 28, 2004 Hans Hagen wrote:

 There is

   \setvariables [yournamespace] [yourvar=yourval]

 which operates independent of the language interface

   \getvariable{yournamespace}{yourvar} 

 can be used to pick up a var

What is the difference between setvariable and getparameters?

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: listings.sty

2004-06-28 Thread Hans Hagen
Peter Münster wrote:
On Mon, 28 Jun 2004, Hans Hagen wrote:
 

what is listings.sty providing? 
   

Hello Hans,
here some features of listings.sty:
- support for a lot of languages (for example C)
- easy to add further languages
- line breaking (see my email from 19. June mentioning \lstinline)
- line numbering
- different options for column alignment
- escaping to TeX
- layout elements (frames, spacing, background, captions, etc)
- indexing
- floating listings
- special treatment of comments
- a lot more...
I don't know about all the \definetyping features (only those, that are
documented), perhaps the capabilities of ConTeXt are already sufficient. On
the other side, listings.sty is a very great package and mostly written in
Plain TeX. So perhaps it's worth the effort. I don't know...
 

A verbatim environment is tricky because one has to play with catcodes and the endcondition. There are also some spacing issues when used in combination with other macro package features. Another complication is that active characters are used for other features as well. I had put it on my todo list to reimplement some of the context verbatim features using etex (more robust and faster). 

When cooking up a new environment, it's best to separate functionality and use built in support when possible. For instance, line numbering, layout elements, floating listings are kind of independent of such a mechanisms.  

If some features are missing in the current verbatim environment (one of the older parts of context) i can add them if needed. On the other hand,  it does not hurt to have multiple alternatives. 

One potential problem with third party modules is that they set tex variables without context knowing about it. Also, redefining low level context macros is asking for problems, so if some special kind of support is needed for a user module, better ask me so that i can provide that low level feature in the kernel. Third party modules start with t-*

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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re[2]: [NTG-context] High level user macro (howto?)

2004-06-28 Thread Giuseppe Bilotta
Monday, June 28, 2004 Hans Hagen wrote:

 Giuseppe Bilotta wrote:

What is the difference between setvariable and getparameters?
  

 the second one does interface translations 

Sorry, I meant rawgetparameters

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: High level user macro (howto?)

2004-06-28 Thread Maurice Diamantini
Le 28 juin 04, à 11:49, Patrick Gundlach a écrit :
One thing is missing in context (or not documented in reference 
manual?)
is a standard and easy way to build arbitrary parametrised high level
macros.
Thank to you(s) for your macros exemples,
I've now to build mu own sample in the next two
months, and I then will surely post news questions
before it is finished :-)
I like the fact one can have our own namespace.
ConTeXt is realy amazing : should be called LaTeX3
(as soon as the reference manual is finished ;-)
Amicalement,
-- Maurice
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: listings.sty

2004-06-28 Thread Peter Mnster
On Mon, 28 Jun 2004, Hans Hagen wrote:

 When cooking up a new environment, it's best to separate functionality
 and use built in support when possible. For instance, line numbering,
 layout elements, floating listings are kind of independent of such a
 mechanisms.

Yes, for such features the LaTeX built in mechanisms are used (for example
\addcontentsline{lol}{lstlisting}{...}. Here the LaTeX interface must be
replaced by a ConTeXt interface.

 If some features are missing in the current verbatim environment (one of
 the older parts of context) i can add them if needed. On the other hand,
 it does not hurt to have multiple alternatives.

In general, the users prefer one solid way to go, instead of multiple
choices but each one with missing features.
If you want to rewrite the verbatim environment anyway, perhaps it's the
easiest way to take listings.sty as starting point?

Personally for me, today I'm just looking for two features:
- line breaking as suggested in my email from 19. June (- \hyphenatedfile)
- support for C and C++

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: Re: listings.sty

2004-06-28 Thread Nikolai Weibull
* Peter Münster [EMAIL PROTECTED] [Jun 28, 2004 20:00]:
 Personally for me, today I'm just looking for two features:
 - line breaking as suggested in my email from 19. June (- \hyphenatedfile)
 - support for C and C++

What I think would work best is if someone could document the verbatim
environment thoroughly---and how to add new types---so that it would be
easy to add support for C and C++ oneself.  I'm probably going to need
to define one for Ruby at some point,
nikolai

--
::: name: Nikolai Weibull:: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA:: loc atm: Gothenburg, Sweden:::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(linux[\021%six\012\0],(linux)[have]+fun-97);}
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] synopsis / column(set)s?

2004-06-28 Thread Alexander Klink
Hi all,

I am trying to make a synopsis, i.e a text where in the leftmost
column the original document can be read, in the middle the changes
and in the right column the reasons for the changes.

So basically I want to typeset first some text in the leftmost
column (over several pages, on a grid), and then the one in the
middle and then the one on the right.

Is there an easy way to do this using column(set)s?

Any help greatly appreciated ...

Greetings,
AleX
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context