ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* problem with initialize_box in mkIV
@ 2013-03-05 10:21 Alexandre Gerussi
  2013-03-06  8:39 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Gerussi @ 2013-03-05 10:21 UTC (permalink / raw)
  To: ntg-context

Hi there,

i'm having problems with metapost and positional graphics in mkIV.
Here is a small test file that compiles OK with texexec but fails to 
compile with context:

% the beginning
  \defineoverlay[frames][\positionoverlay{frames}]
\setupbackgrounds[page][background=frames]

\startMPpositiongraphic{frame}
   initialize_box(\MPpos{\MPvar{self}});
   draw llxy--lrxy--urxy--ulxy--cycle;
\stopMPpositiongraphic

\startpositionoverlay{frames}
   \setMPpositiongraphic{one}{frame}
   \setMPpositiongraphic{two}{frame}
\stoppositionoverlay

\starttext
This \hpos{one}{word} should be \hpos{two}{framed}.
\stoptext
% the end

My system is a Debian Testing, but I don't believe that it is related to 
the distribution, as this example also fails
in the context online compiler @ http://live.contextgarden.net/

The problem seems located around the initialize_box macro.

Any help will be much appreciated.
AG.



Here is the entire output when compiling:
$ context essai.tex

mtx-context     | run 1: luatex 
--fmt="/var/lib/texmf/luatex-cache/context/f919750633122078d706dd10f1cfd39b/formats/cont-en" 
--lua="/var/lib/texmf/luatex-cache/context/f919750633122078d706dd10f1cfd39b/formats/cont-en.lui" 
--backend="pdf" "./essai" \stoptext
This is LuaTeX, Version beta-0.70.2-2012070300 (TeX Live 2012/Debian)
  \write18 enabled.
(essai.tex

ConTeXt  ver: 2012.05.30 11:26 MKIV  fmt: 2012.10.14  int: english/english

system > cont-new.mkiv loaded
(/usr/share/texmf/tex/context/base/cont-new.mkiv
system > beware: some patches loaded from cont-new.mkiv
)
system > essai.top loaded
(essai.top)
fonts > latin modern fonts are not preloaded
languages > language en is active
{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
fonts > preloading latin modern fonts (second stage)
fonts > typescripts > unknown: library 'loc'
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts > defining > forced type afm of stmary10 not found
fonts > defining > font with asked name 'stmary10' is not found using 
lookup 'file'
fonts > virtual math > loading font LMMath7-Regular subfont 9 with name 
stmary10.afm at 458752 is skipped, not found
fonts > defining > forced type afm of stmary10 not found
fonts > defining > font with asked name 'stmary10' is not found using 
lookup 'file'
fonts > virtual math > loading font LMMath9-Regular subfont 9 with name 
stmary10.afm at 589824 is skipped, not found
fonts > defining > forced type afm of stmary10 not found
fonts > defining > font with asked name 'stmary10' is not found using 
lookup 'file'
fonts > virtual math > loading font LMMath12-Regular subfont 9 with name 
stmary10.afm at 786432 is skipped, not found
fonts > fallback modern rm 12pt is loaded
metapost > initializing instance 'metafun' using format 'metafun'
metapost > loading 'metafun': 
/usr/share/texmf/metapost/context/base/metafun.mpiv
! terminal: >> initialize_box
! Isolated expression.
<to be read again>
                    (
<*>  initialize_box(
                     
1,97.95276pt,705.01845pt,25.14001pt,8.32800pt,0.12000pt)...

! Extra tokens will be flushed.
<to be read again>
                    (
<*>  initialize_box(
                     
1,97.95276pt,705.01845pt,25.14001pt,8.32800pt,0.12000pt)...

 >> llxy
! Improper `addto'.
<to be read again>
                    withpen
draw->...:also(EXPR0)else:doublepath(EXPR0)withpen
                                                   .currentpen.fi._op_
<to be read again>
                    {
--->{
      curl1}..{curl1}
<*> ...5.14001pt,8.32800pt,0.12000pt); draw llxy--
                                                   
lrxy--urxy--ulxy--cycle; ;
! Extra tokens will be flushed.
<to be read again>
                    {
--->{
      curl1}..{curl1}
<*> ...5.14001pt,8.32800pt,0.12000pt); draw llxy--
                                                   
lrxy--urxy--ulxy--cycle; ;

.

system > tex > error on line 1 in file essai.tex: terminal: >> 
initialize_box
! Isolated expression.
<to be read again>
                    (
<*>  initialize_box(
                     
1,97.95276pt,705.01845pt,25.14001pt,8.32800pt,0.12000pt)...

! Extra tokens will be flushed.
<to be read again>
                    (
<*>  initialize_box(
                     
1,97.95276pt,705.01845pt,25.14001pt,8.32800pt,0.12000pt)...

 >> llxy
! Improper `addto'.
<to be read again>
                    withpen
draw->...:also(EXPR0)else:doublepath(EXPR0)withpen
                                                   .currentpen.fi._op_
<to be read again>
                    {
--->{
      curl1}..{curl1}
<*> ...5.14001pt,8.32800pt,0.12000pt); draw llxy--
                                                   
lrxy--urxy--ulxy--cycle; ;
! Extra tokens will be flushed.
<to be read again>
                    {
--->{
      curl1}..{curl1}
<*> ...5.14001pt,8.32800pt,0.12000pt); draw llxy--
                                                   
lrxy--urxy--ulxy--cycle; ;

  ...

  1 >>  \defineoverlay[frames][\positionoverlay{frames}]
  2     \setupbackgrounds[page][background=frames]
  3
  4     \startMPpositiongraphic{frame}
  5       initialize_box(\MPpos{\MPvar{self}});
  6       draw llxy--lrxy--urxy--ulxy--cycle;
  7     \stopMPpositiongraphic
  8
  9     \startpositionoverlay{frames}
10       \setMPpositiongraphic{one}{frame}
11       \setMPpositiongraphic{two}{frame}

<inserted text> ...lable:=true; ;;;;]===], false)}

