From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25138 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: stretched title text Date: Fri, 13 Jan 2006 10:57:05 +0100 Message-ID: <43C77971.7070907@elvenkind.com> References: <32804.213.233.219.56.1137143242.squirrel@webmail.solcon.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1137146249 21233 80.91.229.2 (13 Jan 2006 09:57:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2006 09:57:29 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 13 10:57:19 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1ExLgJ-0006so-7X for gctc-ntg-context-518@m.gmane.org; Fri, 13 Jan 2006 10:57:15 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 26F42127D9; Fri, 13 Jan 2006 10:57:14 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01348-03; Fri, 13 Jan 2006 10:57:11 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 61EEF127B5; Fri, 13 Jan 2006 10:57:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 23683127B5 for ; Fri, 13 Jan 2006 10:57:10 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01324-04 for ; Fri, 13 Jan 2006 10:57:09 +0100 (CET) Original-Received: from glenfiddich.elvenkind.com (elvenknd.xs4all.nl [213.84.171.68]) by ronja.ntg.nl (Postfix) with SMTP id 05A26127A8 for ; Fri, 13 Jan 2006 10:57:06 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 8CA3B1B416; Fri, 13 Jan 2006 10:57:06 +0100 (CET) Original-Received: from glenfiddich.elvenkind.com ([127.0.0.1]) by localhost (glenfiddich.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08535-07; Fri, 13 Jan 2006 10:57:06 +0100 (CET) Original-Received: from [10.10.0.6] (glenlivet.elvenkind.com [10.10.0.6]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 3EE4918233; Fri, 13 Jan 2006 10:57:06 +0100 (CET) User-Agent: Mozilla Thunderbird 1.0.6-7.1.20060mdk (X11/20050322) X-Accept-Language: en-us, en Original-To: m.guravage@pragma-cts.com, mailing list for ConTeXt users In-Reply-To: <32804.213.233.219.56.1137143242.squirrel@webmail.solcon.nl> X-Virus-Scanned: by amavisd-new at elvenkind.net X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:25138 Archived-At: M.guravage wrote: > Hi, > > Something has changed in the past couple months that causes my stretched > title code to fail with the message: > > ! You can't use `\end' in internal vertical mode. > \normalend > > I've attatched a small example. Has anyone a suggestion how I can adapt my > code accordingly? This is due to a change in core-sec.tex, for 2005.11.24. (the addition of \ifcase\headtimingmode to \doplaceheadtext). Below is a patched version (see lines marked with %TH), but I am not completely sure if that doesn't break that \headtimingmode accidentally. Cheers, Taco \unprotect \def\doplaceheadtext#1#2#3#4% {\beginheadplacement{#1}% \ifemptyhead % = needed \setbox0=\ifvertical\vbox\else\hbox\fi to \zeropoint {\headnumbercontentfalse \resetsystemmode\v!sectionnumber #2}% \makestrutofbox0 \else % = needed \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox {\headnumbercontentfalse \resetsystemmode\v!sectionnumber % less interfering \ifcase\headtimingmode\or#2\fi % outerside font determines distance \dosetfontattribute{\??ko#1}\c!style % but we don't want color to influence user commands % todo: get the if-else out of it \getvalue{\??ko#1\c!command} {} % no number {\dostartattributes{\??ko#1}\c!style\c!color\empty \dostartattributes{\??ko#1}\c!textstyle\c!textcolor\empty \dontconvertfont \ifdisplaysectionhead \setupinterlinespace \else \setupspacing \fi % \ifcase\headtimingmode#2\fi % can introduce cr \getvalue{\??ko#1\c!commandbefore}% \placeheadmargintexts{#1}% binnen #3? \ifdisplaysectionhead %TH %TH \getvalue{\??ko#1\c!textcommand}% %TH {\setstrut\begstrut\ifcase\headtimingmode\hbox{#2}\fi#3\endstrut}% \ifcase\headtimingmode\hbox{#2}\fi %TH \getvalue{\??ko#1\c!textcommand}{\setstrut\begstrut#3\endstrut}%TH %TH \xdef\localheadheight {\the\strutht}% \xdef\localheaddepth {\the\strutdp}% \xdef\localheadlineheight{\the\lineheight}% % == \globallet\localheaddepth\strutdepth \else \ifcase\headtimingmode#2\fi \getvalue{\??ko#1\c!textcommand}{#3}% \fi \getvalue{\??ko#1\c!commandafter}% \ifdisplaysectionhead\endgraf\fi \dostopattributes \dostopattributes}}% \fi \endheadplacement{#1}{#4}} \protect