ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Thumb indexes
@ 2005-02-12 23:12 cormullion
  2005-02-13 10:12 ` Henning Hraban Ramm
  0 siblings, 1 reply; 9+ messages in thread
From: cormullion @ 2005-02-12 23:12 UTC (permalink / raw)


Henning Hraban Ramm <hraban@fiee.net> said on 2005-02-12, 21:19 (+0100 GMT):

> Perhaps describe a bit more exactly what you'd like to achieve.
> As far as I understood: You want a black rectangle at the margin
> that has no text in it, always same size, but moving position per 
> chapter?

Yes. More precisely, chapter 1 - 5 would have a black box in the margin at the top right of each right page, then chapters 6 to whatever have the next box below, and so on. I usually do this ‘manually’ in a DTP app (by defining a set of master pages and applying them selectively to a group of ‘chapters’) but ConTeXt is clearly capable of doing it automatically. And I bet ConTeXt could also be persuaded to place white text on the box as well...

I’ve read through the MetaFun manual. It’s amazing technology, but a bit too advanced for me at present.

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

* Re: Thumb indexes
  2005-02-12 23:12 Thumb indexes cormullion
@ 2005-02-13 10:12 ` Henning Hraban Ramm
  2005-02-13 11:44   ` cormullion
  0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2005-02-13 10:12 UTC (permalink / raw)


Am 13.02.2005 um 00:12 schrieb cormullion:
>> Perhaps describe a bit more exactly what you'd like to achieve.
>> As far as I understood: You want a black rectangle at the margin
>> that has no text in it, always same size, but moving position per
>> chapter?
> Yes. More precisely, chapter 1 - 5 would have a black box in the 
> margin at the top right of each right page, then chapters 6 to 
> whatever have the next box below, and so on. I usually do this 
> ‘manually’ in a DTP app (by defining a set of master pages and 
> applying them selectively to a group of ‘chapters’) but ConTeXt is 
> clearly capable of doing it automatically. And I bet ConTeXt could 
> also be persuaded to place white text on the box as well...
> I’ve read through the MetaFun manual. It’s amazing technology, but a 
> bit too advanced for me at present.

As far as you only want rectangular boxes (even with round corners), 
you don't need MetaFun.

I guess you should define a "part"-based "logo" with an absolute, 
calculated position via the "layers" mechanism.
- part: even if you don't use the "part" hierarchy for other use, it 
would fit to chapter ranges. simply set the \part output to do nothing
- logo: some element that appears on every (or every right) page is 
called "logo", see http://www.contextgarden.net/Logos

I think that's about "how to do it The ConTeXt Way(TM)", but I can't 
tell you any code from heart, just try it yourself and ask again if you 
tried some steps - as far nobody else feels like giving you better 
advice.

Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net

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

* Re: Thumb indexes
  2005-02-13 10:12 ` Henning Hraban Ramm
@ 2005-02-13 11:44   ` cormullion
  0 siblings, 0 replies; 9+ messages in thread
From: cormullion @ 2005-02-13 11:44 UTC (permalink / raw)


Henning Hraban Ramm <hraban@fiee.net> said on 2005-02-13, 11:12 (+0100 GMT):

> I guess you should define a "part"-based "logo" with an absolute, 
> calculated position via the "layers" mechanism.
> - part: even if you don't use the "part" hierarchy for other use, it 
> would fit to chapter ranges. simply set the \part output to do nothing
> - logo: some element that appears on every (or every right) page is 
> called "logo", see http://www.contextgarden.net/Logos

Good thinking. I’ll investigate. Thanks!

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

* Re: Thumb indexes
  2005-02-13 14:18 ` h h extern
@ 2005-02-15 23:02   ` cormullion
  0 siblings, 0 replies; 9+ messages in thread
From: cormullion @ 2005-02-15 23:02 UTC (permalink / raw)


h h extern <pragma@wxs.nl> said on 2005-02-13, 15:18 (+0100 GMT):

> \unprotected \def\rawsectionnumber#1{\countervalue{\??se#1}} % will be in kernel
> [...] 

Awesome (and scary) stuff. Works great, too.

> you may only read this answer if you also put it in the wiki

OK, I’ll have a go.

Thanks for your help again.

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

* Re: Thumb indexes
  2005-02-11 22:19 cormullion
  2005-02-11 22:43 ` Henning Hraban Ramm
@ 2005-02-13 14:18 ` h h extern
  2005-02-15 23:02   ` cormullion
  1 sibling, 1 reply; 9+ messages in thread
From: h h extern @ 2005-02-13 14:18 UTC (permalink / raw)


cormullion wrote:

> My last question! :-)  I would like to have the various ‘parts’ of a book marked with black rectangles at the right side of each page, visible when the reader flips through the pages. I googled successfully to find ‘fancyhdr’, but that’s a LaTeX package, so I don’t think it will work in ConTeXt. If it’s not too difficult in ConTeXt, can anyone share the secret?

you may only read this answer if you also put it in the wiki


\unprotected \def\rawsectionnumber#1{\countervalue{\??se#1}} % will be in kernel

