ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Tom" <Tom@tuxedo-press.com>
To: "'mailing list for ConTeXt users'" <ntg-context@ntg.nl>
Subject: Re: First page of chapter
Date: Tue, 2 Feb 2010 21:51:34 -0500	[thread overview]
Message-ID: <001201caa47b$ccbe0ba0$663a22e0$@com> (raw)
In-Reply-To: <140B9618-4A13-467C-8C6B-98FDE154BD32@rz-online.de>

That works. Now I have to figure out how to insert the picture in the place
marked GRAPHIC, get rid of all the boxes and get the page number to print on
the bottom of the first page of the chapter.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey



From: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl] On
Behalf Of Andreas Harder
Sent: Tuesday, February 02, 2010 5:04 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] First page of chapter

I am struggling with getting the first pages of my chapters laid out as
desired. What I want on the top third of the page is a roughly 2 inch square
graphic on the left with the chapter number and chapter title on the right
in large print. The following chunk errors out as shown but works when
hard-coded.  Am I headed off in the wrong direction by trying to use columns
in this way? Previously, I tried treating the chapter number and title as
text with startfiguretext. It works but I can't format the chapter titles to
fit properly. Any suggestions for a ConTeXt beginner?
 
 
\def\ChapterTop#1#2{
    \startcolumns[n=2]
        \placefigure[left]{none}{\externalfigure[chief]}
    \column
         \switchtobodyfont[26pt] {\ss\bf\sl #1}
         \blank[large]\blank[large] 
          {\ss\bf #2}
     \stopcolumns}
 
\setuphead[chapter]
 [command=\ChapterTop, header=high,footer=pagenumber,page=center] 
 
\input c:. %chapter used to test the code

Hi!

I think you search for something like this:

\def\ChapterTop#1#2% bottom-aligned
  {\framed[width=broad,offset=overlay]
    {\framed[width=2in,height=2in]{GRAPHIC}\hfill
     \framed[align=right]{#1\blank[2*big]#2}}}

\definetext[ChapterFoot][footer][pagenumber]

\setuphead
  [chapter]
  [command=\ChapterTop,
   header=high,
   footer=ChapterFoot,
   numberstyle=\ssbid,
   textstyle=\ssbfd]

\starttext  \showframe
\dorecurse{3}{\chapter{First Chapter}\dorecurse{5}{\input tufte}}
\stoptext

Greetings
	Andreas


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


  reply	other threads:[~2010-02-03  2:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 22:03 Andreas Harder
2010-02-03  2:51 ` Tom [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-02-02 17:01 Tom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001201caa47b$ccbe0ba0$663a22e0$@com' \
    --to=tom@tuxedo-press.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).