ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: logo
       [not found] ` <829D71AA-F41C-11D5-B842-0003935489B8@philosophy.usyd.edu.a u>
@ 2001-12-19  8:14   ` Hans Hagen
  0 siblings, 0 replies; only message in thread
From: Hans Hagen @ 2001-12-19  8:14 UTC (permalink / raw)
  Cc: ntg-context

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-19  8:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5.1.0.14.1.20011218183356.03f66f60@server-1>
     [not found] ` <829D71AA-F41C-11D5-B842-0003935489B8@philosophy.usyd.edu.a u>
2001-12-19  8:14   ` logo Hans Hagen

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