ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [Q] First work cap
@ 2001-02-13 15:01 Han The Thanh
  2001-02-13 15:19 ` Berend de Boer
  0 siblings, 1 reply; 8+ messages in thread
From: Han The Thanh @ 2001-02-13 15:01 UTC (permalink / raw)


Hi all,

is it possible to make the first word of each chapter as smallcap without
saying explicitly \cap{someword}?

Thanks,
Thanh


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

* Re: [Q] First work cap
  2001-02-13 15:01 [Q] First work cap Han The Thanh
@ 2001-02-13 15:19 ` Berend de Boer
  2001-02-13 16:08   ` Han The Thanh
  0 siblings, 1 reply; 8+ messages in thread
From: Berend de Boer @ 2001-02-13 15:19 UTC (permalink / raw)
  Cc: ConTeXt List

> is it possible to make the first word of each chapter as smallcap without
> saying explicitly \cap{someword}?

Use \Caps.

Groetjes,

Berend. (-:


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

* Re: [Q] First work cap
  2001-02-13 15:19 ` Berend de Boer
@ 2001-02-13 16:08   ` Han The Thanh
  2001-02-13 17:55     ` Berend de Boer
  0 siblings, 1 reply; 8+ messages in thread
From: Han The Thanh @ 2001-02-13 16:08 UTC (permalink / raw)
  Cc: ConTeXt List

> > is it possible to make the first word of each chapter as smallcap without
> > saying explicitly \cap{someword}?
> 
> 
> Use \Caps.

if I have some huge document with a lot of 

\chapter{abc}
<text...>

already, how can I do it without inserting \Caps to every word after a
chapter?

Regards,
Thanh


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

* Re: [Q] First work cap
  2001-02-13 16:08   ` Han The Thanh
@ 2001-02-13 17:55     ` Berend de Boer
  2001-02-14  9:00       ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Berend de Boer @ 2001-02-13 17:55 UTC (permalink / raw)
  Cc: ConTeXt List

Han The Thanh wrote:

>>> is it possible to make the first word of each chapter as smallcap without
>>> saying explicitly \cap{someword}?
>> 
>> 
>> Use \Caps.
> 
> 
> if I have some huge document with a lot of 
> 
> \chapter{abc}
> <text...>
> 
> already, how can I do it without inserting \Caps to every word after a
> chapter?

Oops, didn't read your question carefully. Forget my answer. As for your 
question: I don't know. Pretty hard I think.

Groetjes,

