[NTG-context] Whitespace and quotechar in database module

2012-12-18 Thread Marco Patzer
Hi,

the following two database examples produce different output due to
the white space between the field separator and the quotechar.


\usemodule [database]

\defineseparatedlist
  [CSV]
  [quotechar=,
   before={\starttabulate[|l|l|]},
   after=\stoptabulate,
   first=\NC,last=\NR,
   left=,right=\NC]

\starttext

\startCSV
  alpha, loremloremlorem
  beta,ipsum, ipsum, ipsum
\stopCSV

\startCSV
  alpha, loremloremlorem
  beta, ipsum, ipsum, ipsum
\stopCSV

\stoptext


Can the parser be made tolerant to this space?

Marco


signature.asc
Description: Digital signature
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Centered multiline chapter title

2012-12-18 Thread hanak
Hello,

I need to format my chapters in the following way:

   - The chapters are centered (midaligned).

   - Some chapters are long, so they have to be multilined.

   - The chapter title should be in capital letters, but in the header should 
it be without capitalisation.

   - When the chapter title is multilined, only the first line should appear in 
the header, followed by ...,
 the same in TOC

   - When the chapter title is multilined, I want to choose the point of line 
break with \\
   

So something like this:

  \chapter{FIRST CHAPTER TITLE}  (in the header and TOC will be First chapter 
title)

  \chapter{SECOND CHAPTER TITLE \\ WHICH IS VERY VERY VERY LONG} (in the header 
and TOC will be Second chapter title...)


I tried the following setup for the chapter:  

\setuphead
  [chapter]
  [after={\blank[2*line,fixed]},
   header=empty,
   textcommand=\midaligned,
   style={\chapterfont\WORD},
   sectionset=none,
   indentnext=no
  ]


But when I try to process the file, I will get the following error:

structuresectioning  chapter @ level 2 : 0.1 - Second chapter 
title \\ which is very very very looong
! Missing } inserted.
 
system   tex  error on line 1 in file test.tex: Missing  ...
 
 1   \environment test_environment
 2 
 3 \startcomponent test19
 4 
 5 \product test
 6 
 7 
 8 \chapter{Second chapter title \\ which is very very very looong}
 9
 
inserted text 
}
to be read again 
   \endgroup 
\\-\endgroup 
  \par \doalignline {\hss }{\hss }\begingroup 
l.1 Second chapter title \\
which is very very very looong
\ctxcommand ...\directlua \zerocount {commands.#1}
  
\getheadtitle ...lecommand \relax \structuretitle 
  \else \normalexpanded 
{\no...
...
l.10 ...r title \\ which is very very very looong}


If I don't try to enforce line break in the title with \\, the file is 
processed without problem,
but also without making anyline break at all -- the whole long chapter title is 
one very long line.

If I don't use textcommand=\midaligned, I am able to make multiline chapter 
with my own line break,
but the title is left-aligned...

Could anybody tell me, how to make properly the chapter setup according to 
above described rules?

Thank you in advance.

Pavel
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Whitespace and quotechar in database module

2012-12-18 Thread Hans Hagen

On 12/18/2012 9:20 AM, Marco Patzer wrote:

Hi,

the following two database examples produce different output due to
the white space between the field separator and the quotechar.


\usemodule [database]

\defineseparatedlist
   [CSV]
   [quotechar=,
before={\starttabulate[|l|l|]},
after=\stoptabulate,
first=\NC,last=\NR,
left=,right=\NC]

\starttext

\startCSV
   alpha, loremloremlorem
   beta,ipsum, ipsum, ipsum
\stopCSV

\startCSV
   alpha, loremloremlorem
   beta, ipsum, ipsum, ipsum
\stopCSV

\stoptext


Can the parser be made tolerant to this space?



only before/after quote I assume

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] framed algorithm / float: problems with line break

2012-12-18 Thread Wolfgang Schuster

