Changes

Jump to navigation Jump to search
410 bytes removed ,  19:58, 20 April 2013
no edit summary
: ''This article is about words that are spelled with a hyphen. For hyphenated words, see [[Hyphenation]].
 
Words consisting of two separate words are often separated by an intra word dash, as in x-axis.
This dash can be placed between two | characters, for example |-|.
When || is typed, the default intra word dash is used, which is <context>||</context>. You can configure this with <{{cmd>|setuphyphenmark</cmd>}}.
Valid values are <code>normal</code> and <code>wide</code>.
<context source="yes">
\setuppapersize[A5]
\setuphyphenmark[sign=wide]
<context source="yes">
\setuppapersize[A5]
\setuphyphenmark[sign=normal]
intra||word
<context source="yes">
\setuppapersize[A5]
a |<|as explained below|>| conflirtaneous \unknown
</context>
that would come from that.
<contextmode=mkiv source=yes>\setuppapersize[A5]\def\ShowComposed #1% {\handletokenstype{#1\with\type\VL} -- #1\VL-- \hyphenatedword{#1}}\starttable[|l|l|l|]\HL\VL \bf input \VL \bf normal \VL \bf hyphenated \VL\SR\HL\VL \ShowComposed intra||word \VL\FR\VL \ShowComposed intra|-|word \VL\MR\VL \ShowComposed intra|(|word) \VL\MR\VL \ShowComposed (intra|)|word \VL\MR\VL \ShowComposed intra|--|word \VL\MR\VL \ShowComposed intra|~|word \VL\LR\VL \ShowComposed intra|_|word \VL\LR\VL \ShowComposed intra|=|word \VL\LR\VL \ShowComposed intra|'|word \VL\LR\VL \ShowComposed intra|*|word \VL\LR\HL\stoptable</context>
== Indicating hyphenation pattern manually (Optional hyphen) ==\starttext
If you have single foreign words or just very unusual words, they may hyphenate incorrectly. Especially if the word is used multiple times, you can define a \hyphenation pattern with the command{intraword}\hyphenation{intra}
<texcode>{\bf input -- normal output -- hyphenated output}\ShowComposed{intraword} \crlf\hyphenationShowComposed{hääintra-yö-aieword} \crlf</texcode>\ShowComposed{intra||word} \crlf\ShowComposed{intra|-|word} \crlfIf you just need to fix a single \ShowComposed{intra|(|word, you can add an optional hyphen )} \crlf\ShowComposed{(hyphenation hintintra|) with <code>|word} \crlf\ShowComposed{intra|--</code>: <tt>kai|word} \crlf\ShowComposed{intra|~|word} \crlf\ShowComposed{intra|_|word} \crlf\ShowComposed{intra|=|word} \crlf\ShowComposed{intra|'|word} \crlf\-vosShowComposed{intra|*|word} \-aukcrlf\-kostoptext</ttcontext>.
== Enabling hyphenation on hyphens for composed words globally ==
For mkiv just add This is possible in MkIV with the command {{cmd|setbreakpoints|[compound]}}.This is equivalent to typing each composed-word as <code>composed|-|word</code>. It also sets the preamble:characters '+', '/', '(', and ')' as good breakpoints inside composed words. The slash must be typed verbatim, though, not as {{cmd|slash}} or {{cmd|backslash}}.
<texcodecontext mode=mkiv source=yes>\setbreakpoints[compound]% mode=mkiv</texcode> (which does the same thing as typing for each composed word <code>intra|-|word</code>)It will set also the characters "+" "/" (typed verbatim, '''not''' as <code>\slash</code> or <code>\textslash</code> ) "(" ")" as good breakpoints inside composed words. E.g the following line will be correctly broken at the /% mkiv only
<texcode>% mkiv only\setuppapersize[A6]
\setbreakpoints[compound]
\setupwhitespace[line]
\starttextlove/hate/play/run/love/hate/play/run/love/hate/play/run/love/hate/play/run
love/(hate/(play/(run/(love/(hate/(play/(run/(love/(hate/(play/(run/(love/(hate/(play/(run/love/hate/play/run/love/hate/play/run/
love(-hate(-play(-run(-love(-hate(-play(-run(-love(-hate(-play(-run(-love(-hate(-play(-run(love(hate(play(run(love(hate(play(run(
love-+hate-+play-+run-+love-+hate-+play-+run-+love-+hate-+play-+run-+love-+hate-+play-+run-love-hate-play-run-love-hate-play-run-
love+hate+play+run+love+hate+play+run+love+hate+play+run+love+hate+play+run+love+hate+play+run+love+hate+play+run+ love)hate)play)run)love)hate)play)run)love)hate)play)run)love)hate)play)run)love)hate)play)run)love)hate)play)run)\stoptext</texcodecontext>
[[Category:International]]

Navigation menu