Download OmegaT 3.1 - User`s Guide

Transcript
Chapter 12. Working with formatted
text
Formatting information present in the source file usually needs to be reproduced in the
target file. The in-line formatting information made possible by the supported formats (in
particular DocBook, HTML, XHTML, Open Document Format(ODF) and Office Open XML (MS
Office 2007 and later) at the time of writing) is presented as tags in OmegaT. Normally tags
are ignored when considering the similarity between different texts for matching purposes.
Tags reproduced in the translated segment will be present in the translated document.
1. Formatting tags
Tag naming:
The tags consist of one to three characters and a number. Unique numbering allows tags,
corresponding to each other to be grouped together and differentiates between tags, that
have the same shortcut character, but are in fact different. The shortcut characters used try
to reflect the underlying meaning of the tag (e.g. b for bold, i for italics, etc.)
Tag numbering:
Tags are numbered incrementally by tag group. "Tag groups" in this context are a single
tag (such as <i0> and </i0>). Within a segment, the first group (pair or single) receives the
number 0, the second the number 1 etc. The first example below has 3 tag groups (a pair, a
single, and then another pair), the second example has one group only (a pair).
Pairs and singles:
Tags are always either singles or paired. Single tags indicate formatting information that does
not affect the surrounding text (an extra space or line break for example).
<b0><Ctr+N></b0>, <br1><b2><Enter></b2><segment 2132>
<br1> is a single tag and does not affect any surrounding text. Paired tags usually indicate
style information that applies to the text between the opening tag and the closing tag of a
pair. <b0> and </b0> below are paired and affect the text log.txt. Note that the opening tag
must always come before the corresponding closing tag:
<Log file (<b0>log.txt</b0>) for tracking operations and errors.<segment 3167>
OmegaT creates its tags before the process of sentence segmenting. Depending upon the
segmenting rules, the pair of tags may get separated into two consecutive segments and the
tag validation will err on the side of caution and mark the two segments.
2. Tag operations
Care must be exercised with tags. If they are accidentally changed, the formatting of the
final file may be corrupted. The basic rule is that the sequence of tags must be preserved in
the same order. However, it is possible, if certain rules are strictly followed, to deviate from
this basic rule.
Tag duplication:
To duplicate tag groups, just copy them in the position of your choice. Keep in mind that in
a pair group, the opening tag must come before the closing tag. The formatting represented
by the group you have duplicated will be applied to both sections.
57