Changes

Jump to navigation Jump to search
1,943 bytes added ,  19:58, 20 April 2013
no edit summary
== Composed : ''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}}.
Valid values are <code>normal</code> and <code>wide</code>. The default sign is a combination of two hyphens: <context source="yes">\setuppapersize[A5]\setuphyphenmark[sign=wide] intra||word</context> To get a normal sign you could set this with the <code>normal</code> value (ConTeXt 2008.09.16 or later)<context source="yes">\setuppapersize[A5]\setuphyphenmark[sign=normal]intra||word</context>
The || is also used in word combinations like (intra)word, which is typed as (intra|)|word.
The mechanism is not foolproof but it serves most purposes. In case the hyphenation is
incorrect you can hyphenate the first word of the composed one by hand: (in\-tra|)|word.
 
Another use of || is the processing of subsentences. The symbol that surrounds a subsentence varies
depending on the current language settings, as controlled by <cmd>setuplanguage</cmd>. When you use |<| and |>| to indicate the subsentence, the proper symbol will be used automatically.
 
<context source="yes">
\setuppapersize[A5]
a |<|as explained below|>| conflirtaneous \unknown
</context>
The main reason behind this mechanism is that TeX doesn’t really know how to hyphenate
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|]starttext \HLhyphenation{intraword}\VL hyphenation{intra} {\bf input \VL \bf -- normal \VL \bf output -- hyphenated output}\VLShowComposed{intraword} \SRcrlf\HLShowComposed{intra-word} \crlf\VL \ShowComposed {intra||word } \VL\FRcrlf\VL \ShowComposed {intra|-|word } \VL\MRcrlf\VL \ShowComposed {intra|(|word) } \VL\MRcrlf\VL \ShowComposed {(intra|)|word } \VL\MRcrlf\VL \ShowComposed {intra|--|word } \VL\MRcrlf\VL \ShowComposed {intra|~|word } \VL\LRcrlf\VL \ShowComposed {intra|_|word } \VL\LRcrlf\VL \ShowComposed {intra|=|word } \VL\LRcrlf\VL \ShowComposed {intra|'|word } \VLcrlf\LRShowComposed{intra|*|word} \crlf\VL \ShowComposed stoptext</context> == Enabling hyphenation on hyphens for composed words globally == This is possible in MkIV with the command {{cmd|setbreakpoints|[compound]}}.This is equivalent to typing each composed-word as <code>composed|sub sentence-|word</code>. It also sets the characters '+', '/', '(', and ')' as good breakpoints inside composed words. The slash must be typed verbatim, though, not as {{cmd|slash}} or {{cmd| backslash}}. <context mode=mkiv source=yes>% mode=mkiv% mkiv only \VLsetuppapersize[A6]\LRsetbreakpoints[compound]\HLsetupwhitespace[line]\stoptablelove/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
</context>
 
[[Category:International]]

Navigation menu