Class TeXHyphenationDictionaryLoader
Loads common TeX hyphenation pattern files into a reusable dictionary.
Inherited Members
Namespace: DRIT.Document
Assembly: DRIT.Document.dll
Syntax
public static class TeXHyphenationDictionaryLoader
Methods
Load(Stream, Encoding, int, int)
Loads patterns and optional exception words from a text stream.
Declaration
public static PatternHyphenationDictionary Load(Stream stream, Encoding encoding = null, int leftMinimum = 2, int rightMinimum = 2)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream containing TeX pattern text. |
| Encoding | encoding | The text encoding; UTF-8 is used when omitted. |
| int | leftMinimum | Minimum number of letters before a split. |
| int | rightMinimum | Minimum number of letters after a split. |
Returns
| Type | Description |
|---|---|
| PatternHyphenationDictionary | A pattern-based hyphenation dictionary. |
Load(string, Encoding, int, int)
Loads patterns and optional exception words from a file.
Declaration
public static PatternHyphenationDictionary Load(string path, Encoding encoding = null, int leftMinimum = 2, int rightMinimum = 2)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The path to the TeX pattern file. |
| Encoding | encoding | The text encoding; UTF-8 is used when omitted. |
| int | leftMinimum | Minimum number of letters before a split. |
| int | rightMinimum | Minimum number of letters after a split. |
Returns
| Type | Description |
|---|---|
| PatternHyphenationDictionary | A pattern-based hyphenation dictionary. |
Parse(string, int, int)
Parses TeX pattern text. Lines beginning with % are comments;
lines beginning with \patterns or \hyphenation are accepted.
Declaration
public static PatternHyphenationDictionary Parse(string text, int leftMinimum = 2, int rightMinimum = 2)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The pattern file contents. |
| int | leftMinimum | Minimum number of letters before a split. |
| int | rightMinimum | Minimum number of letters after a split. |
Returns
| Type | Description |
|---|---|
| PatternHyphenationDictionary | A pattern-based hyphenation dictionary. |