ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with metapost textbackgrounds on Windows
@ 2009-08-04 17:18 Kevin D. Robbins
  2009-08-04 17:48 ` Mojca Miklavec
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin D. Robbins @ 2009-08-04 17:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2264 bytes --]

Hello all,

In the example below, I mean for a gray box with rounded corners to be
placed behind \startC ... \stopC blocks. This example compiles properly on
Linux with the latest ConTeXt beta and LuaTeX synced from the minimals just
minutes ago.

On Windows, also updated from minimals this morning, I get the following
error and no text background:

mplib           : initializing instance 'metafun' using format 'metafun'
mplib           : loading 'metafun.mp' from
'C:/context/tex/texmf-cache/luatex-c
ache/context/2fea56f92e5267d7cc9662e4d5f52e1e/formats/cont-en-metafun.mem'
! Emergency stop.
<inserted text> ...ore.mp ; fi ; ;;;]===], false)}

\processMPgraphic ...s ;\!!es , \MPaskedfigure )}}
                                                  \egroup \global
\MPinstanc...
\useMPpositiongraphic ...tartMPcode #3\stopMPcode
                                                  \egroup
\doMPpositiongraphic ...riables \getvalue {MPG:#1}
                                                  }
\doMPpositiongraphic ...fined {MPG:#1}\donothing }
                                                  \removelastspace
}\smashbo...
\dohandleMPpositiongraphicrange ...raphic {#3}{#4}
                                                  \fi \fi
...
l.59 \stoptext

!  ==> Fatal error occurred, no output PDF file produced!MTXrun | fatal
error, r
eturn code: 1

Here is the example:

%%%%%
\unprotect

\startuseMPgraphic{mpos:par:myexample}
path p;
for i = 1 upto nofmultipars :
p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ;
fill p withcolor 0.9white ;
draw p withcolor black
withpen pencircle scaled \MPvar{linewidth};
endfor;
\stopuseMPgraphic

\definetextbackground [listingbackground]
  [state=start,
   mp=mpos:par:myexample,
   location=paragraph,
   leftoffset=0em,
   rulethickness=1pt]

\definetyping [C]
  [option=commands]
\setuptyping [C]
  [bodyfont=8pt,
   margin=1em,
   before=%
     {\blank[big]
      \setupinterlinespace[line=1.6ex]
      \starttextbackground[listingbackground]},
   after=%
     {\stoptextbackground
      \blank[big]}]

\protect

\starttext

\input tufte

\starttyping
namespace Example
{
    int a;
    int b;
}
\stoptyping

\input knuth


\startC
namespace Example
{
    int a;
    int b;
}
\stopC

\stoptext
%%%%%

[-- Attachment #1.2: Type: text/html, Size: 2964 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

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

* Re: Problem with metapost textbackgrounds on Windows
  2009-08-04 17:18 Problem with metapost textbackgrounds on Windows Kevin D. Robbins
@ 2009-08-04 17:48 ` Mojca Miklavec
  2009-08-04 18:03   ` Kevin D. Robbins
  0 siblings, 1 reply; 5+ messages in thread
From: Mojca Miklavec @ 2009-08-04 17:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Aug 4, 2009 at 19:18, Kevin D. Robbins wrote:
> Hello all,
>
> In the example below, I mean for a gray box with rounded corners to be
> placed behind \startC ... \stopC blocks. This example compiles properly on
> Linux with the latest ConTeXt beta and LuaTeX synced from the minimals just
> minutes ago.
>
> On Windows, also updated from minimals this morning, I get the following
> error and no text background:

I'll try to make sure what LuaTeX version is used on Windows. At the
time of synchronisation there was no luatex snapshot yet and it the
meantime server name has been changed. (Nobody has complained so far,
so I almost forgot about it.)

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


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

* Re: Problem with metapost textbackgrounds on Windows
  2009-08-04 17:48 ` Mojca Miklavec
@ 2009-08-04 18:03   ` Kevin D. Robbins
  2009-08-17  6:30     ` Thomas Floeren
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin D. Robbins @ 2009-08-04 18:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2336 bytes --]

Thanks, Mojca.

Also, a further bit of investigation on Windows shows that building the
example (saved in foo.tex) with "context foo.tex" or "texexec --lua foo.tex"
produces the results I reported. But, building without lua using "texexec
foo.tex" gives a different error but does produce the expected gray
background behind the \startC ... \stopC block. Here is the error when
building with "texexec foo.tex":

! Undefined control sequence.
\initializeparbackgrounds ...e \enableparposition
                                                  \fi
<inserted text> ...page \initializeparbackgrounds
                                                  \loadctxpreplist
\checkref...

\doateverystarttext ->\the \everystarttext
                                           \global \everystarttext
