ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* URGENT-presentation
@ 2001-03-14 12:49 Dan Seracu
  2001-03-14 13:17 ` URGENT-presentation Hans Hagen
  2001-03-14 13:23 ` URGENT-presentation Dan Seracu
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Seracu @ 2001-03-14 12:49 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

Hi all!

I'm working to my first presentation. But I have some difficulties at making
backgrounds:

1. how can I use in metapost an external image? (e.g a png)
2. how can I set the text color to white (all text in the presentation)

Dan Seracu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Dan Adrian Seracu.vcf --]
[-- Type: text/x-vcard; name="Dan Adrian Seracu.vcf", Size: 664 bytes --]

BEGIN:VCARD
VERSION:2.1
N:Seracu;Dan;Adrian
FN:Dan Adrian Seracu
ORG:Sintezis Birotica;Retail
TITLE:Coordonator retele POS
TEL;WORK;VOICE:+ 40 59 44 32 88
TEL;CELL;VOICE:+40 94 58 33 24
TEL;WORK;FAX:+ 40 59 44 32 88
ADR;WORK:;;str. Roman Ciorogariu, nr. 24;Oradea;Bihor;3700;România
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:str. Roman Ciorogariu, nr. 24=0D=0AOradea, Bihor 3700=0D=0ARom=E2nia
ADR;HOME:;;;Oradea;Bihor;3700;România
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Oradea, Bihor 3700=0D=0ARom=E2nia
URL:
URL:http://www.sintezis.rdsor.ro
EMAIL;PREF;INTERNET:dans@sintezis.rdsor.ro
EMAIL;INTERNET:danseracu@yahoo.com
REV:20010314T124915Z
END:VCARD

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

* Re: URGENT-presentation
  2001-03-14 12:49 URGENT-presentation Dan Seracu
@ 2001-03-14 13:17 ` Hans Hagen
  2001-03-14 13:35   ` URGENT-presentation Dan Seracu
  2001-03-14 13:57   ` URGENT-presentation Dan Seracu
  2001-03-14 13:23 ` URGENT-presentation Dan Seracu
  1 sibling, 2 replies; 11+ messages in thread
From: Hans Hagen @ 2001-03-14 13:17 UTC (permalink / raw)
  Cc: ntg-context

At 02:49 PM 3/14/01 +0200, Dan Seracu wrote:
>Hi all!

ah, panic !

>I'm working to my first presentation. But I have some difficulties at making
>backgrounds:
>
>1. how can I use in metapost an external image? (e.g a png)

given that you have the latest context, how about: 

externalfigure "somebitmap.png"
  scaled 2
  shifted (10,100)
  rotated (-45) ;

>2. how can I set the text color to white (all text in the presentation)

let's reveal another new secret key: foregroundcolor 

\starttext

\setupcolors[state=start]

\setupbackgrounds
  [page]
  [background=color,backgroundcolor=red,
   foregroundcolor=white]

\input tufte

\stoptext

Simple eh? 

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


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

* Re: URGENT-presentation
  2001-03-14 12:49 URGENT-presentation Dan Seracu
  2001-03-14 13:17 ` URGENT-presentation Hans Hagen
@ 2001-03-14 13:23 ` Dan Seracu
  2001-03-14 13:51   ` URGENT-presentation Hans Hagen
  1 sibling, 1 reply; 11+ messages in thread
From: Dan Seracu @ 2001-03-14 13:23 UTC (permalink / raw)


> Hi all!
>
> I'm working to my first presentation. But I have some difficulties at
making
> backgrounds:
>
> 1. how can I use in metapost an external image? (e.g a png)
> 2. how can I set the text color to white (all text in the presentation)
>
3. How can I clip a text scaled and shifted? For example, I want to
intersect a logo text with a circle, so that the part outside the circle
remains black, and the part inside the circle remains white?

Dan Seracu


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

* Re: URGENT-presentation
  2001-03-14 13:17 ` URGENT-presentation Hans Hagen
@ 2001-03-14 13:35   ` Dan Seracu
  2001-03-14 13:53     ` URGENT-presentation Hans Hagen
  2001-03-14 15:15     ` URGENT-presentation Hans Hagen
  2001-03-14 13:57   ` URGENT-presentation Dan Seracu
  1 sibling, 2 replies; 11+ messages in thread
From: Dan Seracu @ 2001-03-14 13:35 UTC (permalink / raw)
  Cc: NTG ConTeXt

Hello!

> ah, panic !

Well, I'm tyred of PowerPoint, so...

