ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \word of synonyms
@ 2008-07-24 18:57 Matthias Wächter
  2008-07-24 19:49 ` Peter Münster
  0 siblings, 1 reply; 12+ messages in thread
From: Matthias Wächter @ 2008-07-24 18:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi list!

What am I doing wrong? \Word, \Words and \WORDS cannot be applied to synonyms, they are displayed unmodified which is a pity as these words should be capitalized at the beginning of a sentence. Is there a solution?

\starttext
\definesynonyms[term][terms]
\setupsynonyms[term][headstyle=bold,width=4cm,criterium=all]

\term[FTce]{fault tolerance}{The ability of a system to mitigate a
  fault avoiding desastrous behavior}

\placelistofterms

Original: \FTce\

First letter: \Word{\FTce}

All first letters: \Words{\FTce}

All letters: \WORDS{\FTce}

First letter: \Word{fault tolerance}

All first letters: \Words{fault tolerance}

All letters: \WORDS{fault tolerance}

\stoptext

Thanks,
- Matthias
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \word of synonyms
  2008-07-24 18:57 \word of synonyms Matthias Wächter
@ 2008-07-24 19:49 ` Peter Münster
  2008-07-25  9:30   ` Matthias Wächter
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Münster @ 2008-07-24 19:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Jul 24 2008, Matthias Wächter wrote:
> 
> What am I doing wrong? \Word, \Words and \WORDS cannot be applied to
> synonyms, they are displayed unmodified which is a pity as these words
> should be capitalized at the beginning of a sentence. Is there a
> solution?

Try "texexec --luatex file" (luatex has to be installed).

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \word of synonyms
  2008-07-24 19:49 ` Peter Münster
@ 2008-07-25  9:30   ` Matthias Wächter
  2008-07-29 20:53     ` \Word broken Matthias Wächter
  0 siblings, 1 reply; 12+ messages in thread
From: Matthias Wächter @ 2008-07-25  9:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 7/24/2008 9:49 PM, Peter Münster wrote:
> On Thu, Jul 24 2008, Matthias Wächter wrote:
>> What am I doing wrong? \Word, \Words and \WORDS cannot be applied to
>> synonyms, they are displayed unmodified which is a pity as these words
>> should be capitalized at the beginning of a sentence. Is there a
>> solution?
> 
> Try "texexec --luatex file" (luatex has to be installed).

Wow, it's always impressive to see what difference luatex makes … :-)

Only problem: \Word does the same as \Words (checked on live.contextgarden). Any hints?


Cheers,
- Matthias
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* \Word broken
  2008-07-25  9:30   ` Matthias Wächter
@ 2008-07-29 20:53     ` Matthias Wächter
  2008-07-29 21:22       ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Matthias Wächter @ 2008-07-29 20:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 7/25/2008 11:30 AM, Matthias Wächter wrote:
> On 7/24/2008 9:49 PM, Peter Münster wrote:
>> On Thu, Jul 24 2008, Matthias Wächter wrote:
>>> What am I doing wrong? \Word, \Words and \WORDS cannot be applied to
>>> synonyms, they are displayed unmodified which is a pity as these words
>>> should be capitalized at the beginning of a sentence. Is there a
>>> solution?
>> Try "texexec --luatex file" (luatex has to be installed).
> 
> Wow, it's always impressive to see what difference luatex makes … :-)
> 
> Only problem: \Word does the same as \Words (checked on live.contextgarden). Any hints?

This is the respective code from core-spa.mkiv, and it is obviously broken as it defines \Words to be the same as \Word (and it defines \Word wrongly in the first place).

[…]
\def\WORD{\groupedcommand{\setcharactercasing[\plusone  ]}{}}
\def\word{\groupedcommand{\setcharactercasing[\plustwo  ]}{}}
\def\Word{\groupedcommand{\setcharactercasing[\plusthree]}{}} % \plusfour

\let\WORDS\WORD
\let\words\word
\let\Words\Word
[…]

I just played a little bit with the lua code but get lost miserably considering all those nodes, linked lists etc.

It seems to be the hard part to skip the remaining words properly, so its implementation was postponed. Is this correct?

Hans, do you feel something about the issue?

Thanks,
- Matthias

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \Word broken
  2008-07-29 20:53     ` \Word broken Matthias Wächter
@ 2008-07-29 21:22       ` Hans Hagen
  2008-07-30  8:23         ` Matthias Wächter
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2008-07-29 21:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Matthias Wächter wrote:

> Hans, do you feel something about the issue?

only if i get a test file and a description of expected behaviour

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \Word broken
  2008-07-29 21:22       ` Hans Hagen
@ 2008-07-30  8:23         ` Matthias Wächter
  2008-08-05 10:56           ` Matthias Wächter
  0 siblings, 1 reply; 12+ messages in thread
From: Matthias Wächter @ 2008-07-30  8:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 7/29/2008 11:22 PM, Hans Hagen wrote:
> Matthias Wächter wrote:
> 
>> Hans, do you feel something about the issue?
> 
> only if i get a test file and a description of expected behaviour

Sure, here it is. removing the comment on the \word version works only in MKIV, i.e. LuaTeX, but that’s not the issue anyway.

\starttext

assert \WORDS{oNe two} = ONE TWO (works in MKII + MKIV)

%% \word is not defined in MKII, just in MKIV
% assert \word{oNe two} = one two (works in MKIV)

assert \Words{oNe two} = ONe Two (works in MKII + MKIV)

assert \Word{oNe two} = ONe two (works in MKII, does not work in MKIV)

\stoptext


Thanks for taking care, Hans,
- Matthias
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \Word broken
  2008-07-30  8:23         ` Matthias Wächter
@ 2008-08-05 10:56           ` Matthias Wächter
  2008-08-05 16:37             ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Matthias Wächter @ 2008-08-05 10:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hans,

