ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* List of language-specific hyphenation commands
@ 2020-05-22 21:42 Jairo A. del Rio
  2020-05-23 14:36 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Jairo A. del Rio @ 2020-05-22 21:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 348 bytes --]

Hi everybody! I've read about some commands which allow hyphenation
according to an specific language in ConTeXt, e.g. \french{word} for French
hyphenation in a text the main language of which is Spanish, English, etc.
Unlike \language[code], I couldn't find any extensive list of those
commands, so where should I find them? Thank you in advance!

[-- Attachment #1.2: Type: text/html, Size: 382 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: List of language-specific hyphenation commands
  2020-05-22 21:42 List of language-specific hyphenation commands Jairo A. del Rio
@ 2020-05-23 14:36 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2020-05-23 14:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jairo A. del Rio

Jairo A. del Rio schrieb am 22.05.2020 um 23:42:
> Hi everybody! I've read about some commands which allow hyphenation 
> according to an specific language in ConTeXt, e.g. \french{word} for 
> French hyphenation in a text the main language of which is Spanish, 
> English, etc. Unlike \language[code], I couldn't find any extensive list 
> of those commands, so where should I find them? Thank you in advance!

It's a switch and you have to put the left brace before the command, 
e.g. {\french ...}

There is no list but you can print the stored entries.

\starttext

\startluacode

function userdata.languagesyonym(language)
     context.doShowLanguage(language)
     for synonym, _ in next, languages.registered[language].synonyms do
         context.doShowLanguage(synonym)
     end
end

function userdata.checklanguage(language,meaning)
     if string.find(meaning,"\\lang_basics_set_current") then
         context.tex(language)
     end
end

\stopluacode

\def\doShowLanguage#1%
   {\doifnotinstring{-}{#1}
 
{\ctxlua{userdata.checklanguage("#1","\luaescapestring{\expandafter\meaning\csname#1\endcsname}")}}%
    \par}

\def\ShowLanguage#1%
   {\testpage[3]
    \blank[medium]
    \ctxlua{userdata.languagesyonym("#1")}}

\processcommacommand[\installedlanguages]\ShowLanguage

\stoptext

Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-05-23 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 21:42 List of language-specific hyphenation commands Jairo A. del Rio
2020-05-23 14:36 ` Wolfgang Schuster

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