Re: [NTG-context] How to define my own list entry?

2008-05-07 Thread Wolfgang Schuster
On Wed, May 7, 2008 at 4:55 AM, Zhichu Chen [EMAIL PROTECTED] wrote:
 Hi everybody,

 I'm just writing a module to typeset the traditional Chinese books.
 Here is the thing: I use page-arrangement to put like 15 pages on
 one page or actually 30 pages on one page in a double-sided mode
 (I mean page 1 and page 2---which contain 15 mini-pages each---are
 on the same page), and yes I want to make a table of contents and
 some PDF bookmarks. But having searched the list, I find that I
 should use
 texexec --arrange file.tex
 to compile the file and get the real page number. That's not what I
 want. Because if I get one chapter on the second page, the page
 number is 31 rather than 2 which I really want it to be. And so do
 the bookmarks behave. If I click the bookmark of the first chapter,
 it will go to the 31st page of the PDF file if it has page 31. I don't
 really like the mess.

 I know it's normal, but I would like to know if there's any way to
 write the page counters I defined to the .tui or .tuo file so that I can
 totally handle them and display them on the contents and make
 the bookmarks not crazy any more.

core-lst:

- \definelist
- \writetolist
- \writebetweenlist
- \placelist

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bachotex

2008-05-07 Thread Hans Hagen
Aditya Mahajan wrote:

 Nice font, BTW.

Don Knuth's punk font.

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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to define my own list entry?

2008-05-07 Thread Zhichu Chen
Thanks Wolfgang,

After looking through the file you mentioned above, I finally find that
\writeutilitycommand
and \doutilities  are what I want now. Maybe I should look into core-uti.tex
to get more.

On Wed, May 7, 2008 at 2:15 PM, Wolfgang Schuster 
[EMAIL PROTECTED] wrote:

 On Wed, May 7, 2008 at 4:55 AM, Zhichu Chen [EMAIL PROTECTED] wrote:
  Hi everybody,
 
  I'm just writing a module to typeset the traditional Chinese books.
  Here is the thing: I use page-arrangement to put like 15 pages on
  one page or actually 30 pages on one page in a double-sided mode
  (I mean page 1 and page 2---which contain 15 mini-pages each---are
  on the same page), and yes I want to make a table of contents and
  some PDF bookmarks. But having searched the list, I find that I
  should use
  texexec --arrange file.tex
  to compile the file and get the real page number. That's not what I
  want. Because if I get one chapter on the second page, the page
  number is 31 rather than 2 which I really want it to be. And so do
  the bookmarks behave. If I click the bookmark of the first chapter,
  it will go to the 31st page of the PDF file if it has page 31. I don't
  really like the mess.
 
  I know it's normal, but I would like to know if there's any way to
  write the page counters I defined to the .tui or .tuo file so that I can
  totally handle them and display them on the contents and make
  the bookmarks not crazy any more.

 core-lst:

 - \definelist
 - \writetolist
 - \writebetweenlist
 - \placelist

 Wolfgang

 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___




-- 
Best Regards
Chen


Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
| www.sinap.ac.cn

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] processing xml

2008-05-07 Thread Roger Mason
Hello Wolfgang,

Wolfgang Schuster [EMAIL PROTECTED] writes:

 take a look into the XML manual, the magazine is a little bit special and
 not the best starting point.

 http://www.pragma-ade.com/show-man-15.htm

Thank you _very_ much.  That was just what I needed: to quote the
example I just ran: What a happy end to a small story!.  Context is
pretty amazing.

Cheers,
Roger
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC columns

2008-05-07 Thread Hans Hagen
Paul Gideon Dann wrote:
 Hi there,
 
I've got a table of contents for a document that's split into two 
 large sections.  I'm trying to display a centered heading for each 
 section, and subsections listed in two columns underneath each section 
 heading.  Hopefully this illustrates something of what I'm trying to 
 achieve:
 
 \midaligned{Section1}
 \startcolumns[n=2]
 Subsection1
 
 \stopcolumns
 
 \midaligned{Section2}
 \startcolumns[n=2]
 Subsection1
 
 \stopcolumns
 
 Does anyone know how to automate this for a table of contents?

% \setuplist
%   [chapter]
%   [after={\startcolumns\placelist[section]\stopcolumns}]


-
   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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC columns

2008-05-07 Thread Paul Gideon Dann
Thanks, that's genius!  However, the problem I now have is that the 
sections from *both* chapters are displayed below each chapter heading.  
That is, \placelist[section] generates the same content in both contexts.


Paul


Hans Hagen wrote:

Paul Gideon Dann wrote:
   

Hi there,

I've got a table of contents for a document that's split into two
large sections.  I'm trying to display a centered heading for each
section, and subsections listed in two columns underneath each section
heading.  Hopefully this illustrates something of what I'm trying to
achieve:

\midaligned{Section1}
\startcolumns[n=2]
Subsection1

\stopcolumns

\midaligned{Section2}
\startcolumns[n=2]
Subsection1

\stopcolumns