Do you know how this can be fixed? Is the descripion descriptive enough?

Thanks,
- Matthias

On 7/30/2008 10:23 AM, Matthias Wächter wrote:
> On 7/29/2008 11:22 PM, Hans Hagen wrote:
>> Matthias Wächter wrote:
>>
>>> Hans, do you feel something about the issue?
>> only if i get a test file and a description of expected behaviour
> 
> Sure, here it is. removing the comment on the \word version works only in MKIV, i.e. LuaTeX, but that’s not the issue anyway.
> 
> \starttext
> 
> assert \WORDS{oNe two} = ONE TWO (works in MKII + MKIV)
> 
> %% \word is not defined in MKII, just in MKIV
> % assert \word{oNe two} = one two (works in MKIV)
> 
> assert \Words{oNe two} = ONe Two (works in MKII + MKIV)
> 
> assert \Word{oNe two} = ONe two (works in MKII, does not work in MKIV)
> 
> \stoptext
> 
> 
> Thanks for taking care, Hans,
> - Matthias
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \Word broken
  2008-08-05 10:56           ` Matthias Wächter
@ 2008-08-05 16:37             ` Hans Hagen
  2008-08-05 16:44               ` Matthias Wächter
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2008-08-05 16:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Matthias Wächter wrote:

> Do you know how this can be fixed? Is the descripion descriptive enough?

will be fixed in the next release (tomorrow we plan to do a formal release)

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \Word broken
  2008-08-05 16:37             ` Hans Hagen
@ 2008-08-05 16:44               ` Matthias Wächter
  2008-08-05 16:48                 ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Matthias Wächter @ 2008-08-05 16:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 8/5/2008 6:37 PM, Hans Hagen wrote:
> Matthias Wächter wrote:
> 
>> Do you know how this can be fixed? Is the descripion descriptive enough?
> 
> will be fixed in the next release (tomorrow we plan to do a formal release)

Thanks! I am looking forward to the change as I am curious what’s the proper way of doing it.

Keep up the good work,
- Matthias
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \Word broken
  2008-08-05 16:44               ` Matthias Wächter
@ 2008-08-05 16:48                 ` Hans Hagen
  2008-08-05 17:14                   ` Matthias Wächter
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2008-08-05 16:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Matthias Wächter wrote:
> On 8/5/2008 6:37 PM, Hans Hagen wrote:
>> Matthias Wächter wrote:
>>
>>> Do you know how this can be fixed? Is the descripion descriptive enough?
>> will be fixed in the next release (tomorrow we plan to do a formal release)
> 
> Thanks! I am looking forward to the change as I am curious what’s the proper way of doing it.

you mean in lua code?

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \Word broken
  2008-08-05 16:48                 ` Hans Hagen
@ 2008-08-05 17:14                   ` Matthias Wächter
  2008-08-05 20:48                     ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Matthias Wächter @ 2008-08-05 17:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 8/5/2008 6:48 PM, Hans Hagen wrote:
> Matthias Wächter wrote:
>> On 8/5/2008 6:37 PM, Hans Hagen wrote:
>>> Matthias Wächter wrote:
>>>
>>>> Do you know how this can be fixed? Is the descripion descriptive enough?
>>> will be fixed in the next release (tomorrow we plan to do a formal release)
>> Thanks! I am looking forward to the change as I am curious what’s the proper way of doing it.
> 
> you mean in lua code?

Yeah. While I survived a journey into changing some ConTeXt (MKII) functionality recently and found everything clear (texbook is your friend), I am really puzzled about attribute handling in Lua. But it’s just a couple of lines I have investigated, maybe I’ll be a wizz as soon I roll things up from bottom to top … ;-)

- Matthias
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: \Word broken
  2008-08-05 17:14                   ` Matthias Wächter
@ 2008-08-05 20:48                     ` Hans Hagen
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2008-08-05 20:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Matthias Wächter wrote:
> On 8/5/2008 6:48 PM, Hans Hagen wrote:
>> Matthias Wächter wrote:
>>> On 8/5/2008 6:37 PM, Hans Hagen wrote:
>>>> Matthias Wächter wrote:
>>>>
>>>>> Do you know how this can be fixed? Is the descripion descriptive enough?
>>>> will be fixed in the next release (tomorrow we plan to do a formal release)
>>> Thanks! I am looking forward to the change as I am curious what’s the proper way of doing it.
>> you mean in lua code?
> 
> Yeah. While I survived a journey into changing some ConTeXt (MKII) functionality recently and found everything clear (texbook is your friend), I am really puzzled about attribute handling in Lua. But it’s just a couple of lines I have investigated, maybe I’ll be a wizz as soon I roll things up from bottom to top … ;-)

attributes are just a property of nodes, and characters in the input 
become nodes

in this case there is a specific attribute for casing with a value that 
tells to do Words

the tricky thing here is that when i process Word, i need to erase 
following casing attributes

at some time in the future, context mkiv will provide a mechanism for 
user attributes

(attribute processing can take place at several moments by intercepting 
the node list)

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-08-05 20:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-24 18:57 \word of synonyms Matthias Wächter
2008-07-24 19:49 ` Peter Münster
2008-07-25  9:30   ` Matthias Wächter
2008-07-29 20:53     ` \Word broken Matthias Wächter
2008-07-29 21:22       ` Hans Hagen
2008-07-30  8:23         ` Matthias Wächter
2008-08-05 10:56           ` Matthias Wächter
2008-08-05 16:37             ` Hans Hagen
2008-08-05 16:44               ` Matthias Wächter
2008-08-05 16:48                 ` Hans Hagen
2008-08-05 17:14                   ` Matthias Wächter
2008-08-05 20:48                     ` Hans Hagen

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).