Re: [NTG-context] sorting list

2006-07-24 Thread Taco Hoekwater


Hans van der Meer wrote:
> Some things I do not understand about sorting:
> 
> This is the example:
> \def\sortprocess#1{{\bf #1}}
> \definesorting[city][cities][\callupcities]
> \setupsorting[city][criterium=all,command=\sortprocess]
> \city{Londen}
> \city{Berlijn}
> \city{New York}
> \city{Parijs}
> \city{Amstelveen}
> \placelistofcities
> \callupcities
> 
> question 1. The manual states (p.163) "When we add a command in the 
> third argument during the definition of the sorted list we may recall 
> sorted list with this command."
> However \callupcities gives me this error:
> Runaway argument?
> ! Paragraph ended before \callupcities was complete.
> 
>\par

\callupcities takes an argument, that is what is causing the
error message. But how it is supposed to work, I do not know.

> question 2. The command \sortprocess does work, the items are in bold. 
> But they now are typeset next to one another instead of each one on a 
> line by itself, as occurs without command=\sortprocess on the setup.

You have to extend \sortprocess if you want something besides making
a bold inlined list of cities. Why? Consider this idiom:

   \def\citylist{}
   \def\makecitylist#1{\doglobal\appendtocommalist{#1}\citylist}
   \setupsorting[city][criterium=all,command=\makecitylist]

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


Re: [NTG-context] setuphead and command

2006-07-24 Thread Taco Hoekwater


Hubertus Schmidt wrote:
> Hi all,
> 
> It's supposed to look like
> --
>   def  Define Variable
> --

This is somewhat closer:

   \def\CommandHeader#1%
 {\framed[frame=off,bottomframe=on,
  topframe=on,align=right,width=\textwidth]
 {\makeline #1}}

   \def\makeline#1#2%
 {\hbox to 10em{\hskip14pt\type{#1}\hss}\index{#1}{\it #2}}

   \definehead[Command][subject]
   \setuphead[Command][deeptextcommand=\CommandHeader]
   \starttext
   \Command{{def}{Define Variable}}
   \Command{{tsolve}{solve differential equation}}
   \stoptext

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


Re: [NTG-context] U3D (embedded 3D objects)

2006-07-24 Thread Renaud AUBIN




Hans Hagen a écrit :

  my guess is that trying to reverse engineer latex code will cost me more 
time that doing it directly the context way; the only thing that i need 
is the relevant annotation specs (someplace in the pdf manual)

(in context such code ends up in the drivers and it needs to work well 
with the more complex annot stuff)

Hans
  

See page 747 of PDFReference.pdf (1.6)

Should I use \pdfannot ? I've never done that before so can you link me
to an example (of the ConTeXt way) ?

Renaud



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


Re: [NTG-context] XY and papersize

2006-07-24 Thread Taco Hoekwater


Claus, Matt - eSpeed wrote:
> 
> However, when I change A4 to letter the output seems to introduce some
> "dy".  I experimented with some other paper sizes including defining my
> own and see inconsistent results.  Can anyone point out what I'm doing
> incorrectly?

It looks about right to me (using the latest context) but I could be
wrong. It might help to explictly define the "XY" paper size.

   \definepapersize[XY][width=2.5in,height=1in]

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


Re: [NTG-context] U3D (embedded 3D objects)

2006-07-24 Thread Renaud AUBIN




done see Re: [NTG-context] U3D (embedded 3D objects) 23.07.2006 02:27

Hans Hagen a écrit :

  [EMAIL PROTECTED] wrote:
  
  
I'm just working on this... I have succeeded in compiling U3D
viewer/converter/etc. for linux... I'll try to provide some custom made sample
from CAD program (windows or linux).

  

  
  ok 

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


  




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


Re: [NTG-context] U3D (embedded 3D objects)

2006-07-24 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
> I'm just working on this... I have succeeded in compiling U3D
> viewer/converter/etc. for linux... I'll try to provide some custom made sample
> from CAD program (windows or linux).
>
>   
ok 

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] U3D (embedded 3D objects)

2006-07-24 Thread Hans Hagen
Renaud AUBIN wrote:
>
> I have converted a CATIA 3D model of mine to u3d (the nice Mitsubishi 
> PA10 remodelled from a 2D drawing ;) ).
> For test, I have try to embed it to a LaTeX document with movie15, 
> here is the source and the result 
> http://renojrl.lrv.uvsq.fr/testbed/u3d/pa10-movie15.tgz
> (I have to get a better understanding of the views defs but it's not 
> the main problem)
>
> Maybe this package and its doc can be a good startpoint ?
my guess is that trying to reverse engineer latex code will cost me more 
time that doing it directly the context way; the only thing that i need 
is the relevant annotation specs (someplace in the pdf manual)

(in context such code ends up in the drivers and it needs to work well 
with the more complex annot stuff)

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] definesynonyms

2006-07-24 Thread Hans Hagen
Bernd Militzer wrote:
> Hi all,
>
>
> for a large ancestor-project I defined a set of informations for a  
> lot of persons like you can see below.
>
> QUESTION: how many synonyms  can I  max. define? I need about 4000 defs.
>
>   
a lot (as much as tex's hash + mem permits; the hash can be > 100K) 

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] Margin Kerning Problem

2006-07-24 Thread Hans Hagen
Mojca Miklavec wrote:
> On 7/23/06, Helin Gai wrote:
>   
>> Hi,
>>
>> I used the following code to set up margin kerning:
>>
>> \setupfontsynonym[cmr10][handling=hz]
>> \setupfontsynonym[Serif][handling=hz]
>> \usetypescript[cmr]
>> \setupbodyfont[cmr,10pt]
>> \setupalign[hz,hanging]
>>
>> Can someone please tell me what is going wrong?
>> Thanks!!
>> 
>
> Does the recipe on
> http://wiki.contextgarden.net/Protrusion#Use_with_Latin_Modern help
> you?
>   
because of tex's global font attribute assignments and font resource 
optimizations, one cannot add features after a font has been defined; so, in 
you rcase, the cmr fonts have already be defined

try the wiki recipe instead: 

- tell what handlings to use which what style 
- then define the typeface 
- then invoke it 

\setupalign is independent of this and can be applied afterwards when needed 

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] Charts, Graphs, Tufte, and ConTeXt

2006-07-24 Thread Hans Hagen
Sanjoy Mahajan wrote:
> But where you put one figure will affect the placement of later
> figures.  And maybe you paint yourself into a corner, and would like
> to backtrack and sacrifice excellent earlier placements in order to
> minimize terrible placements now...
>   
http://www.nieuwarchief.nl/serie5/index.php

gives some examplex of more complex layouts (done with a pretty old context 
btw); this is why column sets shows up (they will be used in future renderings) 

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] definesynonyms