Am 17.12.2012 um 13:14 schrieb Andreas Mang m...@imt.uni-luebeck.de:

 Dear all,
 
 Quick access: there is no line break in case algorithmic is used together 
 with framed as a float.
 
 I'd like to put some pseudocode in my document. I've used the algorithmic 
 module. Since I'd like to refer to the algorithm in the text, I've defined a 
 float environment. However, putting the pseudocode into my document, I've 
 realised that it does not really stand out from the text. My first idea was 
 to put some box around it. In the garden I've found some example for using 
 framed together with floats:
 
 http://wiki.contextgarden.net/Framed
 
 However, this screws up the line break in the algorithmic environment. I 
 could define manually the size of the box, but I think there might be better 
 solutions. Any ideas or better ways for achieving this or a similar 
 behaviour?!
 
 Thanks in advance.
 
 Cheers,
 Andreas 
 
 ConTeXt  ver: 2012.12.10 23:20 MKIV  fmt: 2012.12.14
 
 %%% MINIMAL EXAMPLE %%%
 \usemodule[algorithmic]
 
 
 \definefloat[algorithm][algorithms] 
 
 \setuplabeltext[de][algorithm=Algorithmus ]
 
 \setupcaption[algorithm][
   headstyle=bold,
   location=top,
   width=0.95\textwidth]
 
 
 \starttext
 
 \placealgorithm[top][alg:some-algorithm]{Some description of some algorithm.}{
 \framed
  [background=color,backgroundcolor=darkblue,
   foreground=color,foregroundcolor=white,width=broad]{

You have to add “align=right” to \framed to force a multiline frame but you 
don’t need
the command because floats do also use the \framed command. You can use this 
feature
and set the background with \setupfloat, only the text color can’t be set with 
\setupfloat
because it’s applied to late in the process and a manual setting is necessary.

I can add a “color” key to the algorithmic environment which allows you to set 
the color
with \setupalgorithmic and you don’t need the \white command after 
\startalgorithmic
anymore.

\usemodule[algorithmic]

\definefloat[algorithm][algorithms] 

\setuplabeltext[de][algorithm=Algorithmus ]

\setupcaption
  [algorithm]
  [headstyle=bold,
   location=top,
   width=0.95\textwidth]

\setupfloat
  [algorithm]
  [background=color,
   backgroundcolor=darkblue]

\starttext

\placealgorithm[top][alg:some-algorithm]{Some description of some algorithm.}
  {\startalgorithmic\white
   \STATE choose $\alpha\in(0,1)$
   \WHILE{$\alpha  100$}
 \STATE $\alpha \leftarrow \alpha + \alpha$
   \ENDWHILE
   \stopalgorithmic}

\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Centered multiline chapter title

2012-12-18 Thread Wolfgang Schuster

Am 17.12.2012 um 21:29 schrieb ha...@wpb.cz:

 Hello,
 
 I need to format my chapters in the following way:
 
   - The chapters are centered (midaligned).
 
   - Some chapters are long, so they have to be multilined.
 
   - The chapter title should be in capital letters, but in the header should 
 it be without capitalisation.
 
   - When the chapter title is multilined, only the first line should appear 
 in the header, followed by ...,
 the same in TOC
 
   - When the chapter title is multilined, I want to choose the point of line 
 break with \\
 
 
 So something like this:
 
  \chapter{FIRST CHAPTER TITLE}  (in the header and TOC will be First chapter 
 title)
 
  \chapter{SECOND CHAPTER TITLE \\ WHICH IS VERY VERY VERY LONG} (in the 
 header and TOC will be Second chapter title...)
 
 
 I tried the following setup for the chapter:  
 
 \setuphead
  [chapter]
  [after={\blank[2*line,fixed]},
   header=empty,
   textcommand=\midaligned,
   style={\chapterfont\WORD},
   sectionset=none,
   indentnext=no
  ]
 
 
 But when I try to process the file, I will get the following error:
 
structuresectioning  chapter @ level 2 : 0.1 - Second chapter 
 title \\ which is very very very looong
! Missing } inserted.
 
system   tex  error on line 1 in file test.tex: Missing  ...
 
 1   \environment test_environment
 2 
 3 \startcomponent test19
 4 
 5 \product test
 6 
 7 
 8 \chapter{Second chapter title \\ which is very very very looong}
 9
 
inserted text 
}
to be read again 
   \endgroup 