> >2. how can I set the text color to white (all text in the presentation)
>
> let's reveal another new secret key: foregroundcolor
>
> \starttext
>
> \setupcolors[state=start]
>
> \setupbackgrounds
>   [page]
>   [background=color,backgroundcolor=red,
>    foregroundcolor=white]
>
> \input tufte
>
> \stoptext
>
> Simple eh?
>

Simple, indeed but it did not worked. The text on the slides remained black.
I tried:
\setupbackground[page][background={color,Sintezis},backgroundcolor=blue,
foregroundcolor=white]

but, as I said, the text on the slides is still black.


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

* Re: URGENT-presentation
  2001-03-14 13:23 ` URGENT-presentation Dan Seracu
@ 2001-03-14 13:51   ` Hans Hagen
  0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2001-03-14 13:51 UTC (permalink / raw)
  Cc: NTG ConTeXt

At 03:23 PM 3/14/01 +0200, Dan Seracu wrote:
>
>> Hi all!
>>
>> I'm working to my first presentation. But I have some difficulties at
>making
>> backgrounds:
>>
>> 1. how can I use in metapost an external image? (e.g a png)
>> 2. how can I set the text color to white (all text in the presentation)
>>
>3. How can I clip a text scaled and shifted? For example, I want to
>intersect a logo text with a circle, so that the part outside the circle
>remains black, and the part inside the circle remains white?

there is an example of clipping in the mp manual, 

(1) define a clip path in mp (keep an eye on the refernce point) 
(2) hook it into the clip routine 

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


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