2006-07-24 Thread Taco Hoekwater


Bernd Militzer wrote:
> Hi all,
> 
> for a large ancestor-project I defined a set of informations for a  
> lot of persons like you can see below.
> 
> QUESTION: how many synonyms  can I  max. define? I need about 4000 defs.

If you need only 4000 separate PIDs, that should work ok.

> or has someone a better idea to handle those informations.

But it is probably easier to write a small database interface
layer. Somewhat like this (note that I had to change \doGeTPID
as well).

   \def\PID[#1][#2]{\getparameters[PID#1][#2]}

   \def\doGetPID#1#2{\getvalue{PID#2#1}}

   \def\getPID#1{\doGetPID{Fam}{#1}, \doGetPID{Vor}{#1}~(#1)}

   \PID[268]
   [Fam=Rudolph,
Nam=Rudluffen,
Vor=Adam]

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


Re: [NTG-context] scaling reusableMPgraphic & some ConTeXt programming

2006-07-24 Thread Taco Hoekwater


Mojca Miklavec wrote:
> Hello,
> 
> the answers to these three questions are most probably one-liners, but
> I don't know which ones ;)
> 
> 1. How can I scale (an already defined) reusableMPgraphic? Simplified
> example of what I currently (want to) have:
> 
> % how should I change this definition?
> \def\usemygraphic[#1][#2]{\reuseMPgraphic{#1}}
> \usemygraphic[name][width=.7\textwidth]

Guessing:

   \def\usemygraphic[#1][#2]{\scaled[#2]{\reuseMPgraphic{#1}}}

> 
> 2. I have several graphics defined as
 > 
> How can I give a better name than \abc to the counter (the name should
> depend on #2 in order to be unique)?

Better use \definenumber instead of the low-level command.

> 
> 3. I would like to change \usemygraphic, so that
> \usemygraphic[othername] or \usemygraphic[othername][height=5cm] would
> resolve to
> \dorecurse{2}{\useMPgraphic{gpg:othername:\recurselevel}}

Where does this '2' come from?

> and \usemygraphic[name][n={1,3},width=8cm] (syntax might be different
> if necessary) to
> \reuseMPgraphic{gpg:name:1}
> \reuseMPgraphic{gpg:name:3}
> (with proper scaling if possible).
> 
> How should I start?

Create a commalist of desired numbers first (possibly using recursion),
then run \processcommalist on each item.

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


Re: [NTG-context] scaling reusableMPgraphic & some ConTeXt programming

2006-07-24 Thread Hans Hagen
Mojca Miklavec wrote:
> Hello,
>
> the answers to these three questions are most probably one-liners, but
> I don't know which ones ;)
>
> 1. How can I scale (an already defined) reusableMPgraphic? Simplified
> example of what I currently (want to) have:
>
> % how should I change this definition?
> \def\usemygraphic[#1][#2]{\reuseMPgraphic{#1}}
> \usemygraphic[name][width=.7\textwidth]
>   
\def\usemygraphic[#1][#2]{\scale[#2]{\reuseMPgraphic{#1}}

\usempgraphic[name][width=4cm,height=5cm]

\scale accepts the same scaling options as externalfigure

>
> 2. I have several graphics defined as
>
> \startGNUPLOTgraphic[1][name]
>   draw fullcircle scaled 3cm withcolor .625red;
> \stopGNUPLOTgraphic
> \startGNUPLOTgraphic[2][name]
>   draw fullcircle scaled 3cm withcolor .625green;
> \stopGNUPLOTgraphic
> \startGNUPLOTgraphic[3][name]
>   draw fullcircle scaled 3cm withcolor .625blue;
> \stopGNUPLOTgraphic
>
> \startGNUPLOTgraphic[1][othername]
>   fill fullcircle scaled 3cm withcolor .625red;
> \stopGNUPLOTgraphic
> \startGNUPLOTgraphic[2][othername]
>   fill fullcircle scaled 3cm withcolor .625green;
> \stopGNUPLOTgraphic
>
> and a pretty stupid definition:
>
> \long\def\startGNUPLOTgraphic
>   {\dodoubleargument\dostartGNUPLOTgraphic}
>
> \long\def\dostartGNUPLOTgraphic[#1][#2]#3\stopGNUPLOTgraphic % [number][name]
>   {% add to counter to note the nuber of the graphic
>  % define a new counter for the first time when you use it
>\doif{#1}{1}{\doglobal\newcounter\abc}% counter name has to depend on 
> #2
>\doglobal\increment\abc % assigning the value #1 to it would also be OK
>\startreusableMPgraphic{gpg:#2:#1}#3\stopreusableMPgraphic}
>
> How can I give a better name than \abc to the counter (the name should
> depend on #2 in order to be unique)?
>   
why do you need a counter

\long\def\dostartGNUPLOTgraphic[#1][#2]#3\stopGNUPLOTgraphic
  {\startreusableMPgraphic{gpg:#2:#1}#3\stopreusableMPgraphic}


>
> 3. I would like to change \usemygraphic, so that
> \usemygraphic[othername] or \usemygraphic[othername][height=5cm] would
> resolve to
> \dorecurse{2}{\useMPgraphic{gpg:othername:\recurselevel}}
> and \usemygraphic[name][n={1,3},width=8cm] (syntax might be different
> if necessary) to
> \reuseMPgraphic{gpg:name:1}
> \reuseMPgraphic{gpg:name:3}
> (with proper scaling if possible).
>   
you want all graphics?

\def\usemygraphic#1%
  {\doloop
 {\doifMPgraphicelse{gpg:#1:\recurselevel}
{\reuseMPgraphic{gpg:name:\recurselevel}}
{\exitloop}}} 

or so ... 


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] Setting to help with overflow in Metapost

2006-07-24 Thread Taco Hoekwater


[EMAIL PROTECTED] wrote:
> All,
> 
> This code is causing an overflow. Isn't there a setting that will allow 
> bigger numbers? 

That is not possible, I'm afraid.

There is actually a macro file that uses logarithmic numbers and
another one using strings as numbers, but neither can be used without
extensive changes to your code. My suggestion would be to use
gnuplot.

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


Re: [NTG-context] Setting to help with overflow in Metapost

2006-07-24 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
> All,
>
> This code is causing an overflow. Isn't there a setting that will allow 
> bigger numbers? 
>   
4096bp is the default max with (in metafun) 32K being the insecure max; next 
year there will be a metapost that has a higher limit 

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] Toggle output window open and closed in Scite

2006-07-24 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
> All,
>
> Anyone know how to toggle the output window open and closed in Scite?
>   

F8

 

-
  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] modes with Scite

2006-07-24 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
> All,
>
> I am using the Scite editor provided by one of the Context dristributions.
>
> Is there a way to include modes with one of the various compiling commands?
>   
btw, you can make a local scite options file and add menu items (key bindings); 
so you can map say ctrl-F10 to process your doc using your mode; see 
context.properties for examples); local scite files are per directory 

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] modes with Scite

2006-07-24 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
> All,
>
> I am using the Scite editor provided by one of the Context dristributions.
>
> Is there a way to include modes with one of the various compiling commands?
>   
no, but you can 

(1) temporary put \enablemode[...] at the to of the file
(2) use a separate file where you set the mode, and load the 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] sorting commalist?

2006-07-24 Thread Taco Hoekwater

Hi Hans,

Hans van der Meer wrote:
> In the article "Context System macros, part1: general macros" there are 
> all sorts of interesting and useful macros. Among these I have set my 
> eye on the processing of commalists.

I should extend that document, but I've lost the source :-(

> Question: is there a context macro that takes a commalist (either in a 
> token register or \the\tokenregister form) that returns a sorted 
> commalist (ascending or descending doesnt matter to me for the moment).

There is \sortcommalist (syst-ext.tex), but it only works for lists
of numbers, TeX does not know how to sort words. That type of sorting
has to be done externally.

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