ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metapost problems
@ 2003-04-17  4:27 emmanuel.rialland
  2003-04-17  6:39 ` Patrick Gundlach
  0 siblings, 1 reply; 5+ messages in thread
From: emmanuel.rialland @ 2003-04-17  4:27 UTC (permalink / raw)


Hi,

I am trying to insert the same picture in a text at different places and in
different sizes.

The logo looks like a bicolor square with white text on top of it.
After many errands, I wrote the following so that I can size as needed:

\def\Logo#1%
  {\startMPgraphic
     % Top rectangle
     drawfill (0,0)--(2cm,0)--(2cm,1cm)--(0,1cm)--cycle with color blue ;
     % Bottom black rectangle
     drawfill (0,0)--(2cm,0)--(2cm,-1cm)--(0,-1cm)--cycle with color black
;
     % White Text
     draw btex \bf AB etex withcolor white ;
     % resize to size
     currentpicture := currentpicture scaled #1 ;
   \stopMPgraphic
   \loadcurrentMPgraphic
   \placeMPgraphic}

All I get is a frame with "undefined" written in it. Any clues?


I also try to have draft written in the right margin. I copied the text
showed p156 of the Metafun manual (the second example from the top). Never
had any success. Is there anything I am missing?



Now weirder (to me at least). A bit further in my doc, I have a chart
created with the chart module.
I had to comment out the chart code. If I don't, all the logos and all the
right margins (where I would like to see DRAFT) are replaced by the chart.
And at the location where the chart is included, there is no chart (more
precisely, there is no boxes and arrows but the labels are still there,
scattered around over the text as an overlay).

I am using teXExec 3.1 that comes with Cygwin.


Any help is welcome.

Thanks in advance,


Emmanuel







**************************************************************************
Have you checked our new corporate website at  http://www.sgib.com ?

The information contained herein is confidential and is intended solely
for the addressee(s).  It shall not be construed as a recommendation to
buy or sell any security.  Any unauthorized access, use, reproduction,
disclosure or dissemination is prohibited.
Neither SGIB nor any of its subsidiaries or affiliates
shall assume any legal liability or responsibility for any incorrect,
misleading or altered information contained herein.
**************************************************************************

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

* Re: Metapost problems
  2003-04-17  4:27 Metapost problems emmanuel.rialland
@ 2003-04-17  6:39 ` Patrick Gundlach
  2003-04-17  7:16   ` Hans Hagen
  2003-04-17  8:36   ` emmanuel.rialland
  0 siblings, 2 replies; 5+ messages in thread
From: Patrick Gundlach @ 2003-04-17  6:39 UTC (permalink / raw)


emmanuel.rialland@sgib.com writes:

Hi,


>
> \def\Logo#1%
>   {\startMPgraphic

I've never seen this command before. Yet another MP environment :)


> All I get is a frame with "undefined" written in it. Any clues?

try
\protectbufferstrue

at the beginning of your document and please report the result. Also
please make sure that you have cont-sys.tex in your tex tree somewhere.

[ Hans, it would be nice if we could use the patch from Dennis
  Brakhane (or sth. similar) in texexec. ]

> I also try to have draft written in the right margin. I copied the text
> showed p156 of the Metafun manual (the second example from the top). Never
> had any success. 

What happened? Did you get the same error? 

> Now weirder (to me at least). A bit further in my doc, I have a chart
> created with the chart module.
> I had to comment out the chart code. If I don't, all the logos and all the
> right margins (where I would like to see DRAFT) are replaced by the chart.
> And at the location where the chart is included, there is no chart (more
> precisely, there is no boxes and arrows but the labels are still there,
> scattered around over the text as an overlay).

That is weired, but hard to tell why. Please post a minimal example
that shows your problem. And please make sure that it is a full
working example! Including \starttext... \stoptext and other
necessary commands. But not more than this. Thank you.


Patrick "\protectbufferstrue" Gundlach

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

* Re: Re: Metapost problems
  2003-04-17  6:39 ` Patrick Gundlach
@ 2003-04-17  7:16   ` Hans Hagen
  2003-04-17  8:36   ` emmanuel.rialland
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2003-04-17  7:16 UTC (permalink / raw)


At 08:39 17/04/2003 +0200, you wrote:
>emmanuel.rialland@sgib.com writes:
>
>Hi,
>
>
> >
> > \def\Logo#1%
> >   {\startMPgraphic
>
>I've never seen this command before. Yet another MP environment :)

That's a real low level one, not reallu meant for the user level,

\startMPcode
  ...
\stopMPcode

is the way to go here

>at the beginning of your document and please report the result. Also
>please make sure that you have cont-sys.tex in your tex tree somewhere.
>
>[ Hans, it would be nice if we could use the patch from Dennis
>   Brakhane (or sth. similar) in texexec. ]

i still have to look into it ... time ... reconstructing machine ...

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: Metapost problems
@ 2003-04-17  8:36   ` emmanuel.rialland
  2003-04-17  9:19     ` Patrick Gundlach
  0 siblings, 1 reply; 5+ messages in thread
From: emmanuel.rialland @ 2003-04-17  8:36 UTC (permalink / raw)



I am happy to report some progress thanks to your help.

reinstalled the context package;
\protectbufferstrue is full of black magic;
noticed that there shouldn't be any white space between with and color;

Making more changes on the logo definition. Not quite there yet, but on the
way.

All in all getting better. Even the chart has gone back where it should be
(I have no idea what the problem is/was).

The draft still doesn't appear.

Another question:
- how to change the font of the logo text?

Thanks,


Emmanuel






**************************************************************************
Have you checked our new corporate website at  http://www.sgib.com ?

The information contained herein is confidential and is intended solely
for the addressee(s).  It shall not be construed as a recommendation to
buy or sell any security.  Any unauthorized access, use, reproduction,
disclosure or dissemination is prohibited.
Neither SGIB nor any of its subsidiaries or affiliates
shall assume any legal liability or responsibility for any incorrect,
misleading or altered information contained herein.
**************************************************************************

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

* Re: Metapost problems
  2003-04-17  8:36   ` emmanuel.rialland
@ 2003-04-17  9:19     ` Patrick Gundlach
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick Gundlach @ 2003-04-17  9:19 UTC (permalink / raw)


emmanuel.rialland@sgib.com writes:


Hi,


> The draft still doesn't appear.

How should we know what is going wrong?

> Another question:
> - how to change the font of the logo text?

\startMPenvironment[+]

[fontswitch]

\stopMPenvironment

([+] is for setup of MP *and* TeX text, not needed for MP only)



Patrick "please post minimal working examples" Gundlach

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

end of thread, other threads:[~2003-04-17  9:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-17  4:27 Metapost problems emmanuel.rialland
2003-04-17  6:39 ` Patrick Gundlach
2003-04-17  7:16   ` Hans Hagen
2003-04-17  8:36   ` emmanuel.rialland
2003-04-17  9:19     ` Patrick Gundlach

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).