\emptytoks
\starttext ->\doateverystarttext
                                 \ifcase \textlevel \registerfileinfo
[begin...
l.36 \starttext

Continuing the run just by hitting enter completes the build with the
correct background drawn.

Kevin

On Tue, Aug 4, 2009 at 11:48 AM, Mojca Miklavec <
mojca.miklavec.lists@gmail.com> wrote:

> On Tue, Aug 4, 2009 at 19:18, Kevin D. Robbins wrote:
> > Hello all,
> >
> > In the example below, I mean for a gray box with rounded corners to be
> > placed behind \startC ... \stopC blocks. This example compiles properly
> on
> > Linux with the latest ConTeXt beta and LuaTeX synced from the minimals
> just
> > minutes ago.
> >
> > On Windows, also updated from minimals this morning, I get the following
> > error and no text background:
>
> I'll try to make sure what LuaTeX version is used on Windows. At the
> time of synchronisation there was no luatex snapshot yet and it the
> meantime server name has been changed. (Nobody has complained so far,
> so I almost forgot about it.)
>
> Mojca
>
> ___________________________________________________________________________________
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3368 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

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

* Re: Problem with metapost textbackgrounds on Windows
  2009-08-04 18:03   ` Kevin D. Robbins
@ 2009-08-17  6:30     ` Thomas Floeren
  2009-08-17  8:44       ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Floeren @ 2009-08-17  6:30 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

There seems to be a typo in anch-pgr.mkII which prevents textbackgrounds from working:

line 654 '\enableparposition' should probably read '\enableparpositions'.

If you copy the following lines into your environment it should work:

\def\initializeparbackgrounds
  {\ifcase\totalnofparbackgrounds\else
     \enableparpositions
   \fi}

Regards
Thomas

 

________________________________

From: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl] On Behalf Of Kevin D. Robbins
Sent: Tuesday, August 04, 2009 8:03 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] Problem with metapost textbackgrounds on Windows


Thanks, Mojca. 

Also, a further bit of investigation on Windows shows that building the example (saved in foo.tex) with "context foo.tex" or "texexec --lua foo.tex" produces the results I reported. But, building without lua using "texexec foo.tex" gives a different error but does produce the expected gray background behind the \startC ... \stopC block. Here is the error when building with "texexec foo.tex":

! Undefined control sequence.
\initializeparbackgrounds ...e \enableparposition
                                                  \fi
<inserted text> ...page \initializeparbackgrounds
                                                  \loadctxpreplist \checkref...

\doateverystarttext ->\the \everystarttext
                                           \global \everystarttext \emptytoks
\starttext ->\doateverystarttext
                                 \ifcase \textlevel \registerfileinfo [begin...
l.36 \starttext

Continuing the run just by hitting enter completes the build with the correct background drawn.

Kevin


On Tue, Aug 4, 2009 at 11:48 AM, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote:


	On Tue, Aug 4, 2009 at 19:18, Kevin D. Robbins wrote:
	> Hello all,
	>
	> In the example below, I mean for a gray box with rounded corners to be
	> placed behind \startC ... \stopC blocks. This example compiles properly on
	> Linux with the latest ConTeXt beta and LuaTeX synced from the minimals just
	> minutes ago.
	>
	> On Windows, also updated from minimals this morning, I get the following
	> error and no text background:
	
	
	I'll try to make sure what LuaTeX version is used on Windows. At the
	time of synchronisation there was no luatex snapshot yet and it the
	meantime server name has been changed. (Nobody has complained so far,
	so I almost forgot about it.)
	
	Mojca
	___________________________________________________________________________________
	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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Problem with metapost textbackgrounds on Windows
  2009-08-17  6:30     ` Thomas Floeren
@ 2009-08-17  8:44       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2009-08-17  8:44 UTC (permalink / raw)
  To: thomas.floeren, mailing list for ConTeXt users

Thomas Floeren wrote:
> There seems to be a typo in anch-pgr.mkII which prevents textbackgrounds from working:
> 
> line 654 '\enableparposition' should probably read '\enableparpositions'.
> 
> If you copy the following lines into your environment it should work:
> 
> \def\initializeparbackgrounds
>   {\ifcase\totalnofparbackgrounds\else
>      \enableparpositions
>    \fi}

ok, i'll fix this; it means that we'll have a new current later (as it's 
needed for tex live)

Hans


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


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

end of thread, other threads:[~2009-08-17  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-04 17:18 Problem with metapost textbackgrounds on Windows Kevin D. Robbins
2009-08-04 17:48 ` Mojca Miklavec
2009-08-04 18:03   ` Kevin D. Robbins
2009-08-17  6:30     ` Thomas Floeren
2009-08-17  8:44       ` 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).