ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* vertical interactionbar?
@ 2007-03-08 15:06 Johan Sandblom
  2007-03-08 18:51 ` Thomas A. Schmitz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Johan Sandblom @ 2007-03-08 15:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I am trying to make a presentation with a progress bar. I want it
along the right edge of the screen. I remember seeing something like
that but cannot find it now, and all the alternatives for
interactionbar seem to require a horizontal one.

How can I make a vertical progress bar?

Regards, Johan

-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
- Bertrand Russell

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

* Re: vertical interactionbar?
  2007-03-08 15:06 vertical interactionbar? Johan Sandblom
@ 2007-03-08 18:51 ` Thomas A. Schmitz
  2007-03-09 14:33 ` Willi Egger
  2007-03-11 21:55 ` Hans Hagen
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas A. Schmitz @ 2007-03-08 18:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Mar 8, 2007, at 4:06 PM, Johan Sandblom wrote:

> I am trying to make a presentation with a progress bar. I want it
> along the right edge of the screen. I remember seeing something like
> that but cannot find it now, and all the alternatives for
> interactionbar seem to require a horizontal one.
>
> How can I make a vertical progress bar?
>
> Regards, Johan

I'm not sure if there is an option to have an actual progress bar  
along the right edge, but for a presentation I had to do recently, I  
also wanted something like this and came up with this code. Maybe  
this can inspire you a bit:

\definecolor[outer][r=0,g=0,b=.92]
\definecolor[current][r=0,g=0,b=.4]
\definecolor[inner][s=.98]

\defineoverlay[mybackground][\useMPgraphic{left}]

\startuseMPgraphic{left}
StartPage ;
fill Page withcolor \MPcolor{inner} ;
z1 = ulcorner Page ;
z5 = llcorner Page ;
path q ;
q = z1 -- z5 ;
t = arclength (q) ;
u = t/15 ;
v = (PageNumber/NOfPages) ;
z4 = (x1+1cm, y1-1cm) ;
z3 = (x4, y1) ;
z2 = (x1, y4) ;
path m[] ;
m[1] = z1 -- z2 -- z4 -- z3 -- cycle ;
m[2] = m[1] shifted (0, -2*u) ;
m[3] = m[1] shifted (0, -4*u) ;
m[4] = m[1] shifted (0, -6*u) ;
m[5] = m[1] shifted (0, -8*u) ;
m[6] = m[1] shifted (0, -10*u) ;
m[7] = m[1] shifted (0, -12*u) ;
m[8] = m[1] shifted (0, (-14*u-0.5mm)) ;
for i=1 upto 8:
         fill m[i] withcolor\MPcolor{outer} ;
endfor;
if PageNumber=1:
         fill m[1] withcolor \MPcolor{current} ;
elseif (v>.001) and (v<.167) :
         fill m[2] withcolor \MPcolor{current} ;
elseif (v>.166) and (v<.334):
         fill m[3] withcolor \MPcolor{current} ;
elseif (v>.333) and (v<.501):
         fill m[4] withcolor \MPcolor{current} ;
elseif (v>.5) and (v<.667):
         fill m[5] withcolor \MPcolor{current} ;
elseif (v>.666) and (v<.834):
         fill m[6] withcolor \MPcolor{current} ;
elseif (v>.833) and (v<1):
         fill m[7] withcolor \MPcolor{current} ;
elseif v=1:
         fill m[8] withcolor \MPcolor{current} ;
fi ;
StopPage ;

\stopuseMPgraphic

\setupbackgrounds[page][background={mybackground}]

HTH

Thomas

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

* Re: vertical interactionbar?
  2007-03-08 15:06 vertical interactionbar? Johan Sandblom
  2007-03-08 18:51 ` Thomas A. Schmitz
@ 2007-03-09 14:33 ` Willi Egger
  2007-03-11 21:55 ` Hans Hagen
  2 siblings, 0 replies; 5+ messages in thread
From: Willi Egger @ 2007-03-09 14:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Johan,

The following code was used to move a picture along the right margin,  
depending on the
pagenumber...  - I hope this inspires you for your own presentation.

\def\Gag%
    {\bgroup
       \vbox to \vsize%
          {\ifnum\totalnumberofpages=\realpageno
             \vfil
            {\externalfigure[yourpicture-finish][width=\rightedgewidth]}
             \else
             \scratchcounter=\realpageno
             \advance \scratchcounter by -1
             \vskip 0pt plus \scratchcounter fil
             {\externalfigure[yourpicture][width=\rightedgewidth]}
             \scratchcounter=\totalnumberofpages
             \advance \scratchcounter by -\realpageno
             \vskip 0pt plus \scratchcounter fil
           \fi}
    \egroup}

\defineoverlay[MoveDown][\Gag]

\setupbackgrounds[state=repeat]
\setupbackgrounds
   [page]
   [background=PageBackground]
\setupbackgrounds[text][rightedge][background=MoveDown

Kind regards

Willi

On Mar 8, 2007, at 4:06 PM, Johan Sandblom wrote:

> I am trying to make a presentation with a progress bar. I want it
> along the right edge of the screen. I remember seeing something like
> that but cannot find it now, and all the alternatives for
> interactionbar seem to require a horizontal one.
>
> How can I make a vertical progress bar?
>
> Regards, Johan
>
> -- 
> Johan Sandblom  N8, MRC, Karolinska sjh
> t +46851776108  17176 Stockholm
> m +46735521477  Sweden
> "What is wanted is not the will to believe, but the
> will to find out, which is the exact opposite"
> - Bertrand Russell
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

Willi Egger
w.egger@boede.nl

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

* Re: vertical interactionbar?
  2007-03-08 15:06 vertical interactionbar? Johan Sandblom
  2007-03-08 18:51 ` Thomas A. Schmitz
  2007-03-09 14:33 ` Willi Egger
@ 2007-03-11 21:55 ` Hans Hagen
  2007-03-12 13:36   ` Johan Sandblom
  2 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2007-03-11 21:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Johan Sandblom wrote:
> I am trying to make a presentation with a progress bar. I want it
> along the right edge of the screen. I remember seeing something like
> that but cannot find it now, and all the alternatives for
> interactionbar seem to require a horizontal one.
>
> How can I make a vertical progress bar?
>   
rotate a horizontal one -) 


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

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

* Re: vertical interactionbar?
  2007-03-11 21:55 ` Hans Hagen
@ 2007-03-12 13:36   ` Johan Sandblom
  0 siblings, 0 replies; 5+ messages in thread
From: Johan Sandblom @ 2007-03-12 13:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

ah

embarrassingly easy

2007/3/11, Hans Hagen <pragma@wxs.nl>:
> Johan Sandblom wrote:
> > I am trying to make a presentation with a progress bar. I want it
> > along the right edge of the screen. I remember seeing something like
> > that but cannot find it now, and all the alternatives for
> > interactionbar seem to require a horizontal one.
> >
> > How can I make a vertical progress bar?
> >
> rotate a horizontal one -)
>
>
> -----------------------------------------------------------------
>                                           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
> -----------------------------------------------------------------
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>


-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
- Bertrand Russell

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

end of thread, other threads:[~2007-03-12 13:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-08 15:06 vertical interactionbar? Johan Sandblom
2007-03-08 18:51 ` Thomas A. Schmitz
2007-03-09 14:33 ` Willi Egger
2007-03-11 21:55 ` Hans Hagen
2007-03-12 13:36   ` Johan Sandblom

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