\setuppagenumbering
   [alternative=doublesided]

\setupcolors
   [state=start]

\setupbackgrounds
   [page]
   [background=thumbs]

\defineoverlay
   [thumbs]
   [\setups{thumbs}]

\def\NOfChapters{4} % i need to make this one available

\startsetups thumbs

     \definemeasure[thumbheight][\dimexpr\paperheight/\NOfChapters\relax]

     \vbox to \paperheight \bgroup
         \vskip \rawsectionnumber{section-2} \measure{thumbheight}
         \vskip -1                           \measure{thumbheight}
         \doifoddpageelse\hfill\donothing
         \framed
             [background=color,
              backgroundcolor=darkgray,
              frame=off,
              foregroundcolor=white,
              height=\measure{thumbheight},width=1cm]
             {\bfa \rawsectionnumber{section-2}}
         \doifoddpageelse\donothing\hfill
         \vss
     \egroup

\stopsetups

\starttext

\chapter{first}  \dorecurse{10}{\input tufte  }
\chapter{second} \dorecurse{10}{\input davis  }
\chapter{third}  \dorecurse{10}{\input zapf   }
\chapter{fourth} \dorecurse{10}{\input bryson }

\stoptext

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

* Re: Thumb indexes
  2005-02-11 23:09   ` cormullion
@ 2005-02-12 20:19     ` Henning Hraban Ramm
  0 siblings, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2005-02-12 20:19 UTC (permalink / raw)


Am 12.02.2005 um 00:09 schrieb cormullion:
>> Perhaps you find out looking at the code in
>> http://contextgarden.net/ConTeXt_info_style (there are
>> nav tabs at the bottom).
> Thanks - I’m looking at it. It looks fairly advanced though :-) (I’ve 
> only been using ConTeXt for a few days...). How are you making a 
> chapter (say) show a mark depending on its number?

Sorry, I'm not that deep in ConTeXt myself, the code is mostly by Hans.
I hope someone other can help you.

Perhaps describe a bit more exactly what you'd like to achieve.
As far as I understood: You want a black rectangle at the margin
that has no text in it, always same size, but moving position per 
chapter?


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net

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

* Re: Thumb indexes
  2005-02-11 22:43 ` Henning Hraban Ramm
@ 2005-02-11 23:09   ` cormullion
  2005-02-12 20:19     ` Henning Hraban Ramm
  0 siblings, 1 reply; 9+ messages in thread
From: cormullion @ 2005-02-11 23:09 UTC (permalink / raw)


Henning Hraban Ramm <hraban@fiee.net> said on 2005-02-11, 23:43 (+0100 GMT):

> Am 11.02.2005 um 23:19 schrieb cormullion:
> 
> > My last question! :-)  I would like to have the various ‘parts’ of a 
> > book marked with black rectangles at the right side of each page, 
> > visible when the reader flips through the pages.
> 
> Perhaps you find out looking at the code in
> http://contextgarden.net/ConTeXt_info_style (there are
> nav tabs at the bottom).

Thanks - I’m looking at it. It looks fairly advanced though :-) (I’ve only been using ConTeXt for a few days...). How are you making a chapter (say) show a mark depending on its number?

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

* Re: Thumb indexes
  2005-02-11 22:19 cormullion
@ 2005-02-11 22:43 ` Henning Hraban Ramm
  2005-02-11 23:09   ` cormullion
  2005-02-13 14:18 ` h h extern
  1 sibling, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2005-02-11 22:43 UTC (permalink / raw)


Am 11.02.2005 um 23:19 schrieb cormullion:

> My last question! :-)  I would like to have the various ‘parts’ of a 
> book marked with black rectangles at the right side of each page, 
> visible when the reader flips through the pages.

Perhaps you find out looking at the code in 
http://contextgarden.net/ConTeXt_info_style (there are nav tabs at the 
bottom).


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net

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

* Thumb indexes
@ 2005-02-11 22:19 cormullion
  2005-02-11 22:43 ` Henning Hraban Ramm
  2005-02-13 14:18 ` h h extern
  0 siblings, 2 replies; 9+ messages in thread
From: cormullion @ 2005-02-11 22:19 UTC (permalink / raw)


My last question! :-)  I would like to have the various ‘parts’ of a book marked with black rectangles at the right side of each page, visible when the reader flips through the pages. I googled successfully to find ‘fancyhdr’, but that’s a LaTeX package, so I don’t think it will work in ConTeXt. If it’s not too difficult in ConTeXt, can anyone share the secret?

thanks!

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

end of thread, other threads:[~2005-02-15 23:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-12 23:12 Thumb indexes cormullion
2005-02-13 10:12 ` Henning Hraban Ramm
2005-02-13 11:44   ` cormullion
  -- strict thread matches above, loose matches on Subject: below --
2005-02-11 22:19 cormullion
2005-02-11 22:43 ` Henning Hraban Ramm
2005-02-11 23:09   ` cormullion
2005-02-12 20:19     ` Henning Hraban Ramm
2005-02-13 14:18 ` h h extern
2005-02-15 23:02   ` cormullion

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