Berend. (-:


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

* Re: [Q] First work cap
  2001-02-13 17:55     ` Berend de Boer
@ 2001-02-14  9:00       ` Hans Hagen
  2001-02-14 14:51         ` Giuseppe Bilotta
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2001-02-14  9:00 UTC (permalink / raw)
  Cc: Han The Thanh, ConTeXt List

At 06:55 PM 2/13/01 +0100, Berend de Boer wrote:
>Han The Thanh wrote:
>
>>>> is it possible to make the first word of each chapter as smallcap without
>>>> saying explicitly \cap{someword}?
>>> 
>>> 
>>> Use \Caps.
>> 
>> 
>> if I have some huge document with a lot of 
>> 
>> \chapter{abc}
>> <text...>
>> 
>> already, how can I do it without inserting \Caps to every word after a
>> chapter?
>
>
>Oops, didn't read your question carefully. Forget my answer. As for your 
>question: I don't know. Pretty hard I think.

Well, pretty easy actually -) 

% output=pdftex interface=en

\starttext

\unprotect

\def\doHandleFirstWord#1 {{\sc#1}\space}
\def\HandleFirstWord     {\EveryPar{\EveryPar{}\doHandleFirstWord}}

\setuphead[chapter][page=,after={\blank[2*big]\HandleFirstWord}]

\chapter{bla}

Some text some text some text some text

Some text some text some text some text

\chapter{bla}

Some text some text some text some text

Some text some text some text some text

\chapter{bla}

Some text some text some text some text

Some text some text some text some text

\stoptext

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

* Re: [Q] First work cap
  2001-02-14  9:00       ` Hans Hagen
@ 2001-02-14 14:51         ` Giuseppe Bilotta
  2001-02-15  8:51           ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Giuseppe Bilotta @ 2001-02-14 14:51 UTC (permalink / raw)


Han The Thanh wrote:
> >>>> is it possible to make the first word of each chapter as smallcap without
> >>>> saying explicitly \cap{someword}?
> >>> 

Hans wrote:
> 
> Well, pretty easy actually -) 
> 
> % output=pdftex interface=en
> 
> \starttext
> 
> \unprotect
> 
> \def\doHandleFirstWord#1 {{\sc#1}\space}
> \def\HandleFirstWord     {\EveryPar{\EveryPar{}\doHandleFirstWord}}
> 
> \setuphead[chapter][page=,after={\blank[2*big]\HandleFirstWord}]
> 

What about a hook in the kernel?

\setuphead[headname][firstword=\command]

Giuseppe Bilotta

Using Microsoft products is like 
having sex without condoms---but
much less pleasurable


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

* Re: [Q] First work cap
  2001-02-14 14:51         ` Giuseppe Bilotta
@ 2001-02-15  8:51           ` Hans Hagen
  2001-02-16 10:49             ` Giuseppe Bilotta
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2001-02-15  8:51 UTC (permalink / raw)
  Cc: ConTeXt

At 03:51 PM 2/14/01 +0100, Giuseppe Bilotta wrote:
>Han The Thanh wrote:
>> >>>> is it possible to make the first word of each chapter as smallcap
without
>> >>>> saying explicitly \cap{someword}?
>> >>> 
>
>Hans wrote:
>> 
>> Well, pretty easy actually -) 
>> 
>> % output=pdftex interface=en
>> 
>> \starttext
>> 
>> \unprotect
>> 
>> \def\doHandleFirstWord#1 {{\sc#1}\space}
>> \def\HandleFirstWord     {\EveryPar{\EveryPar{}\doHandleFirstWord}}
>> 
>> \setuphead[chapter][page=,after={\blank[2*big]\HandleFirstWord}]
>> 
>
>What about a hook in the kernel?
>
>\setuphead[headname][firstword=\command]

I do have some hooks here, for instance for dropped caps (kind of tricky,
consider a initial char spanning three lines where the first paragraph is
one line) and some day this kind of things will move into the core. There
is a supp-fun.tex file that implements some of it.  

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

* Re: [Q] First work cap
  2001-02-15  8:51           ` Hans Hagen
@ 2001-02-16 10:49             ` Giuseppe Bilotta
  0 siblings, 0 replies; 8+ messages in thread
From: Giuseppe Bilotta @ 2001-02-16 10:49 UTC (permalink / raw)
  Cc: ConTeXt

> >What about a hook in the kernel?
> >
> >\setuphead[headname][firstword=\command]
>  
> I do have some hooks here, for instance for dropped caps (kind of tricky,
> consider a initial char spanning three lines where the first paragraph is
> one line) and some day this kind of things will move into the core. There
> is a supp-fun.tex file that implements some of it.  
> 

Aha! So it's not just me unable to work it out correctly! It *is*
hard to implement ...

I tried

\def\DoCap{\NiceDroppedCaps{}{cmr12}{0pt}{2}}
\def\CapFirst{\EveryPar{\EveryPar{}\DoCap}}

\setuphead[subject][after=\CapFirst]

and the results are far from perfect, even when initial paragraphs
are long enough ... The Cap gets in the margin, and the subsequent
lines are too much indented ... can it depend on the fact that
first paragraphs are not indented in my setup?

Giuseppe Bilotta

Using Microsoft products is like 
having sex without condoms---but
much less pleasurable


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

end of thread, other threads:[~2001-02-16 10:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-13 15:01 [Q] First work cap Han The Thanh
2001-02-13 15:19 ` Berend de Boer
2001-02-13 16:08   ` Han The Thanh
2001-02-13 17:55     ` Berend de Boer
2001-02-14  9:00       ` Hans Hagen
2001-02-14 14:51         ` Giuseppe Bilotta
2001-02-15  8:51           ` Hans Hagen
2001-02-16 10:49             ` Giuseppe Bilotta

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