This file: \setupinteraction [state=start, color=blue, style=bold] \definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, tf=style:light, it=style:lightoblique, bf=style:regular, bi=style:oblique, force=yes, rscale=1.0] \definefontfamily [archimate] [ss] [Helvetica] \setupbodyfont[archimate] \starttext \setuplanguage[en][patterns={ru}]\mainlanguage[ru] {\framed[frame=on,align=flushleft,width=7cm]{Техніка здатна до фізичної поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний комбінат'.}}\\ \setuplanguage[ua][patterns={ua}]\mainlanguage[ua] {\framed[frame=on,align=flushleft,width=7cm]{Техніка здатна до фізичної поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний комбінат'.}}\\ \stoptext Hyphenates russian but not ukrainian. Why? Gerben Wierda (LinkedIn https://www.linkedin.com/in/gerbenwierda, Mastodon https://newsie.social/@gctwnl) R&A IT Strategy https://ea.rna.nl/ (main site) Book: Chess and the Art of Enterprise Architecture https://ea.rna.nl/the-book/ Book: Mastering ArchiMate https://ea.rna.nl/the-book-edition-iii/
On 7/19/2023 12:36 AM, Gerben Wierda wrote:
This file:
\setupinteraction [state=start, color=blue, style=bold]
\definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, tf=style:light, it=style:lightoblique, bf=style:regular, bi=style:oblique, force=yes, rscale=1.0] \definefontfamily [archimate] [ss] [Helvetica] \setupbodyfont[archimate]
\starttext \setuplanguage[en][patterns={ru}]\mainlanguage[ru] {\framed[frame=on,align=flushleft,width=7cm]{Техніка здатна до фізичної поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний комбінат'.}}\\ \setuplanguage[ua][patterns={ua}]\mainlanguage[ua] {\framed[frame=on,align=flushleft,width=7cm]{Техніка здатна до фізичної поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний комбінат'.}}\\
\stoptext
Hyphenates russian but not ukrainian. Why? If there was some magick like that going on it should be the reverse right now. That said,
\setupbodyfont[dejavu] \startbuffer[sample] Техніка здатна до фізичної поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний комбінат'. \stopbuffer \starttext \mainlanguage[ru] {\hsize3cm \getbuffer[sample]} \mainlanguage[ua] {\hsize3cm \getbuffer[sample]} \stoptext hyphenates differently and eventually reports mkiv lua stats > loaded patterns: en::1 ru::22 ua::23 so best not mess with setting up languages that already have been set up. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 19 Jul 2023, at 08:52, Hans Hagen
wrote: so best not mess with setting up languages that already have been set up.
I had no idea I was messing. What am I doing wrong, then. Because in my actual document with ua language setting it is not hyphenated. This was just a minimal example
On 7/19/2023 8:58 AM, Gerben Wierda wrote:
On 19 Jul 2023, at 08:52, Hans Hagen
wrote: so best not mess with setting up languages that already have been set up.
I had no idea I was messing. What am I doing wrong, then. Because in my actual document with ua language setting it is not hyphenated. This was just a minimal example
do you get something similar?
mtxrun lang-uk.lua c:/data/develop/tex-context/tex/texmf-context/tex/context/patterns/mkiv/lang-uk.lua
uk is the offical tag but for historic reasone we use ua as language; given the uk's exit and ua's entry in the european union we could now consider adapting it; and i'd wonder is anyone would notice - or bother - is we'd use ukrain hyphenation for russian, which could save some bytes in the distribution Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 19 Jul 2023, at 09:17, Hans Hagen via ntg-context
wrote: On 7/19/2023 8:58 AM, Gerben Wierda wrote:
On 19 Jul 2023, at 08:52, Hans Hagen
wrote: so best not mess with setting up languages that already have been set up. I had no idea I was messing. What am I doing wrong, then. Because in my actual document with ua language setting it is not hyphenated. This was just a minimal example
do you get something similar?
mtxrun lang-uk.lua c:/data/develop/tex-context/tex/texmf-context/tex/context/patterns/mkiv/lang-uk.lua
uk is the offical tag but for historic reasone we use ua as language; given the uk's exit and ua's entry in the european union we could now consider adapting it; and i'd wonder is anyone would notice - or bother - is we'd use ukrain hyphenation for russian, which could save some bytes in the distribution
Yes, that solved the hyphenation issue. But now I am having trouble with \phrasetext. When using uk as language code, \phrasetext does not work. So, use 'ua', \phrasetext works, but hyphenation does not And use 'uk', hyphenation works, but \phrasetext does not %========================================== \definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, tf=style:light, it=style:lightoblique, bf=style:regular, bi=style:oblique, force=yes, rscale=1.0] \definefontfamily [archimate] [ss] [Helvetica] \setupbodyfont[archimate] \definelabelclass[phrase] \setupphrasetext[en][sheettitle={ArchiMate® 3.2 Metamodel -- Core}] \setupphrasetext[ru][sheettitle={Ядро метамодели ArchiMate® 3.2}] \setupphrasetext[uk][sheettitle={Основні елементи метамоделі ArchiMate® 3.2}] \setupphrasetext[ua][sheettitle={Основні елементи метамоделі ArchiMate® 3.2}] \starttext \setuplanguage[uk][patterns={uk}]\mainlanguage[uk] \phrasetext{sheettitle} \setuplanguage[ru][patterns={ru}]\mainlanguage[ru] \phrasetext{sheettitle} \setuplanguage[uk][patterns={uk}]\mainlanguage[uk] \phrasetext{sheettitle} \setuplanguage[ua][patterns={ua}]\mainlanguage[ua] \phrasetext{sheettitle} \stoptext %==========================================
Basically, the situation then is, the language is called ua but the patterns are called uk?
On 5 Aug 2023, at 15:23, Gerben Wierda
wrote: On 19 Jul 2023, at 09:17, Hans Hagen via ntg-context
wrote: On 7/19/2023 8:58 AM, Gerben Wierda wrote:
On 19 Jul 2023, at 08:52, Hans Hagen
wrote: so best not mess with setting up languages that already have been set up. I had no idea I was messing. What am I doing wrong, then. Because in my actual document with ua language setting it is not hyphenated. This was just a minimal example
do you get something similar?
mtxrun lang-uk.lua c:/data/develop/tex-context/tex/texmf-context/tex/context/patterns/mkiv/lang-uk.lua
uk is the offical tag but for historic reasone we use ua as language; given the uk's exit and ua's entry in the european union we could now consider adapting it; and i'd wonder is anyone would notice - or bother - is we'd use ukrain hyphenation for russian, which could save some bytes in the distribution
Yes, that solved the hyphenation issue. But now I am having trouble with \phrasetext. When using uk as language code, \phrasetext does not work.
So, use 'ua', \phrasetext works, but hyphenation does not And use 'uk', hyphenation works, but \phrasetext does not
%========================================== \definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, tf=style:light, it=style:lightoblique, bf=style:regular, bi=style:oblique, force=yes, rscale=1.0] \definefontfamily [archimate] [ss] [Helvetica] \setupbodyfont[archimate]
\definelabelclass[phrase] \setupphrasetext[en][sheettitle={ArchiMate® 3.2 Metamodel -- Core}] \setupphrasetext[ru][sheettitle={Ядро метамодели ArchiMate® 3.2}] \setupphrasetext[uk][sheettitle={Основні елементи метамоделі ArchiMate® 3.2}] \setupphrasetext[ua][sheettitle={Основні елементи метамоделі ArchiMate® 3.2}]
\starttext \setuplanguage[uk][patterns={uk}]\mainlanguage[uk] \phrasetext{sheettitle}
\setuplanguage[ru][patterns={ru}]\mainlanguage[ru] \phrasetext{sheettitle}
\setuplanguage[uk][patterns={uk}]\mainlanguage[uk] \phrasetext{sheettitle}
\setuplanguage[ua][patterns={ua}]\mainlanguage[ua] \phrasetext{sheettitle} \stoptext %========================================== ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
Gerben Wierda (LinkedIn https://www.linkedin.com/in/gerbenwierda, Mastodon https://newsie.social/@gctwnl) R&A IT Strategy https://ea.rna.nl/ (main site) Book: Chess and the Art of Enterprise Architecture https://ea.rna.nl/the-book/ Book: Mastering ArchiMate https://ea.rna.nl/the-book-edition-iii/
participants (3)
-
Gerben Wierda
-
Hans Hagen
-
Hans Hagen