* Strange interaction of \chapter and \AutoDroppedCaps
@ 2005-02-18 12:52 Slawek Zak
2005-02-19 15:06 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Slawek Zak @ 2005-02-18 12:52 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
Hi,
In this document:
\setupindenting[medium]
\setupwhitespace[medium]
\setupbodyfont[16pt]
\starttext
\chapter{This is a test}
\AutoDroppedCaps \input tufte
\input tufte
\stoptext
I get output attached in gif file. It works fine without \chapter before. Any
thoughts?
Regards, /S
[-- Attachment #2: autodropped.gif --]
[-- Type: image/gif, Size: 5825 bytes --]
[-- Attachment #3: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange interaction of \chapter and \AutoDroppedCaps
2005-02-18 12:52 Strange interaction of \chapter and \AutoDroppedCaps Slawek Zak
@ 2005-02-19 15:06 ` Hans Hagen
2005-02-21 13:15 ` Slawek Zak
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2005-02-19 15:06 UTC (permalink / raw)
Slawek Zak wrote:
> Hi,
>
> In this document:
>
> \setupindenting[medium]
> \setupwhitespace[medium]
> \setupbodyfont[16pt]
>
> \starttext
> \chapter{This is a test}
>
> \AutoDroppedCaps \input tufte
>
> \input tufte
> \stoptext
>
> I get output attached in gif file. It works fine without \chapter before. Any
> thoughts?
can you try
\unprotect
\ifx\keeplinestogether\undefined
\let\keeplinestogether\gobbleoneargument
\fi
\def\DroppedCaps#1#2#3#4#5#6#7% does not yet handle accented chars
{\convertargument #7\to\asciia
\convertcommand \DroppedString\to\asciib
\ExpandBothAfter\doifinstringelse\asciia\asciib
{\dontleavehmode
\ifhmode\hskip-\parindent\fi
\keeplinestogether{#6}%
\setbox0\hbox{\definedfont[#2 at #3]#1{#7}\hskip#4}%
\ifdim\dp0>\strutdp % one of those Q's , will be option
\setbox2\hbox{\raise\dp0\hbox{\lower\strutdp\copy0}}%
\ht2\ht0
\dp0\strutdp
\setbox0\box2
\fi
\setbox0\hbox
{\ifnum\DropMode=\plusone
\hskip-\wd0\wd0\zeropoint
\fi
\lower#5\box0}%
\ht0\strutht
\dp0\strutdp
\ifnum\DropMode=\plusone
\globaldropcaps\let\DroppedIndent\!!zeropoint
\globaldropcaps\edef\DroppedLines{\number\maxdimen}%
\globaldropcaps\chardef\DroppedStatus\plusthree
\else
\globaldropcaps\edef\DroppedIndent{\the\wd0}%
\globaldropcaps\edef\DroppedLines {\number#6}%
\globaldropcaps\chardef\DroppedStatus\plustwo
\globaldropcaps\hangindent\DroppedIndent
\globaldropcaps\hangafter-\DroppedLines
\noindent
\hskip-\DroppedIndent
\fi
\vbox{\forgetall\box0}%
\nobreak
\let\next\ignorespaces} % Could be a one character word !
{\globaldropcaps\let\DroppedIndent\!!zeropoint
\globaldropcaps\edef\DroppedLines{\number\maxdimen}%
\globaldropcaps\chardef\DroppedStatus\plusthree
\def\next{#7}}%
\let\globaldropcaps\global
\next}
\protect
btw, high level interface:
\setupindenting[medium] \setupwhitespace[medium]
\setupinitial[state=start,n=3]
\definefontsynonym[Initial][SerifBold]
\placeinitial \dorecurse{3}{\input tufte \endgraf}
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange interaction of \chapter and \AutoDroppedCaps
2005-02-19 15:06 ` Hans Hagen
@ 2005-02-21 13:15 ` Slawek Zak
2005-02-21 15:01 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Slawek Zak @ 2005-02-21 13:15 UTC (permalink / raw)
On Sat, Feb 19, 2005 at 04:06:56PM +0100, Hans Hagen wrote:
> Slawek Zak wrote:
> >Hi,
> >
> >In this document:
> >
> >\setupindenting[medium]
> >\setupwhitespace[medium]
> >\setupbodyfont[16pt]
> >
> >\starttext
> >\chapter{This is a test}
> >
> >\AutoDroppedCaps \input tufte
> >
> >\input tufte
> >\stoptext
> >
> >I get output attached in gif file. It works fine without \chapter before.
> >Any
> >thoughts?
>
> can you try
>
> \unprotect
>
> \ifx\keeplinestogether\undefined
> \let\keeplinestogether\gobbleoneargument
> \fi
[...]
> btw, high level interface:
>
> \setupindenting[medium] \setupwhitespace[medium]
>
> \setupinitial[state=start,n=3]
> \definefontsynonym[Initial][SerifBold]
>
> \placeinitial \dorecurse{3}{\input tufte \endgraf}
Tried that. Same problem. Should I patch the original ConTeXt file? I just put
your code in the document. Sorry for a lame question.
/S
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange interaction of \chapter and \AutoDroppedCaps
2005-02-21 13:15 ` Slawek Zak
@ 2005-02-21 15:01 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2005-02-21 15:01 UTC (permalink / raw)
Slawek Zak wrote:
>
> Tried that. Same problem. Should I patch the original ConTeXt file? I just put
> your code in the document. Sorry for a lame question.
patch supp-fun.tex and regenerate the format
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-21 15:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18 12:52 Strange interaction of \chapter and \AutoDroppedCaps Slawek Zak
2005-02-19 15:06 ` Hans Hagen
2005-02-21 13:15 ` Slawek Zak
2005-02-21 15:01 ` 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).