[NTG-context] \externalfigure and large-paged pdfs

2012-11-08 Thread Taco Hoekwater

Hi,

Actually, this is a bug report. If you try to include a pdf with a large
page size:

  \starttext
  \externalfigure[plankaart]
  \stoptext

chances are that you get an error message like this:

! Dimension too large.
recently read \hsize

\setraggedness ...yphenpenalty \dimexpr 2.8\hsize
  /\dimexpr #1\relax 
\relax ...

\raggedcenter ...spac_align_set_raggedness_middle
  \raggedstatus 
\plustwo \at...

\next ...ght \pack_framed_do_setups \raggedcenter
  \vss \bgroup 
\localbegstru...

\grph_include_finalize ...tedexternalfigureframed
  {\vfilll \box 
\foundextern...

\grph_include_place ...ode \grph_include_finalize
  \fi \ctxlua 
{figures.pop()...

...
l.2 \externalfigure[plankaart]

It seems that \externalfigure forces execution of \raggedcenter, and if
your PDF's page is large enough, that then fails.

There is, in fact, a workaroud:

  \starttext
  {\setupalign[nothyphenated]\externalfigure[plankaart]}
  \stoptext

but that looks totally bizarre. Hans, can you find a way to fix this
properly?

Best wishes,
Taco


___
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] \externalfigure and large-paged pdfs

2012-11-08 Thread Martin Schröder
2012/11/8 Taco Hoekwater t...@bittext.nl:
 Actually, this is a bug report. If you try to include a pdf with a large
 page size:

large being  (\maxdimen / 2.8) ?

Best
   Martin

PS: What would break if we extended dimens to 64/63 bit in LuaTeX?
___
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] \externalfigure and large-paged pdfs

2012-11-08 Thread Hans Hagen

On 11/8/2012 3:18 PM, Taco Hoekwater wrote:

Hi,

Actually, this is a bug report. If you try to include a pdf with a large
page size:

   \starttext
   \externalfigure[plankaart]
   \stoptext

chances are that you get an error message like this:

! Dimension too large.
recently read \hsize

\setraggedness ...yphenpenalty \dimexpr 2.8\hsize
   /\dimexpr #1\relax
\relax ...
\raggedcenter ...spac_align_set_raggedness_middle
   \raggedstatus
\plustwo \at...
\next ...ght \pack_framed_do_setups \raggedcenter
   \vss \bgroup
\localbegstru...
\grph_include_finalize ...tedexternalfigureframed
   {\vfilll \box
\foundextern...
\grph_include_place ...ode \grph_include_finalize
   \fi \ctxlua
{figures.pop()...

l.2 \externalfigure[plankaart]

It seems that \externalfigure forces execution of \raggedcenter, and if
your PDF's page is large enough, that then fails.

There is, in fact, a workaroud:

   \starttext
   {\setupalign[nothyphenated]\externalfigure[plankaart]}
   \stoptext

but that looks totally bizarre. Hans, can you find a way to fix this
properly?


what happens if you do

\setupexternalfigures[align=]

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] \externalfigure and large-paged pdfs

2012-11-08 Thread Hans Hagen

On 11/8/2012 4:09 PM, Hans Hagen wrote:

\setupexternalfigures[align=none]

\setuppapersize[A0]

\starttext
\externalfigure[cow.pdf][width=\maxdimen]
\stoptext

works ok here (which surprises me)

(but as martin says: going 64 bit would be nice)

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] \externalfigure and large-paged pdfs

2012-11-08 Thread Taco Hoekwater

On 11/08/2012 03:51 PM, Martin Schröder wrote:

2012/11/8 Taco Hoekwater t...@bittext.nl:

Actually, this is a bug report. If you try to include a pdf with a large
page size:


large being  (\maxdimen / 2.8) ?


Yes.


Best
Martin

PS: What would break if we extended dimens to 64/63 bit in LuaTeX?


Some poor programmer's head ;)

Seriously, the actual implementation would be quite a lot of work.

There are definite places in the backend where a 64-bit number
would be a no-no, and these have to be captured somewhere.

And then there is the lua_Number that is a double, so it cannot fit
a full 64-bit number without precision loss, etc.

Best wishes,
Taco


___
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] \externalfigure and large-paged pdfs

2012-11-08 Thread Hans Hagen

On 11/8/2012 4:32 PM, Taco Hoekwater wrote:

On 11/08/2012 03:51 PM, Martin Schröder wrote:

2012/11/8 Taco Hoekwater t...@bittext.nl:

Actually, this is a bug report. If you try to include a pdf with a large
page size:


large being  (\maxdimen / 2.8) ?


Yes.


Best
Martin

PS: What would break if we extended dimens to 64/63 bit in LuaTeX?


Some poor programmer's head ;)

Seriously, the actual implementation would be quite a lot of work.

There are definite places in the backend where a 64-bit number
would be a no-no, and these have to be captured somewhere.

And then there is the lua_Number that is a double, so it cannot fit
a full 64-bit number without precision loss, etc.


and 48 bit?

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