ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Placing marks at edge.
@ 2014-03-05 15:43 john Culleton
  2014-03-05 19:49 ` Willi Egger
  0 siblings, 1 reply; 3+ messages in thread
From: john Culleton @ 2014-03-05 15:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

You have seen them in books from O'Reilly and
even in books like "TeX for the Impatient":
markings on the outer edge of each odd page that
bleed past the page edge indicating a particular
chapter. In the last named they are a simple 
box with very fine horizontal black lines. In some
O'Reilly books like "Web Design in a Nutshell"
they are a black box with the chapter name
(possibly abbreviated) rotated 90 degrees in
small white text. 

No doubt I can do this in Context. The question
is what is the simplest and most foolproof way
home.

Of course the page size will be made larger by
0.125 inch on all sides except the spine edge to
provide a trim. The marker box I describe
protrudes into the trim area. And its location
and the text  change for each chapter of
course. 

It is very hard in this country to get a book
review by the important pre-publication
reviewers like Booklist and Library Journal. But
that review is the key to among other things
library sales and academic sales. Edge markings
like I discuss above will immediately separate my
books from those slapped together in MSWord etc. 

I am just trying to get my books past the clerk in
the mail room who has orders to discard anything
that looks self-published.  

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: "Create Book Covers with Scribus"
available at
http://www.booklocker.com/books/4055.html
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Placing marks at edge.
  2014-03-05 15:43 Placing marks at edge john Culleton
@ 2014-03-05 19:49 ` Willi Egger
  2014-03-05 23:50   ` john Culleton
  0 siblings, 1 reply; 3+ messages in thread
From: Willi Egger @ 2014-03-05 19:49 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

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

Hello John,

I was busy to make this some time ago. May that the attached file is a base for what you want to achieve.

Kind regards

Willi

[-- Attachment #2: Thumbnails-MKIV.tex --]
[-- Type: application/octet-stream, Size: 2499 bytes --]

% Context file
% Filename: untitled.tex
% 
% 28-02-2011
% Copyright (c) 2011 BOEDE. All rights reserved.

\usetypescriptfile[type-seravek]
\usetypescript[Seravek]
\setupbodyfont[Seravek,ss,12pt]
\setuppagenumbering[location=]
\setuplayout
	[topspace=2.5cm,
	backspace=1.5cm,
	header=0pt,
	footer=0pt,
	height=middle,
	width=middle]
\mainlanguage[nl]

%\showframe
\setuppapersize[A4][A4,oversized]

\setuplayout
  [width=middle,
   % margin=\dimexpr\backspace-\margindistance\relax
   location=middle]

\definecolor[chap_frame][g=1,t=1,a=12]
\definecolor[sect_frame][b=1,t=1,a=12]
\definecolor[textcolor] [r=1,t=1,a=12]

\startuseMPgraphic{chapter thumb}
  path chap_frame, sect_frame ;  pair pos,a,b ;  picture text ;

  if  \somenamedheadnumber{chapter}{current} > 0 :
	curr_chap := \somenamedheadnumber{chapter}{current} ; 
  else :
	curr_chap := 1 ;
  fi;
  if \somenamedheadnumber{chapter}{last} > 0 :
   	last_chap := \somenamedheadnumber{chapter}{last} ;
  else :
  	last_chap := 1 ;
	  fi;
	  if \somenamedheadnumber{section}{current} > 0 : 
	curr_sect := \somenamedheadnumber{section}{current} ; 
	  else: 
  	curr_sect := 1 ;
  fi;
  if \somenamedheadnumber{section}{last} > 0 :
  	last_sect := \somenamedheadnumber{section}{last};
  else:
	last_sect := 1;
  fi;
  skip   := TextHeight * (curr_chap-1)/last_chap ;
  height := TextHeight/last_chap ;
  sskip  := height*curr_sect/last_sect ;
 
  text   := textext("\ssbfb\textcolor Chapter\enspace\getmarking[chapternumber]");

  StartPage ;
    chap_frame := fullsquare xyscaled(RightMarginWidth,height) ;

    a := ulcorner chap_frame ;
    b := urcorner chap_frame ;

    sect_frame := a--b--(xpart b,ypart b-sskip)--(xpart a,ypart a-sskip)--cycle;

    pos := urcorner Field[Text][RightMarginSeparator] -
           ulcorner chap_frame - (0,skip);

    fill chap_frame shifted pos withcolor \MPcolor{chap_frame};
    unfill sect_frame shifted pos withcolor white ;
    fill sect_frame shifted pos withcolor \MPcolor{sect_frame};
    draw text rotated 90 shifted pos ;
  StopPage ;
\stopuseMPgraphic


\defineoverlay[chapter thumb][\useMPgraphic{chapter thumb}]

\setupbackgrounds[page][background=chapter thumb]


\starttext  \showframe
\dorecurse{6}{\chapter{Test Chapter #1}
  Chapter \headnumber[chapter][current] of
  \headnumber[chapter][last]
  \dorecurse{9}{\section{Test Section}
    Section \headnumber[section][current] of
    \headnumber[section][last] \blank
    \input tufte \par \input knuth \par
  }
}
\chapter 1
\stoptext

[-- Attachment #3: Type: text/plain, Size: 2163 bytes --]


On 5 mrt. 2014, at 16:43, john Culleton <John@wexfordpress.com> wrote:

> You have seen them in books from O'Reilly and
> even in books like "TeX for the Impatient":
> markings on the outer edge of each odd page that
> bleed past the page edge indicating a particular
> chapter. In the last named they are a simple 
> box with very fine horizontal black lines. In some
> O'Reilly books like "Web Design in a Nutshell"
> they are a black box with the chapter name
> (possibly abbreviated) rotated 90 degrees in
> small white text. 
> 
> No doubt I can do this in Context. The question
> is what is the simplest and most foolproof way
> home.
> 
> Of course the page size will be made larger by
> 0.125 inch on all sides except the spine edge to
> provide a trim. The marker box I describe
> protrudes into the trim area. And its location
> and the text  change for each chapter of
> course. 
> 
> It is very hard in this country to get a book
> review by the important pre-publication
> reviewers like Booklist and Library Journal. But
> that review is the key to among other things
> library sales and academic sales. Edge markings
> like I discuss above will immediately separate my
> books from those slapped together in MSWord etc. 
> 
> I am just trying to get my books past the clerk in
> the mail room who has orders to discard anything
> that looks self-published.  
> 
> -- 
> John Culleton
> Wexford Press
> Free list of books for self-publishers:
> http://wexfordpress.net/shortlist.html
> PDF e-book: "Create Book Covers with Scribus"
> available at
> http://www.booklocker.com/books/4055.html
> ___________________________________________________________________________________
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #4: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Placing marks at edge.
  2014-03-05 19:49 ` Willi Egger
@ 2014-03-05 23:50   ` john Culleton
  0 siblings, 0 replies; 3+ messages in thread
From: john Culleton @ 2014-03-05 23:50 UTC (permalink / raw)
  To: ntg-context

On Wed, 5 Mar 2014 20:49:03 +0100
Willi Egger <context@boede.nl> wrote:

> Hello John,
> 
> I was busy to make this some time ago. May that
> the attached file is a base for what you want
> to achieve.
> 
> Kind regards
> 
> Willi

Compiles correctly. A brilliant solution.

That gets me 3/4 of the way to my objective. The
remainder requires that the margin marks be
shown only on odd pages, or else switched to the
left hand margin for even pages.

Thinks for sharing your solution to
this pesky problem. 

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: "Create Book Covers with Scribus"
available at
http://www.booklocker.com/books/4055.html
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2014-03-05 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 15:43 Placing marks at edge john Culleton
2014-03-05 19:49 ` Willi Egger
2014-03-05 23:50   ` john Culleton

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