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
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 -----------------------------------------------------------------
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. Thank you, D.A. -- Jim Hacker: "Humphrey, do you see it as part of your job to help Ministers make fools of themselves?" Sir Humphrey: "Well, I never met one that needed any help." -- Yes, Minister (The Right to Know)
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 -----------------------------------------------------------------
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
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
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 dojde‐li \stopXMLdata \stoptext ------ Vit Zyka
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!
participants (3)
-
David Antos
-
Hans Hagen
-
Vit Zyka