* Re: URGENT-presentation
  2001-03-14 13:35   ` URGENT-presentation Dan Seracu
@ 2001-03-14 13:53     ` Hans Hagen
  2001-03-14 15:15     ` URGENT-presentation Hans Hagen
  1 sibling, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2001-03-14 13:53 UTC (permalink / raw)
  Cc: NTG ConTeXt

At 03:35 PM 3/14/01 +0200, Dan Seracu wrote:

>Simple, indeed but it did not worked. The text on the slides remained black.
>I tried:
>\setupbackground[page][background={color,Sintezis},backgroundcolor=blue,

       backgrounds (plural)

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


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

* Re: URGENT-presentation
  2001-03-14 13:17 ` URGENT-presentation Hans Hagen
  2001-03-14 13:35   ` URGENT-presentation Dan Seracu
@ 2001-03-14 13:57   ` Dan Seracu
  2001-03-14 14:31     ` URGENT-presentation Hans Hagen
  1 sibling, 1 reply; 11+ messages in thread
From: Dan Seracu @ 2001-03-14 13:57 UTC (permalink / raw)
  Cc: NTG ConTeXt

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

Hello!

I have the latest beta from pragma-ade. But when I tried, it did not worked!
Neither the external figure, nore the textcolor. I send you the presentation
style, maybe there is a solution.

What about the 3rd question? (scaling and clipping text?)

[-- Attachment #2: s-pre-sz.tex --]
[-- Type: application/octet-stream, Size: 6648 bytes --]

%D \module
%D   [      file=s-pre-sint,
%D        version=2001.03.14,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Sintezis Environment,
%D         author=Dan Seracu,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\usemodule[pre-general] % mode=step 

%D \macros 
%D   {setupbodyfont}
%D
%D As said, we will use the Antikwa Torunska, and because we
%D want it to show up well, we use it large.

\setupbodyfont
  [phv,14.4pt]

%D \macros 
%D   {definecolor, setupcolors}
%D
%D Thus style only uses gray scales, but nevertheless we turn
%D on color. We only use a few logical color names.

\setupcolors
  [state=start]

\definecolor [InteractionColor] [s=.6]
\definecolor [PrimaryColor]     [s=.8]
\definecolor [SecondaryColor]   [s=.9]
\definecolor [BlueColor]        [blue]
\definecolor [DarkBlueColor]    [black]
\definecolor [TextColor]        [white]

%D \macros 
%D   {setuppapersize}
%D
%D As (nearly) always, we use a 600 pt times 450 pt screen
%D width, mapped on ditto paper dimensions.

\setuppapersize
  [S6][S6]

%D \macros
%D   {setuplayout}
%D
%D The layout is rather symmetrical. We don't use headers and
%D footers, and thereby automatically turn off the page
%D numbering: no room, no number. We use the bottom to present
%D a rather trivial menu.

\setuplayout
  [backspace=2cm,
   topspace=2cm,
   width=middle,
   header=0pt,
   height=middle,
   footer=0pt,
   bottomdistance=.5cm,
   bottom=1cm]

%D \macros
%D   {setupinteractionmenu,startinteractionmenu}
%D
%D This menu is slighly moved to the right because that looks
%D better. The menu itself has one goto (\type {\got}) entry,
%D which is forced to the right.

\setupinteractionmenu
  [bottom]
  [rightoffset=-1cm]

\startinteractionmenu[bottom]
  \hfill \got [CloseDocument] \bfd Ie\c sire \\
\stopinteractionmenu

%D \macros
%D   {setupbackgrounds}
%D
%D Page background are calculated at each page, opposite to the
%D other backgrounds, that are reused and only calculated when
%D \CONTEXT\ is explictly told to do so. There are three
%D overlays: a gray fill, the graphic, and a button that
%D circulates the pages.

\setupbackgrounds
  [page]
  [background={color,Sintezis,GoAround}, 
   foregroundcolor=TextColor,
   backgroundcolor=BlueColor]

%D \macros
%D  {defineoverlay}
%D
%D The \type {forward} reference action circulates over the
%D pages, so, at the last page, we are led back to the first.

\defineoverlay [GoAround] [\overlaybutton{forward}]

%D The joke is a simple \METAPOST\ routine. The picture is
%D actually larger than the screen, but is clipped of when
%D included.

\defineoverlay [Sintezis] [\useMPgraphic{sintback}]

\startuseMPgraphic{sintback}
  input mp-tool ;
  path p, pcerc;

    externalfigure "concept.png"  ;        

  width := \overlaywidth ;
  height := \overlayheight ;
  p := unitsquare xscaled width yscaled height ;
%  linear_shade (p, 2, \MPcolor{BlueColor}, \MPcolor{DarkBlueColor}) ;

  p := (50pt, 20pt)..(width, 20pt)..(width,80pt)..cycle ;
%  pcerc := p ;
%  linear_shade (p, 0, \MPcolor{DarkBlueColor}, \MPcolor{BlueColor}) ;

% Now the external image...

\stopuseMPgraphic

%D \macros
%D   {setupinteraction,setupinteractionscreen}
%D
%D We did not yet turn on the interaction, so let's do that
%D now. When opened, the document will fil the screen.

\setupinteraction
  [state=start,
   color=InteractionColor,
   menu=on]

\setupinteractionscreen
  [option=max]

%D \macros
%D   {TitlePage, Topics, Topic}
%D
%D A presentation normally consists of a title page, a list of
%D topics, and the content itself. In this style, a further
%D subdivision does not make sense, but because we want to be
%D compatible with the other styles, they are added. A
%D presentation looks like:
%D
%D \starttypen
%D \usemodule[pre-antikwa]
%D
%D \startext
%D
%D \TitlePage{The Title}
%D
%D \Topics{Contents}
%D
%D \Topic{Some Topic}
%D
%D \startitemize
%D \item first
%D \item second
%D \stopitemize
%D
%D \Topic{Some Topic}
%D
%D ...
%D
%D \stoptext
%D \stoptypen

%D \macros
%D   {definehead, Topic, Subject}
%D
%D We use dedicated sectioning commands.

\definehead [Topic]   [chapter]
\definehead [Subject] [section]

\definehead [Nopic]   [title]

%D \macros
%D   {setuphead}
%D
%D We turn of numbering. The assignment to \type {after} takes
%D care of the increasing indentation. This indentation is the
%D only low level \TEX\ code needed. Including this
%D functionality in the core of \CONTEXT\ is not that useful
%D and I would forget about this feature being present anyway.

\setuphead
  [Topic, Nopic, Subject]
  [number=no,
   after={\blank[2*big]\ToTheLeft\everypar{\ToTheRight}}]

%D After section titles we set the \type {\leftskip} to a value
%D that suits the Antikwa slant.

\def\ToTheLeft%
  {\gdef\LeftSkip{30}%
   \rightskip0pt\relax
   \leftskip30pt\relax}

%D Each new paragraph adds to the \type {\leftskip}.

\def\ToTheRight%
  {\doglobal\increment(\LeftSkip,20)%
   \leftskip=\LeftSkip pt\relax}

%D \macros
%D   {Topics}
%D
%D The \type {\Topics} command uses a bot of low level
%D \CONTEXT. We could have done with:
%D
%D \starttypen
%D \def\Topics#1%
%D   {\Nopic[Topics]{#1}
%D    \placelist[Topic][criterium=all]}
%D \stoptypen
%D
%D but the next alternative sort of ignores this command when
%D no list is found.

\def\Topics#1%
  {\determinelistcharacteristics[Topic]
   \ifcase\utilitylistlength\else
     \Nopic[Topics]{#1}
     \placelist[Topic][criterium=all]
   \fi}

%D \macros
%D   {setuplist}
%D
%D We use the single item command to achieve a result similar
%D to the itemizations.

\setuplist
  [Topic]
  [alternative=command,
   command=\TopicListCommand]

\def\TopicListCommand#1#2#3%
  {\item#2\par}

%D A dummy command, needed to be compatible with the other
%D presentation styles.

\def\Subjects%
  {}

%D \macros
%D   {StartTitlePage}
%D
%D We use a nested \type {\everypar}; everything in there
%D will be put in front of each paragraph. The nesting prevents
%D the first paragraph from indenting. The struts give the 
%D lines a decent height, which looks better inrelation to the
%D next pages. 

\def\StartTitlePage%
  {\startstandardmakeup
   \bfd\setupinterlinespace
   \everypar{\everypar{\advance\leftskip30pt\relax}}
   \let\\=\blank
   \begstrut}

\def\StopTitlePage%
  {\endstrut
   \vfill
   \stopstandardmakeup}

%D \macros
%D   {TitlePage}
%D
%D The title page can be generated with one command:

\def\TitlePage#1%
  {\StartTitlePage#1\StopTitlePage}

%\color[TextColor]

\endinput

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

* Re: URGENT-presentation
  2001-03-14 13:57   ` URGENT-presentation Dan Seracu
