ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \externalfigure and large-paged pdfs
@ 2012-11-08 14:18 Taco Hoekwater
  2012-11-08 14:51 ` Martin Schröder
  2012-11-08 15:09 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Taco Hoekwater @ 2012-11-08 14:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \externalfigure and large-paged pdfs
  2012-11-08 14:18 \externalfigure and large-paged pdfs Taco Hoekwater
@ 2012-11-08 14:51 ` Martin Schröder
  2012-11-08 15:32   ` Taco Hoekwater
  2012-11-08 15:09 ` Hans Hagen
  1 sibling, 1 reply; 6+ messages in thread
From: Martin Schröder @ 2012-11-08 14:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2012/11/8 Taco Hoekwater <taco@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \externalfigure and large-paged pdfs
  2012-11-08 14:18 \externalfigure and large-paged pdfs Taco Hoekwater
  2012-11-08 14:51 ` Martin Schröder
@ 2012-11-08 15:09 ` Hans Hagen
  2012-11-08 15:13   ` Hans Hagen
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2012-11-08 15:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \externalfigure and large-paged pdfs
  2012-11-08 15:09 ` Hans Hagen
@ 2012-11-08 15:13   ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2012-11-08 15:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \externalfigure and large-paged pdfs
  2012-11-08 14:51 ` Martin Schröder
@ 2012-11-08 15:32   ` Taco Hoekwater
  2012-11-08 15:59     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2012-11-08 15:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11/08/2012 03:51 PM, Martin Schröder wrote:
> 2012/11/8 Taco Hoekwater <taco@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \externalfigure and large-paged pdfs
  2012-11-08 15:32   ` Taco Hoekwater
@ 2012-11-08 15:59     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2012-11-08 15:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater

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 <taco@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-08 15:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-08 14:18 \externalfigure and large-paged pdfs Taco Hoekwater
2012-11-08 14:51 ` Martin Schröder
2012-11-08 15:32   ` Taco Hoekwater
2012-11-08 15:59     ` Hans Hagen
2012-11-08 15:09 ` Hans Hagen
2012-11-08 15:13   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).