Re: [NTG-context] export and pagebreak

2011-01-03 Thread Achim Jander

Am 02.01.2011 15:57, schrieb Hans Hagen:

On 31-12-2010 7:22, Achim Jander wrote:

is it possible to get a pagebreak/ into the exported XML?


I'll send you a small patch to play wit


Hello Hans,
many thanks! I've tested a bit and it seems to work great!
Two little suggestions for improvement:
- would it possible to switch both (spaces and pagebreak) to on? It 
seems that in the Moment only one of them can be enabled.

- would it be possible to include the pagenumber as attribute?

During my tests i found a strange behaviour of the export-function (not 
related to pagebreak-export).
With certain combinations of \setupalign[hz,hanging] and body-font-size 
most of the text gets eaten:


\setupbackend [export=yes]

\enabledirectives[structures.export.pagebreaks]

\definefontfeature[default][default][%
expansion=quality,
protrusion=quality,
]

\setupbodyfont[rm,8.5pt]
%\setupbodyfont[rm,11pt] %does not work either
%\setupbodyfont[rm,12pt] %this is ok

\definebodyfontenvironment[8.5pt][%
text=8.5pt,
script=8.5pt,
scriptscript=6pt,
x=6pt,
xx=5pt,
big=28pt,
small=17.3pt]

\setupalign[hz,hanging] %without everything ok



\starttext
\input tufte
\stoptext

that gives the export:
?xml version='1.0' standalone='yes' ?

!-- input filename   : xml_test_export   --
!-- processing date  : 01/03/11 12:43:00 --
!-- context version  : 2010.12.31 08:59  --
!-- exporter version : 0.10  --

document language='en' file='xml_test_export' date='01/03/11 12:43:01' 
context='2010.12.31 08:59' version='0.10'
--fiflfiglean, synopsize, winnow the wheat from the chaff and separate 
the sheep from the goats.

/document

Either switching the body-font-size to 12pt or disable the \align gives 
the full export as expected. Very confusing.

Greetings,
Achim




-
  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
___ 





___
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] export and pagebreak

2011-01-03 Thread Hans Hagen

On 3-1-2011 12:54, Achim Jander wrote:


- would it possible to switch both (spaces and pagebreak) to on? It
seems that in the Moment only one of them can be enabled.


does not make much sense as /S0 equals /pagebreak anyway (the 
default is a space)



- would it be possible to include the pagenumber as attribute?


maybe, keep in mind that we cannot really structure by page as elements 
can span page boundaries



During my tests i found a strange behaviour of the export-function (not
related to pagebreak-export).
With certain combinations of \setupalign[hz,hanging] and body-font-size
most of the text gets eaten:


maybe some attributes gets lost in the hz machinery ... needs checking

(in most cases doing a special export run makes sense, in which case 
some functionality can be turned off)


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] export and pagebreak

2011-01-03 Thread Achim Jander

Am 03.01.2011 15:43, schrieb Hans Hagen:

On 3-1-2011 12:54, Achim Jander wrote:


- would it possible to switch both (spaces and pagebreak) to on? It
seems that in the Moment only one of them can be enabled.


does not make much sense as /S0 equals /pagebreak anyway (the 
default is a space)



Hi Hans,
maybe i got something wrong, but in the given example I have now
filter, lump,pagebreak/skip,
My intent is, to convert the XML eg to  EPUB and use the pagebreak / 
to give the desired Metadata.

So it would be more convenient to have
filter, lump, pagebreak/skip,
but that could be also done in the postprocessing.


- would it be possible to include the pagenumber as attribute?


maybe, keep in mind that we cannot really structure by page as 
elements can span page boundaries


of course, its only a nice-to have, it could get calculated in the 
postprocessing



maybe some attributes gets lost in the hz machinery ... needs checking

(in most cases doing a special export run makes sense, in which case 
some functionality can be turned off)


yes, i see. In my case it is of interest to have the same breaking in 
that run, so i wonder if disabling the hz feature

doesn't change the line-breaking ?

Thanks,
Achim

___
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] export and pagebreak

2011-01-03 Thread Hans Hagen

On 3-1-2011 4:11, Achim Jander wrote:


So it would be more convenient to have
filter, lump, pagebreak/skip,
but that could be also done in the postprocessing.


indeed this belongs to postprocessing (if only because there is no space 
at a pagebreak) .. similar would be: abclinebreak/def where is no 
linebreak is needed it can become a space)



yes, i see. In my case it is of interest to have the same breaking in
that run, so i wonder if disabling the hz feature
doesn't change the line-breaking ?


it does

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] export and pagebreak

2011-01-03 Thread Achim Jander

Hi Hans,
thanks again. At least the first tests of the new version give me the 
expected result. Great!!


Achim

Am 03.01.2011 16:19, schrieb Hans Hagen:

On 3-1-2011 4:11, Achim Jander wrote:


So it would be more convenient to have
filter, lump, pagebreak/skip,
but that could be also done in the postprocessing.


indeed this belongs to postprocessing (if only because there is no 
space at a pagebreak) .. similar would be: abclinebreak/def where is 
no linebreak is needed it can become a space)



yes, i see. In my case it is of interest to have the same breaking in
that run, so i wonder if disabling the hz feature
doesn't change the line-breaking ?


it does

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] export and pagebreak

2011-01-02 Thread Hans Hagen

On 31-12-2010 7:22, Achim Jander wrote:

Hi all,
first I wish a very happy new year to everybody! I think, this will be
my last post for this year, but as i have tasted blood, the next year I
will post a lot of further questions I think :-)
Now I have Christmas holidays and can play the whole day with ConTeXt. I
tested a little the export function. There is one thing I have on my
wishlist:
is it possible to get a pagebreak/ into the exported XML? The
background is that I have often the requirement to include
pagebreak-info in online-productions (for citation reasons) and that
could be a very good starting point. In fact, in the moment at the
position where a pagebreak occurs, the space (if it occurs at a space)
is eaten up. Minimal example:
\setupbackend [export=yes]

\starttext

\startchapter [title=Tufte Example]

\startparagraph
\dorecurse{10}{\input tufte}
\stopparagraph

\stopchapter

\stoptext

At the break of pg 2 to pg 3 you will find lump,skip (without the space)
in the exported file. Having the pagebreaks would be a great thing for me.


I'll send you a small patch to play with.

-
  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
___