Open main menu

Changes

1,879 bytes added ,  18:52, 23 January 2023
minor corrections
{{cmd|mainlanguage|[nl]}} would be the way to set the language for the whole document to Dutch.
 
The default language is US English.
=== Change the hyphenation language ===
Another way of marking a passage would be {{cmd|startlanguage|[es]}} and {{cmd|stoplanguage}}.
 
=== Display languages and hyphenation points ===
 
{{cmd|currentmainlanguage}} prints the main language and {{cmd|currentlanguage}} displays the language in use (which may not be the same as the main language).
 
{{cmd|hyphenatedword}} prints the hyphenation points given the current language patterns.
 
<context source="yes">
{\tt\currentlanguage}: \hyphenatedword{language}\\
\uk{\tt\currentlanguage}: \hyphenatedword{language}\\
\de{\tt\currentlanguage}: \hyphenatedword{language}\\
\nl{\tt\currentlanguage}: \hyphenatedword{language}\\
\es{\tt\currentlanguage}: \hyphenatedword{language}
</context>
 
=== Minimum length for hyphenation ===
 
Hyphenation works in each language because it has defined the minimum number of letters to apply a hyphenation pattern. It applies at the word start ({{code|lefthyphemin}}) or at the word end ({{code|righthyphemin}}).
 
There is a third option to set the minimal number of letters the word needs to be hyphenated ({{code|hyphemin}}).
 
You can set that with {{cmd|setuplanguage}}, such as in {{cmd|setuplanguage|2=[es][hyphenmin=5]}}. This would enable some hyphenations and prevent others.
 
<context source="yes">
\mainlanguage[es]
\hyphenatedword{coda}\\
\hyphenatedword{comida}\\
\setuplanguage[es][hyphenmin=5]
\hyphenatedword{coda}\\
\hyphenatedword{comida}\\
</context>
 
This seems to be very useful in German:
 
<context source="yes">
\mainlanguage[de]
\hyphenatedword{dazu}\\
\hyphenatedword{darum}\\
\hyphenatedword{wovon}\\
\hyphenatedword{Erarbeiten}\\
\setuplanguage[de][lefthyphenmin=2,righthyphenmin=3]
\hyphenatedword{dazu}\\
\hyphenatedword{darum}\\
\hyphenatedword{wovon}\\
\hyphenatedword{Erarbeiten}\\
\setuplanguage[de][lefthyphenmin=2,righthyphenmin=3, hyphenmin=6]
\hyphenatedword{dazu}\\
\hyphenatedword{darum}\\
\hyphenatedword{wovon}\\
\hyphenatedword{Erarbeiten}\\
</context>
=== Allow breaking at existing hyphens ===
139

edits