[NTG-context] Czech compound word handling
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. Thanks, D.A. -- Try to remove the color-problem by restarting your computer several times. -- Microsoft-Internet Explorer README.TXT ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Czech compound word handling
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 [EMAIL PROTECTED]@\discretionarytoken\endcsname\relax \checkafterdiscretionary \bgroup \checkbeforediscretionary \prewordbreak \discretionary{\hbox{#2}}{}{\hbox{#2}}% \allowbreak\postwordbreak \egroup \else [EMAIL PROTECTED]@\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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Czech compound word handling
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. This mechanism is already present in the ConTeXt: use |_| like bude|_|li. Unfortunately, AFAIK there are two drawbacks: 1) From some time the hyphen started to be defined \def\compoundhyphen{\hbox{-\kern-.25ex-}} but for Czech is better: \def\compoundhyphen{-} I intend to incorporated it to Czech support. (cont-cz.tex ?) 2) This kind of |.| does not operate inside with XML processing. Here is minimal example sent last week: - \defineXMLentity[hyphen]{|_|} \starttext dojde|_|li \startXMLdata dojdehyphen;li \stopXMLdata \stoptext -- Vit Zyka ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Czech compound word handling
David Antos wrote: On Wed, Feb 02, 2005 at 03:46:00PM +0100, Hans Hagen wrote: \en \dorecurse{100}{test||}test \endgraf \cz \dorecurse{100}{test||}test \endgraf Wow, that's exactly what we need. I suggest to make this also default setting for Czech. ok, i'll built it in; after that you can test it as well as the latin roman for czech [replaces csr] -) 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Czech compound word handling
On Wed, Feb 02, 2005 at 04:19:51PM +0100, Vit Zyka wrote: This mechanism is already present in the ConTeXt: use |_| like bude|_|li. Unfortunately, AFAIK there are two drawbacks: Hello, this ispired an idea: would it be possible to make the characters configurable? I.e. to have in fact || configurable for pre-break, post-break, and no-break character? I think it might be generic enough for most languages. Say, we would have \setuphyphenmark[.. = ..] sign ... (for backwards compatibility, would set up all the following) presign ... postsign ... nosign ... D.A. -- I am not a researcher, I am a key researcher! ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Czech compound word handling
Hans Hagen wrote: David Antos wrote: On Wed, Feb 02, 2005 at 03:46:00PM +0100, Hans Hagen wrote: \en \dorecurse{100}{test||}test \endgraf \cz \dorecurse{100}{test||}test \endgraf Wow, that's exactly what we need. I suggest to make this also default setting for Czech. ok, i'll built it in; after that you can test it as well as the latin roman for czech [replaces csr] -) It caused a recurse error in my cont-cz format (standard only english interface), see attch. Vit Zyka This is pdfeTeXk, Version 3.141592-1.20a-2.2 (Web2c 7.5.3) (format=cont-cz 2005.1.27) 2 FEB 2005 17:12 entering extended mode \write18 enabled. %-line parsing enabled. (c:/TeXLive/texmf/web2c/natural.tcx) **cont-cz V:/tex/zk/context/hyphen/hyphen-hh.tex (v:/tex/zk/context/hyphen/hyphen-hh.tex ConTeXt ver: 2005.01.13 fmt: 2005.1.27 int: english mes: english language : language cz is active protectionstate 0 system : cont-new loaded (c:/TeXLive/texmf-local/tex/context/base/cont-new.tex systems: beware: some patches loaded from cont-new.tex! system (E-TEX) : [line 27] color : palette rollover is available system (E-TEX) : [line 842] system (E-TEX) : [line 897] ) system : cont-old loaded (c:/TeXLive/texmf-local/tex/context/base/cont-old.tex loading: Context Old Macros ) system : cont-fil loaded (c:/TeXLive/texmf-local/tex/context/base/cont-fil.tex loading: Context File Synonyms ) system : cont-sys.rme loaded (c:/TeXLive/texmf-local/tex/context/user/cont-sys.rme fonts : [berry] [ec] [] (c:/TeXLive/texmf-local/tex/context/base/type-syn.tex) (c:/TeXLive/texmf-local/tex/context/base/type-enc.tex) (c:/TeXLive/texmf-local/tex/context/base/type-siz.tex) (c:/TeXLive/texmf-local/tex/context/base/type-map.tex) (c:/TeXLive/texmf-local/tex/context/base/type-spe.tex) (c:/TeXLive/texmf-local/tex/context/base/type-exa.tex) (c:/TeXLive/texmf-local/tex/context/base/type-akb.tex)) bodyfont : 12pt rm is loaded language : patterns en-default:default-1-2:2 de-texnansi:texnansi-2- 2:2 de-ec:ec-3-2:2 sk-il2:il2-4-2:2 sk-ec:ec-5-2:2 cz-il2:il2-6-2: 2 cz-ec:ec-7-2:2 loaded specials : tex,postscript,rokicki loaded \openout2 = `hyphen-hh.tui'. system : hyphen-hh.top loaded (./hyphen-hh.top specials : loading definition file tpd (c:/TeXLive/texmf-local/tex/context/base/spec-tpd.tex specials : loading definition file fdf (c:/TeXLive/texmf-local/tex/context/base/spec-fdf.tex unprotect 3 unprotect 4 system (E-TEX) : [line 2247] \ifcsname protect 4 protect 3) specials : fdf loaded unprotect 3 protect 3) specials : fdf,tpd loaded ) \openout0 = `hyphen-hh-mpgraph.mp'. \openout0 = `mpgraph.mp'. ! TeX capacity exceeded, sorry [input stack size=5000]. \@@[EMAIL PROTECTED]@-cz@@la -\@@[EMAIL PROTECTED]@-cz@@la \setvalue {\strippedcsname \textmodedi... \@@[EMAIL PROTECTED]@-cz@@la -\@@[EMAIL PROTECTED]@-cz@@la \setvalue {\strippedcsname \textmodedi... \@@[EMAIL PROTECTED]@-cz@@la -\@@[EMAIL PROTECTED]@-cz@@la \setvalue {\strippedcsname \textmodedi... \@@[EMAIL PROTECTED]@-cz@@la -\@@[EMAIL PROTECTED]@-cz@@la \setvalue {\strippedcsname \textmodedi... \@@[EMAIL PROTECTED]@-cz@@la -\@@[EMAIL PROTECTED]@-cz@@la \setvalue {\strippedcsname \textmodedi... \@@[EMAIL PROTECTED]@-cz@@la -\@@[EMAIL PROTECTED]@-cz@@la \setvalue {\strippedcsname \textmodedi... ... l.37 \stoplanguagespecifics If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of TeX's memory you used: 982 strings out of 64543 16134 string characters out of 691697 4458608 words of memory out of 5526672 34278 multiletter control sequences out of 1+5 16801 words of font info for 37 fonts, out of 100 for 2000 24 hyphenation exceptions out of 1000 5000i,2n,28p,257b,75s stack positions out of 5000i,500n,6000p,20b,4s 0 PDF objects out of 30 0 named destinations out of 131072 1 words of extra memory for PDF output out of 65536 No pages of output. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context