Hyphenation specifies how words should be hyphenated when text wraps across multiple lines.
The transformation plugin uses the capabilities of Oxygen PDF Chemistry processor to perform hyphenation.
| Code | Language |
|---|---|
| da | Danish |
| de | German |
| de_CH | German (Switzerland) |
| en | English |
| en-GB | English (Great Britain) |
| es | Spanish |
| fr | French |
| it | Italian |
| nb | Norwegian Bokmål |
| nl |
Dutch |
| ro | Romanian |
| ru | Russian |
| sv | Swedish |
| th | Thai |
| pt | Portuguese |
| da | Danish |
The built-in hyphenation pattern license terms are listed in the XML files in the [CHEMISTRY_INSTALL_DIR]/config/hyph folder. Most of them comply with the LaTex distribution policy.
Oxygen XML Author Eclipse plugin uses the TeX hyphenation dictionaries converted to XML by the OFFO project: https://sourceforge.net/projects/offo/.
The .xml files allow you to access the licensing terms and you can use them as a starting point to create customized dictionaries (see How to Alter a Hyphenation Dictionary).
The .hyp files are the compiled dictionaries that the Oxygen XML Author Eclipse plugin actually uses.
fop-hyph.jar file to the [OXYGEN_INSTALL_DIR]/lib
directory..hyp or .xml
file in the [OXYGEN_INSTALL_DIR]/config/hyph directory (create that
directory if it is missing).You can copy the dictionaries you need to change in another directory, then use the
-hyph-dir parameter to refer them inside your transformation.
Each file is named with the language code and has the following structure:
<hyphenation-info>
<hyphen-min before="2" after="3"/>
<exceptions>
o-mni-bus
...
</exceptions>
<patterns>
préémi3nent.
proémi3nent.
surémi3nent.
....
</patterns>
</hyphenation-info>
For example, o-mni-bus will match the
omnibus word and will indicate two possible hyphenation points.
For example, tran3s2act indicates that
the possible hyphenation points are "tran-s-act" and the preferable point is
the first one, having the higher score of "3".
To enable hyphenation for your entire map:
@xml:lang attribute on the root of your map, or set
the default.language parameter in the transformation.:root {
hyphens: auto;
}hyphens:none. The
following example excludes the <keyword> elements from being
hyphenated:*[class ~= "topic/keyword"] {
hyphens: none;
}@xml:lang attribute on the root
of your map, or set the default.language parameter in the
transformation.hyphens property.@outputclass="hyphens" or
@outputclass="no-hyphens" attributes/values.*[class ~= "topic/table"] {
hyphens: auto;
}<exceptions> section using hard hyphen
symbols between its segments.It is possible to force or avoid line breaks inside words with hyphens
(U+2010). This can be useful, for example, inside tables that have product
references if you want the display to remain on a single line (or to split it on multiple
lines). To achieve this, you can use the -oxy-break-line-at-hyphens
property:
Example:
<table>
<row>
<cell>Product-1233-55-88</cell>
<cell>120</cell>
<row>
<row>
<cell>Product-1244-66-99</cell>
<cell>112</cell>
<row>
</table>table {
-oxy-break-line-at-hyphens: avoid;
}In the output, the list of product references will be displayed in a single line. On the
contrary, setting the property value to always, will force a break after each
hyphen.