Strange interaction of \chapter and \AutoDroppedCaps
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
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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Slawek Zak