\meta_process_graphic ...!!es , \MPaskedfigure )}}
                                                   \egroup 
\placeMPgraphic \m...
\anch_positions_meta_graphic_use ...#3\stopMPcode
                                                   \endgroup
\anch_positions_meta_graphic_direct_indeed ...ame
                                                   \removelastspace 
}\smashbo...
\dohandleMPpositiongraphic ...tiongraphic {#2}{#3}
                                                   \fi
\308>frames::mpa ...positiongraphic {one}{frame}{}
                                                   
\dohandleMPpositiongraphic...
...
l.16 \stoptext

? ^Cmetapost > error: unknown, no error, terminal or log messages
! terminal: [1]
.

system > tex > error on line 1 in file essai.tex: terminal: [1]
  ...

  1 >>  \defineoverlay[frames][\positionoverlay
{frames}]
  2     \setupbackgrounds[page][background=frames]
  3
  4     \startMPpositiongraphic{frame}
  5       initialize_box(\MPpos{\MPvar{self}});
  6       draw llxy--lrxy--urxy--ulxy--cycle;
  7     \stopMPpositiongraphic
  8
  9     \startpositionoverlay{frames}
10       \setMPpositiongraphic{one}{frame}
11       \setMPpositiongraphic{two}{frame}

<inserted text> alexandre@knuth:~/ENSEIGNEMENT/12/TSTI$ ...lable:=true; 
;;;;]===], false)}

\meta_process_graphic ...!!es , \MPaskedfigure )}}
                                                   \egroup 
\placeMPgraphic \m...
\anch_positions_meta_graphic_use ...#3\stopMPcode
                                                   \endgroup
