* Czech compound word handling
@ 2005-02-02 13:16 David Antos
2005-02-02 14:46 ` Hans Hagen
2005-02-02 15:19 ` Vit Zyka
0 siblings, 2 replies; 7+ messages in thread
From: David Antos @ 2005-02-02 13:16 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Czech compound word handling
2005-02-02 13:16 Czech compound word handling David Antos
@ 2005-02-02 14:46 ` Hans Hagen
2005-02-02 14:59 ` David Antos
2005-02-02 15:19 ` Vit Zyka
1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2005-02-02 14:46 UTC (permalink / raw)
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
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Czech compound word handling
2005-02-02 14:46 ` Hans Hagen
@ 2005-02-02 14:59 ` David Antos
2005-02-02 15:21 ` Hans Hagen
0 siblings, 1 reply; 7+ messages in thread
From: David Antos @ 2005-02-02 14:59 UTC (permalink / raw)
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)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Czech compound word handling
2005-02-02 13:16 Czech compound word handling David Antos
2005-02-02 14:46 ` Hans Hagen
@ 2005-02-02 15:19 ` Vit Zyka
2005-02-02 16:26 ` David Antos
1 sibling, 1 reply; 7+ messages in thread
From: Vit Zyka @ 2005-02-02 15:19 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Czech compound word handling
2005-02-02 14:59 ` David Antos
@ 2005-02-02 15:21 ` Hans Hagen
2005-02-02 16:42 ` Vit Zyka
0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2005-02-02 15:21 UTC (permalink / raw)
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
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Czech compound word handling
2005-02-02 15:19 ` Vit Zyka
@ 2005-02-02 16:26 ` David Antos
0 siblings, 0 replies; 7+ messages in thread
From: David Antos @ 2005-02-02 16:26 UTC (permalink / raw)
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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Czech compound word handling
2005-02-02 15:21 ` Hans Hagen
@ 2005-02-02 16:42 ` Vit Zyka
0 siblings, 0 replies; 7+ messages in thread
From: Vit Zyka @ 2005-02-02 16:42 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
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
[-- Attachment #2: hyphen-hh.log --]
[-- Type: text/plain, Size: 3719 bytes --]
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].
\@@la@il2@-cz@@la ->\@@la@il2@-cz@@la
\setvalue {\strippedcsname \textmodedi...
\@@la@il2@-cz@@la ->\@@la@il2@-cz@@la
\setvalue {\strippedcsname \textmodedi...
\@@la@il2@-cz@@la ->\@@la@il2@-cz@@la
\setvalue {\strippedcsname \textmodedi...
\@@la@il2@-cz@@la ->\@@la@il2@-cz@@la
\setvalue {\strippedcsname \textmodedi...
\@@la@il2@-cz@@la ->\@@la@il2@-cz@@la
\setvalue {\strippedcsname \textmodedi...
\@@la@il2@-cz@@la ->\@@la@il2@-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 10000+50000
16801 words of font info for 37 fonts, out of 1000000 for 2000
24 hyphenation exceptions out of 1000
5000i,2n,28p,257b,75s stack positions out of 5000i,500n,6000p,200000b,40000s
0 PDF objects out of 300000
0 named destinations out of 131072
1 words of extra memory for PDF output out of 65536
No pages of output.
[-- Attachment #3: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-02-02 16:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-02 13:16 Czech compound word handling David Antos
2005-02-02 14:46 ` Hans Hagen
2005-02-02 14:59 ` David Antos
2005-02-02 15:21 ` Hans Hagen
2005-02-02 16:42 ` Vit Zyka
2005-02-02 15:19 ` Vit Zyka
2005-02-02 16:26 ` David Antos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).