Changes

Jump to navigation Jump to search
1,766 bytes added ,  08:49, 16 February 2008
explain word composition
== Composed words ==

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

\setuphyphenmark[sign=..]

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.

The main reason behind this mechanism is that TeX doesn’t really know how to hyphenate
composed words and how to handle subsentences. TeX know a lot about math, but far less
about normal texts. Using this command not only serves consistency, but also makes sure that
TeX can break compound words at the right places. It also keeps boundary characters at the
right place when a breakpoint is inserted.

The table below is an extended version of the table in the "big manual". In the third
column, you see what the possible line breaks in the word would be, and the output
that would come from that.

<context>
\def\ShowComposed #1
{\handletokens#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 |<|sub sentence|>| \VL\LR
\HL
\stoptable
</context>

Navigation menu