\\-\endgroup 
  \par \doalignline {\hss }{\hss }\begingroup 
l.1 Second chapter title \\
which is very very very looong
\ctxcommand ...\directlua \zerocount {commands.#1}
 
\getheadtitle ...lecommand \relax \structuretitle 
  \else \normalexpanded 
 {\no...
...
l.10 ...r title \\ which is very very very looong}
 
 
 If I don't try to enforce line break in the title with \\, the file is 
 processed without problem,
 but also without making anyline break at all -- the whole long chapter title 
 is one very long line.
 
 If I don't use textcommand=\midaligned, I am able to make multiline chapter 
 with my own line break,
 but the title is left-aligned...
 
 Could anybody tell me, how to make properly the chapter setup according to 
 above described rules?


You can use the “list” and “marking” keys to set separate entries for the 
header and TOC.

\setuphead
  [chapter]
  [after={\blank[fixed,2*line]},
   header=empty,
   align=middle,
   style={\setcharactercasing[WORD]}]

\setupheadertexts[chapter]

\starttext

\completecontent

\startchapter[title={First chapter title}]
\dorecurse{10}{\input knuth\par}
\stopchapter

\startchapter[title={Second chapter title\\which is very long},list={Second 
chapter title …},marking={Second chapter title …}]
\dorecurse{10}{\input zapf\par}
\stopchapter

\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] framed algorithm / float: problems with line break

2012-12-18 Thread Andreas Mang
Dear Wolfgang,

thanks for looking into this. Works nicely.

 I can add a “color” key to the algorithmic environment which allows you to 
 set the color
 with \setupalgorithmic and you don’t need the \white command after 
 \startalgorithmic
 anymore.

The coloring in my minimal example was simply taken from contextgarden to make 
sure that I am consistent with what is typically used as an example. 
Personally, I think this is way to fancy. I'll use some faint color so that I 
do not need to change the text color. So from my perspective there is no need 
for a color command.


Cheers,
Andreas


___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Count the words per line (Philipp Gesang)

2012-12-18 Thread H. Özoguz

Am 18.12.2012 11:17, schrieb ntg-context-requ...@ntg.nl:

Usage:

 \usemodule[wordsperline]
 \starttext

   \startlinestats
 \dorecurse{42}{%
   \input knuth\par
   \input ward\par
   \input tufte\par
   \input zapf\par
 }
   \stoplinestats

 \stoptext

(Works best with the --silent flag!)

Hi Philipp,

thanks alot! It works, one question left: What is the --silent flag, 
what is its effect, I tried it but could not see the difference.


Thanks alot again, very kindly :)

Best Regards
Huseyin


___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] DocBook

2012-12-18 Thread Roger Mason

Hello all,

I have a manuscript to review that I have managed to coerce into DocBook 
xml.  I'd like to turn it into context so that I can mark it up in a 
comfortable environment.  I just tried Simon Pepping's DocBookInContext 
package from 2003, but it fails on the provided test document:


! Undefined control sequence.
l.968 \stelsectiein

pandoc is not an option for me at the moment: I am currently using Arch 
Linux and have not been able to get their Haskell installation to finish 
successfully.


Thanks for any ideas.

Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] DocBook

2012-12-18 Thread Wolfgang Schuster

Am 18.12.2012 um 12:31 schrieb Roger Mason rma...@mun.ca:

 Hello all,
 
 I have a manuscript to review that I have managed to coerce into DocBook xml. 
  I'd like to turn it into context so that I can mark it up in a comfortable 
 environment.  I just tried Simon Pepping's DocBookInContext package from 
 2003, but it fails on the provided test document:
 
 ! Undefined control sequence.
 l.968 \stelsectiein
 
 pandoc is not an option for me at the moment: I am currently using Arch Linux 
 and have not been able to get their Haskell installation to finish 
 successfully.

