ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: logo
Date: Wed, 19 Dec 2001 09:14:09 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20011219084401.032552b8@server-1> (raw)
In-Reply-To: <829D71AA-F41C-11D5-B842-0003935489B8@philosophy.usyd.edu.a u>

At 12:05 PM 12/19/2001 +1100, Adrian Heathcote wrote:
>Hans
>
>Ah, no. But thanks! It was the \CONTEXT that I couldn't quite work out 
>yesterday. But I got it in the end. I found the program has an even 
>steeper learning curve than Latex. However since then another problem has 
>come up, which I spent hours trying to solve with no luck at all. It is this.

you can peek in cont-log.tex to see what logos are available as core 
functionality; also,

\usemodule[abr-01]  %  or -02

will give you a large collection of predefined ones. The advantage of that 
is that you can also ask for the list of used logos (and abbr).

>I was trying to band my section and chapter headings with hairlines top 
>and bottom. But I couldn't do this and simultaneously implement paragraph 
>indenting because the indenting would always cause the top hairline to 
>indent. Below is the .tex document. I wonder if you could make a 
>suggestion. As you'll see I had to leave out the paragraph indentation 
>altogether and separate paragraphs with whitespace---not an optimal 
>solution. The command that I tried was \setupindenting[medium] in place of 
>the \setupwhitespace[medium]. Making local instructions seemed to have no 
>effect on the following paragraphs..

>Any suggestion would be very gratefully received.

>\setuphead
>[section]
>[textstyle=cap,
>before=\hairline\blank,
>after={\nowhitespace\hairline\blank[line]}]

cap will not work in headings (since the argumen tto cap is pretty 
complicated and will break), use \sc here (and when possible)

cap may become better in the future but tex itself has its limitations

\setuphead
   [section]
   [textstyle=\sc,
    before=\noindentation\hairline\blank,
    after={\nowhitespace\hairline\blank[line]}]

so, you should add \noindentation; but beware: your coding may end up in 
lone rules since a blank is a valid breakpoint (a herd \kern is probably 
better)

Now, it is often far better not to hook niceties into before and after 
since you want proper spacing. The next alternative is therefore better:

% let's demo framed texts:

\defineframed
   [ChapterText]
   [strut=no, % try yes with \showstruts
    width=broad,
    align=right,
    topframe=on,
    bottomframe=on,
    leftframe=off,
    rightframe=off,
    framecolor=darkred,
    rulethickness=1pt,
    offset=0pt]

% the dedicated section command

\def\MyTitle#1#2%
   {\ChapterText{\vskip1ex#1\quad#2\vskip1ex}}

\setuphead
   [section]
   [textstyle=\sc,
    color=red,
    before=\blank,
    after=\blank,
    command=\MyTitle]

\setuphead
   [chapter]
   [color=darkred]

As you can see here, i also set the color

>\setupheadertexts[{\sc The Transfiguration of Fra Angelico}][section]
>
>\setupwhitespace[medium]
>
>\starttext
>
>\startstandardmakeup
>\startcolor[darkred]
>\midaligned{\switchtobodyfont[22pt] The History behind {\sl The 
>Transfiguration of Fra Angelico}}
>\blank[2cm]
>\midaligned{by}
>\blank[3cm]
>\midaligned{\switchtobodyfont[14pt]  Adrian Heathcote}
>\stopcolor
>\stopstandardmakeup
>
>\completecontent
>
>\startcolor[darkred]
>\noindenting
>\title{Preface}
>\stopcolor

color directives put nodes in the tex mvl list and these interfere with 
spacing; use the color=darkred instead

>{\sl The Transfiguration of Fra Angelico} dramatises a period that is 
>relatively unknown: too early to be called the Renaissance proper,

\definestartstop[IntroText][style=\sl]

\IntroText{The ....} is more abstract and permits changing fonts more easily

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


           reply	other threads:[~2001-12-19  8:14 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <829D71AA-F41C-11D5-B842-0003935489B8@philosophy.usyd.edu.a u>]

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=5.1.0.14.1.20011219084401.032552b8@server-1 \
    --to=pragma@wxs.nl \
    --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).