\anch_positions_meta_graphic_direct_indeed ...ame
                                                   \removelastspace 
}\smashbo...
\dohandleMPpositiongraphic ...tiongraphic {#2}{#3}
                                                   \fi
\308>frames::mpa ...positiongraphic {one}{frame}{}
                                                   
\dohandleMPpositiongraphic...
...
l.16 \stoptext

?
! Emergency stop.

system > tex > error on line 1 in file essai.tex: Emergency stop ...

  1 >>  \defineoverlay[frames][\positionoverlay{frames}]
  2     \setupbackgrounds[page][background=frames]
  3
  4     \startMPpositiongraphic{frame}
  5       initialize_box(\MPpos{\MPvar{self}});
  6       draw llxy--lrxy--urxy--ulxy--cycle;
  7     \stopMPpositiongraphic
  8
  9     \startpositionoverlay{frames}
10       \setMPpositiongraphic{one}{frame}
11       \setMPpositiongraphic{two}{frame}

<inserted text> ...lable:=true; ;;;;]===], false)}

\meta_process_graphic ...!!es , \MPaskedfigure )}}
                                                   \egroup 
\placeMPgraphic \m...
\anch_positions_meta_graphic_use ...#3\stopMPcode
                                                   \endgroup
\anch_positions_meta_graphic_direct_indeed ...ame
                                                   \removelastspace 
}\smashbo...
\dohandleMPpositiongraphic ...tiongraphic {#2}{#3}
                                                   \fi
\308>frames::mpa ...positiongraphic {one}{frame}{}
                                                   
\dohandleMPpositiongraphic...
...
l.16 \stoptext

!  ==> Fatal error occurred, no output PDF file produced!



___________________________________________________________________________________
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] 2+ messages in thread

* Re: problem with initialize_box in mkIV
  2013-03-05 10:21 problem with initialize_box in mkIV Alexandre Gerussi
@ 2013-03-06  8:39 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2013-03-06  8:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Alexandre Gerussi

On 3/5/2013 11:21 AM, Alexandre Gerussi wrote:
> Hi there,
>
> i'm having problems with metapost and positional graphics in mkIV.
> Here is a small test file that compiles OK with texexec but fails to
> compile with context:
>
> % the beginning
>   \defineoverlay[frames][\positionoverlay{frames}]
> \setupbackgrounds[page][background=frames]
>
> \startMPpositiongraphic{frame}
>    initialize_box(\MPpos{\MPvar{self}});
>    draw llxy--lrxy--urxy--ulxy--cycle;
> \stopMPpositiongraphic
>
> \startpositionoverlay{frames}
>    \setMPpositiongraphic{one}{frame}
>    \setMPpositiongraphic{two}{frame}
> \stoppositionoverlay
>
> \starttext
> This \hpos{one}{word} should be \hpos{two}{framed}.
> \stoptext
> % the end
>
> My system is a Debian Testing, but I don't believe that it is related to
> the distribution, as this example also fails
> in the context online compiler @ http://live.contextgarden.net/
>
> The problem seems located around the initialize_box macro.

The whole positioning mechanism has been overhauled last year (columns, 
regions, floats, the whole lot should be able to deal with it).

\defineoverlay[frames][\positionoverlay{frames}]
\setupbackgrounds[text][background=frames]

\startMPpositiongraphic{frame}
     if unknown context_apos : input mp-apos.mpiv ; fi ;
     \MPgetposboxes{\MPvar{self}}{\MPanchorid}
     if nofposboxes = 1 :
         draw posboxes[1] ;
     fi ;
\stopMPpositiongraphic

\startpositionoverlay{frames}
     \setMPpositiongraphic{one}{frame}
     \setMPpositiongraphic{two}{frame}
\stoppositionoverlay

\starttext
     This \hpos{one}{word} should be \hpos{two}{framed}.
\stoptext

At some point the mp modules will be preloaded. Watch the used layer: 
text instead of page. At the end of anch-bck.mkiv you can find some more.

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] 2+ messages in thread

end of thread, other threads:[~2013-03-06  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05 10:21 problem with initialize_box in mkIV Alexandre Gerussi
2013-03-06  8:39 ` 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).