1. The module uses a mix of english and dutch commands which doesn’t work 
(maybe it worked when module was written).

2. The code is outdated, written for MkII and rewrites commands which are 
already part of the core.

When you really want to use DocBook xml with context you have to write your own 
module, for tables you can use the context module for calls tables.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] DocBook

2012-12-18 Thread Thomas Weißschuh
Hi Roger,

 pandoc is not an option for me at the moment: I am currently using Arch 
 Linux and have not been able to get their Haskell installation to finish 
 successfully.
Have you tried to use the third party haskell repo?
They provide a precompiled package haskell-pandoc.

[haskell]
# Arch-Haskell repository
# Discussion: http://www.haskell.org/mailman/listinfo/arch-haskell
Server = http://xsounds.org/~haskell/$arch

Regards,
Thomas

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] DocBook

2012-12-18 Thread Hans Hagen

On 12/18/2012 12:47 PM, Wolfgang Schuster wrote:


Am 18.12.2012 um 12:31 schrieb Roger Mason rma...@mun.ca:


Hello all,

I have a manuscript to review that I have managed to coerce into DocBook xml.  
I'd like to turn it into context so that I can mark it up in a comfortable 
environment.  I just tried Simon Pepping's DocBookInContext package from 2003, 
but it fails on the provided test document:

! Undefined control sequence.
l.968 \stelsectiein

pandoc is not an option for me at the moment: I am currently using Arch Linux 
and have not been able to get their Haskell installation to finish successfully.


1. The module uses a mix of english and dutch commands which doesn’t work 
(maybe it worked when module was written).


That was an experiment by Simon and (in latex style) it overloaded quite 
some low level stuff so it never really worked out well I think.



2. The code is outdated, written for MkII and rewrites commands which are 
already part of the core.


Indeed.

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] DocBook

2012-12-18 Thread Roger Mason

Wolfgang, Thomas, Hans,

On 12/18/2012 09:51 AM, Hans Hagen wrote:

On 12/18/2012 12:47 PM, Wolfgang Schuster wrote:


Am 18.12.2012 um 12:31 schrieb Roger Mason rma...@mun.ca:


Hello all,

I have a manuscript to review that I have managed to coerce into 
DocBook xml.  I'd like to turn it into context so that I can mark it 
up in a comfortable environment.  I just tried Simon Pepping's 
DocBookInContext package from 2003, but it fails on the provided 
test document:


! Undefined control sequence.
l.968 \stelsectiein

pandoc is not an option for me at the moment: I am currently using 
Arch Linux and have not been able to get their Haskell installation 
to finish successfully.


1. The module uses a mix of english and dutch commands which doesn’t 
work (maybe it worked when module was written).


That was an experiment by Simon and (in latex style) it overloaded 
quite some low level stuff so it never really worked out well I think.


2. The code is outdated, written for MkII and rewrites commands which 
are already part of the core.


Indeed.

Hans

Thank you for your replies.  The hint given by Thomas was enough to 
allow me to get pandoc installed and I now have a workflow that provides 
ConTeXt output.


Many thanks.

Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Transparency without colors.

2012-12-18 Thread Hans Hagen

On 12/18/2012 5:07 PM, Andre Caldas wrote:

Hello!

In my simplesteps module, I'd like to adjust the transparency of the
foreground color. The file tex/context/base/colo-ini.mkiv suggests
that there is a way to do that:

% Currently in mkiv transparency is implemented independent of color. This costs
% a bit more processing time but gives the possibility to apply transparency
% independently in the future. Is this useful? If not we may as well
combine them
% again in the future. By coupling we are downward compatible. When we
decouple we
[...]

How can I define the transparency of some text?


http://wiki.contextgarden.net/Color

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Module for Commutative Diagrams.

2012-12-18 Thread Andre Caldas
Hello!

Some days ago, I have written a module for writing commutative
diagrams using MetaPost.
Definition of commutative diagrams:
https://duckduckgo.com/?q=commutative+diagrams

The module lives here, now:
https://bitbucket.org/andrecaldas/context-commutativediagrams