Does anyone know how to automate this for a table of contents?
 


% \setuplist
%   [chapter]
%   [after={\startcolumns\placelist[section]\stopcolumns}]


-
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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___
   
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC columns

2008-05-07 Thread Wolfgang Schuster
On Wed, May 7, 2008 at 1:38 PM, Paul Gideon Dann
[EMAIL PROTECTED] wrote:
 Thanks, that's genius!  However, the problem I now have is that the sections
 from *both* chapters are displayed below each chapter heading.  That is,
 \placelist[section] generates the same content in both contexts.

The followings works for me, give us a example.

\setuplist
  [chapter]
  [after={\startcolumns\placelist[section]\stopcolumns}]

\starttext

\placelist[chapter]

\dorecurse{3}
  {\chapter{Chapter}
   \dorecurse{4}{\section{Section}}}

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC columns

2008-05-07 Thread Wolfgang Schuster
On Wed, May 7, 2008 at 2:05 PM, Paul Gideon Dann
[EMAIL PROTECTED] wrote:
 The same example produces the problem for me.  Maybe I have an older
 version?  I got MacTex pretty recently (two weeks ago), but the version is:
 2007.01.12 15:56.  Here's the exact source:

 \definecombinedlist[content][chapter]

 \setuplist[chapter][after={\startcolumns\placelist[section]\stopcolumns}]

 \placecontent

 \starttext

 \dorecurse{3}
   {\chapter{Chapter}
\dorecurse{4}{\section{Section}}}
 \stoptext

Hi Paul,

I could reproduce the problem also with a recent ConTeXt, replace
\placecontent with \placelist[chapter] and it works, I found no way
to get the same result with combinedlist.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC columns

2008-05-07 Thread Paul Gideon Dann
Thanks Wolfgang.  It's unfortunate that I can't use combinedlist, but I 
think I'll be OK without.  Thanks again for your time, and I'll get in 
touch if I have any more difficulties :)


Paul


Wolfgang Schuster wrote:

On Wed, May 7, 2008 at 2:05 PM, Paul Gideon Dann
[EMAIL PROTECTED]  wrote:
   

The same example produces the problem for me.  Maybe I have an older
version?  I got MacTex pretty recently (two weeks ago), but the version is:
2007.01.12 15:56.  Here's the exact source:

\definecombinedlist[content][chapter]

\setuplist[chapter][after={\startcolumns\placelist[section]\stopcolumns}]

\placecontent

\starttext

\dorecurse{3}
   {\chapter{Chapter}
\dorecurse{4}{\section{Section}}}
\stoptext
 


Hi Paul,

I could reproduce the problem also with a recent ConTeXt, replace
\placecontent with \placelist[chapter] and it works, I found no way
to get the same result with combinedlist.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___
   
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Arranging into Signatures?

2008-05-07 Thread Michael . Urban
(I am still using mkii, which I suspect may matter in this case)
I am able to produce rather nice booklets on US Letter paper, printing
double-sided two-up pages that fold into a booklet and using 
texexec --arrange to make it work properly.  For documents longer
than about 32 pages, it isn't really practical to fold in half.
What would y'all recommend if I want to arrange the pages into
signatures, each containing about 32 pages, that can then be
somehow bound together?  An external PDF rearranger might
be an option, I suppose.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Arranging into Signatures?

2008-05-07 Thread Willi Egger
Hi Michael,

Arranging pages is not changed from MKII to MKIV. The possibilities are:

% \setuparranging[2*16] %section: one sheet 2 x 16 pages = 32 pages
% \setuparranging[2*8]  %section: one sheet 2 x 8 pages = 16 pages
% \setuparranging[2*4]  %section: one sheet 2 x 4 pages = 8 pages
% \setuparranging[2*2]  %section: one sheet 2 x 2 pages = 4 pages
% \setuparranging[2**2] %section: one sheet 2 x 2 pages = 4 pages
% \setuparranging[2SIDE]%2 pages next to each other single sided only!
% \setuparranging[2TOP] %2 pages above each other, single sided only!
% \setuparranging[2UP]  %2 pages next to each other, n sheets  
arranged for a single booklet!
% \setuparranging[2DOWN]%2 pages above each other,  n sheets  
arranged for a single booklet!
% \setuparranging[2TOPSIDE] %two odd pages on one side, two even  
pages verso, above each other
% \setuparranging[2*4*2]%section of 16 pages: 2 sheets, 4 pages  
front and backside
% \setuparranging[2*2*4]%section of 16 pages: 4 sheets, 2 pages  
front and backside
% \setuparranging[XY]   %one sheet with x rows and y columns

There is no option to make sections with 32 pages directly based on  
US-letter paper. Stil what you can do is to compile your document  
normally without arranging. In a second step you can use texexec to  
select ranges of 32 pages into a  section-1.pdf then in a  
section-2.pdf etc. In a third step you can arrange the pages in the  
section-files as usual with \setuparranging[2UP].

