From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/18078 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Czech compound word handling Date: Wed, 02 Feb 2005 15:46:00 +0100 Message-ID: <4200E7A8.8080607@wxs.nl> References: <20050202131641.GA2940@erik.fi.muni.cz> 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 1107355548 24214 80.91.229.2 (2 Feb 2005 14:45:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 2 Feb 2005 14:45:48 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 02 15:45:48 2005 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 1CwLl2-0002jh-Nn for gctc-ntg-context-518@m.gmane.org; Wed, 02 Feb 2005 15:45:28 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3A8B0127D8; Wed, 2 Feb 2005 15:45:56 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24348-03; Wed, 2 Feb 2005 15:45:54 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C0ADF127C3; Wed, 2 Feb 2005 15:45:54 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EABA3127C3 for ; Wed, 2 Feb 2005 15:45:53 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24365-01-2 for ; Wed, 2 Feb 2005 15:45:53 +0100 (CET) Original-Received: from mailrelay02.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 28065127B6 for ; Wed, 2 Feb 2005 15:45:53 +0100 (CET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j12Ejol5029941 for ; Wed, 2 Feb 2005 15:45:50 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 64C5217BD5; Wed, 2 Feb 2005 15:37:10 +0100 (CET) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 0FC019DF3 for ; Wed, 2 Feb 2005 14:37:09 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <20050202131641.GA2940@erik.fi.muni.cz> X-Virus-Scanned: ClamAV 0.80/540/Tue Oct 19 14:59:23 2004 clamav-milter version 0.80j on mailrelay02 X-Virus-Status: Clean X-Virus-Scanned: by 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: by amavisd-new at ntg.nl X-MailScanner-From: ntg-context-bounces@ntg.nl X-MailScanner-To: gctc-ntg-context-518@m.gmane.org Xref: main.gmane.org gmane.comp.tex.context:18078 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:18078 David Antos wrote: > Hello, > > would it be possible to define || for compound words to act as > \discretionary{-}{-}{-}? In Czech, the hyphen for compound words should > be repeated in the following line. you mean something like this: \unprotect \def\activedododotextmodediscretionary#1#2% {\convertargument#2\to\discretionarytoken \def\textmodediscretionary% {\getvalue{\strippedcsname\textmodediscretionary\string#1}}% \ifx\discretionarytoken\empty \ifx#1\nextnext % takes care of ||| and +++ and ...... \prewordbreak\discretionary{\hbox{$#1$}}{}{\hbox{$#1$}}% \allowbreak\postwordbreak \def\nextnextnext{\afterassignment\egroup\let\next=}% \else \checkafterdiscretionary \bgroup \checkbeforediscretionary \textmodediscretionary\nextnext \egroup \fi \else\expandafter\ifx\csname\@tmd@\discretionarytoken\endcsname\relax \checkafterdiscretionary \bgroup \checkbeforediscretionary \prewordbreak \discretionary{\hbox{#2}}{}{\hbox{#2}}% \allowbreak\postwordbreak \egroup \else \csname\@tmd@\discretionarytoken\endcsname \fi\fi \nextnextnext} % can be \egroup so \aftergroup\ignorespaces \startlanguagespecifics[cz] \setvalue{\strippedcsname\textmodediscretionary\string|}% {\discretionary{-}{-}{-}}% \stoplanguagespecifics \setvalue{\strippedcsname\textmodediscretionary\string|}% {\prewordbreak\hbox{\compoundhyphen}\allowbreak\postwordbreak} \protect \starttext \en \dorecurse{100}{test||}test \endgraf \cz \dorecurse{100}{test||}test \endgraf \stoptext so, in principle it is possible but i need to make it a bit nicer; maybe tonight -) 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 -----------------------------------------------------------------