The module still needs a lot of working... but for very, very simple
diagrams, it works! At least for me... =o)


Comments are very welcome,
André Caldas.
PS: I have to submit the final version of my doctoral thesis just
before the end of the world (20/12/2012). For that reason I have not
worked on the simplesteps module... but I'd like to thank all the
support given in my last thread.
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Transparency without colors.

2012-12-18 Thread Andre Caldas
 How can I define the transparency of some text?

 http://wiki.contextgarden.net/Color

I want to set up the transparency without messing with the colors
(that were setup by the user).


André Caldas.
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Wrong float numbering with default=top

2012-12-18 Thread Marco Patzer
On 2012–12–08 Marco Patzer wrote:

 Thanks. It does not break anything in the final document and all
 numbers are correct.

Referring to the figures is messed up:

\useMPlibrary
  [dum]

\setupfloat
  [figure]
  [default=top]

\ctxlua{structures.lists.autoreorder = true}

\starttext
\input knuth

alpha: \in{figure}[alpha] \par
beta:  \in{figure}[beta]  \par
gamma: \in{figure}[gamma] \par

\startplacefigure [title=Alpha, reference=alpha]
  \externalfigure [dummy]
\stopplacefigure

\startplacefigure [title=Beta, reference=beta]
  \externalfigure [dummy] [width=10cm, height=16cm]
\stopplacefigure

\startplacefigure [title=Gamma, reference=gamma]
  \externalfigure [dummy]
\stopplacefigure

\stoptext

For the moment I would actually be happy with a workaround to get
the numbers right. With autoreorder the referencing is wrong,
without autoreorder the float numbers are not in order.


Marco


signature.asc
Description: Digital signature
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Customize footnotes

2012-12-18 Thread Wolfgang Schuster

Am 18.12.2012 um 16:21 schrieb MANUEL GONZALEZ SUAREZ 
gonzalezsman...@uniovi.es:

 Hello again.
 I am working with a document in which I am asked to appear footnotes 
 followed, i. e.:
 text text text text text
 
 1 Footnote 2 Footnote 3 Footnote  …

\setupnote[footnote][paragraph=yes]
\setupnotation[footnote][alternative=serried,display=no]

\starttext
This example demonstrates how to change the footnotes\footnote{Do you mean me?} 
layout to a paragraph style\footnote{Look, I’m in the same line as the previous 
note!}.
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Wrong float numbering with default=top

2012-12-18 Thread Hans Hagen

On 12/18/2012 6:13 PM, Marco Patzer wrote:

On 2012–12–08 Marco Patzer wrote:


Thanks. It does not break anything in the final document and all
numbers are correct.


Referring to the figures is messed up:

\useMPlibrary
   [dum]

\setupfloat
   [figure]
   [default=top]

\ctxlua{structures.lists.autoreorder = true}

\starttext
\input knuth

alpha: \in{figure}[alpha] \par
beta:  \in{figure}[beta]  \par
gamma: \in{figure}[gamma] \par

\startplacefigure [title=Alpha, reference=alpha]
   \externalfigure [dummy]
\stopplacefigure

\startplacefigure [title=Beta, reference=beta]
   \externalfigure [dummy] [width=10cm, height=16cm]
\stopplacefigure

\startplacefigure [title=Gamma, reference=gamma]
   \externalfigure [dummy]
\stopplacefigure

\stoptext

For the moment I would actually be happy with a workaround to get
the numbers right. With autoreorder the referencing is wrong,
without autoreorder the float numbers are not in order.


this kind of messy stuff needs some time to get right (apart from 
messing up de code)


you cna try to patch this in strc-ref.lua

function filters.generic.number(data,what,prefixspec) -- todo: spec and 
then no stopper

if data then
-- local numberdata = data.numberdata
numberdata = lists.reordered(data)
if numberdata then
helpers.prefix(data,prefixspec)
sections.typesetnumber(numberdata,number,numberdata)
else
local useddata = data.useddata
if useddata and useddsta.number then
context(useddata.number)
end
end
end
end


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___