@ 2001-03-14 14:31     ` Hans Hagen
  2001-03-15  6:27       ` URGENT-presentation Dan Seracu
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2001-03-14 14:31 UTC (permalink / raw)
  Cc: NTG ConTeXt

At 03:57 PM 3/14/01 +0200, Dan Seracu wrote:

>Attachment Converted: "c:\local\mail\eudora\attach\s-pre-sz2.tex"

that's a rather minimal example, i need the fig, some data etc, 

----

beware: mp-tool is already included automatically, so doing it twice makes
no sense   

do you use metafun, if so, have you regenerated the metafun format 

don't call your files s-*.tex just name them 

\startenvironment mine 

\stopenvironment 

and include them with 

\environment 

that way they will not clash with future modules in the distribution

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


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

* Re: URGENT-presentation
  2001-03-14 13:35   ` URGENT-presentation Dan Seracu
  2001-03-14 13:53     ` URGENT-presentation Hans Hagen
@ 2001-03-14 15:15     ` Hans Hagen
  1 sibling, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2001-03-14 15:15 UTC (permalink / raw)
  Cc: NTG ConTeXt

Hi Dan,  

you can use 

\setupbackgrounds[text][foregroundcolor=white,background=fake]

as a hack for your urgent needs 

[indeed there is an additional layer for text]

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


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

* Re: URGENT-presentation
  2001-03-14 14:31     ` URGENT-presentation Hans Hagen
@ 2001-03-15  6:27       ` Dan Seracu
  2001-03-15  8:10         ` URGENT-presentation Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Seracu @ 2001-03-15  6:27 UTC (permalink / raw)
  Cc: NTG ConTeXt

Hi!

Thank's for the bothering.

> beware: mp-tool is already included automatically, so doing it twice makes
> no sense

ok, I will change it.

> do you use metafun, if so, have you regenerated the metafun format

How do I regenerate the metafun format? Indeed, sometimes it complains with
it.

> don't call your files s-*.tex just name them
>
> \startenvironment mine
>
> \stopenvironment
>
> and include them with
>
> \environment

ok.

Dan Seracu


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

* Re: URGENT-presentation
  2001-03-15  6:27       ` URGENT-presentation Dan Seracu
@ 2001-03-15  8:10         ` Hans Hagen
  0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2001-03-15  8:10 UTC (permalink / raw)
  Cc: NTG ConTeXt

At 08:27 AM 3/15/01 +0200, Dan Seracu wrote:
 >How do I regenerate the metafun format? Indeed, sometimes it complains with
>it.
> 

texexec --make --alone --metafun 

the mem file will end up on your local path (so you have to move it to
web2c) unless you have set the MPMEMS env var. 

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


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

end of thread, other threads:[~2001-03-15  8:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-14 12:49 URGENT-presentation Dan Seracu
2001-03-14 13:17 ` URGENT-presentation Hans Hagen
2001-03-14 13:35   ` URGENT-presentation Dan Seracu
2001-03-14 13:53     ` URGENT-presentation Hans Hagen
2001-03-14 15:15     ` URGENT-presentation Hans Hagen
2001-03-14 13:57   ` URGENT-presentation Dan Seracu
2001-03-14 14:31     ` URGENT-presentation Hans Hagen
2001-03-15  6:27       ` URGENT-presentation Dan Seracu
2001-03-15  8:10         ` URGENT-presentation Hans Hagen
2001-03-14 13:23 ` URGENT-presentation Dan Seracu
2001-03-14 13:51   ` URGENT-presentation 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).