On the other hand I suggest to prepare sections of 16 pages. Then you  
can use the \setuparranging[2*4*2] or \setuparranging[2*2*4] options  
directly on the whole document. Normally I consider the sections  
containing 32 pages too thick for getting a nice book with rounded  
back. Anyhow if you have more than one section you will have to sew  
them together. This is much easier with 4 sections of 16 pages than  
with 2 sections of 32 pages.

Kind regards

Willi


On May 7, 2008, at 3:44 PM, [EMAIL PROTECTED] wrote:

 (I am still using mkii, which I suspect may matter in this case)
 I am able to produce rather nice booklets on US Letter paper, printing
 double-sided two-up pages that fold into a booklet and using
 texexec --arrange to make it work properly.  For documents longer
 than about 32 pages, it isn't really practical to fold in half.
 What would y'all recommend if I want to arrange the pages into
 signatures, each containing about 32 pages, that can then be
 somehow bound together?  An external PDF rearranger might
 be an option, I suppose.
 __ 
 _
 If your question is of interest to others as well, please add an  
 entry to the Wiki!

 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ 
 ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 __ 
 _

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC columns

2008-05-07 Thread Paul Gideon Dann
The same example produces the problem for me.  Maybe I have an older 
version?  I got MacTex pretty recently (two weeks ago), but the version 
is:  2007.01.12 15:56.  Here's the exact source:


\definecombinedlist[content][chapter]
\setuplist[chapter][after={\startcolumns\placelist[section]\stopcolumns}]

\placecontent

\starttext
\dorecurse{3}
  {\chapter{Chapter}
   \dorecurse{4}{\section{Section}}}
\stoptext

Paul


Wolfgang Schuster wrote:

On Wed, May 7, 2008 at 1:38 PM, Paul Gideon Dann
[EMAIL PROTECTED]  wrote:
   

Thanks, that's genius!  However, the problem I now have is that the sections
from *both* chapters are displayed below each chapter heading.  That is,
\placelist[section] generates the same content in both contexts.
 


The followings works for me, give us a example.

\setuplist
   [chapter]
   [after={\startcolumns\placelist[section]\stopcolumns}]

\starttext

\placelist[chapter]

\dorecurse{3}
   {\chapter{Chapter}
\dorecurse{4}{\section{Section}}}

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___
   
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] withshade (mlib)

2008-05-07 Thread Hans Hagen
Peter Rolf wrote:

 vardef define_linear_shade (expr a, b, ca, cb) =
  hide (_defined_cs_ := _defined_cs_ + 1 ;
  _defined_cs_pre_ [_defined_cs_] := ls ;
  _defined_cs_post_[_defined_cs_] := 0 1   decimal shadefactor 

  colordecimals ca ddecimal (a shifted shadeoffset)   
  colordecimals cb ddecimal (b shifted shadeoffset) )
  _defined_cs_
 enddef ;
 
 same for define_circular_shade...
 
 % testfile -
 % engine=luatex
 \setupcolors[state=start]
 \starttext
 
 \null
 \startMPcode
  path p;
  p:= unitsquare xyscaled(10cm,1cm);
  fill p withshade
  define_linear_shade(p,1,red,blue);
 \stopMPcode
 
 \stoptext

i uploaded a new beta but anyhow, your definition is wrong

\startMPcode
  path p;
  p:= unitsquare xyscaled (10cm,1cm) ;
  fill p withshade (define_linear_shade(llcorner p, urcorner 
p,red,blue)) ;
\stopMPcode

so, the first two arguments are pairs




-
   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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] problem with columns and TABLE

2008-05-07 Thread Peter Münster
On Mon, May 05 2008, Wolfgang Schuster wrote:

 this is not possible with the TABLE and table environments because of a
 switch in core-tsp, table are always splittet to the complete textheight.
 
 \ifinsidecolumns
   % brrr, assumes empty columns
   \global\setfalse\splitfloatfirstdone
   \scratchdimen\textheight % -- fixed height
   \!!donectrue
 \else
 
 You could try to use tabuate if possible because this did work also in
 column mode.

Hello Wolfgang,

Unfortunately, I need the TABLE environment for several reasons. Do you
think, that it would be possible to replace the \textheight by the
remaining height of the page?

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] some bugs in tracker can be closed

2008-05-07 Thread Peter Münster
On Mon, May 05 2008, Taco Hoekwater wrote:
 
  Perhaps these bugs can be closed now:
 
 Cetainly, or Perhaps? I have no time to test them myself,
 but of course I can close them blindly'

I you consider that MKII and DVI are obsolete and to be replaced by MKIV
and PDF, then certainly!

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] French typesetting?

2008-05-07 Thread Peter Münster
On Wed, May 07 2008, Oliv wrote:

 So, if I understand well there no in-depth French module for ConTeXt. [1]
 
 Isn't it possible to convert the LaTeX packages (Babel French and French
 LE) to ConTeXt?
 As I'm totally new to ConTeXt, I don't know if it's hardwork or automatic.

Hello Oliv,

If you want, I can add things to http://modules.contextgarden.net/t-french
What is needed?

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___