Выбрать главу

 </fo:character>

</xsclass="underline" template>

При помощи элемента <fo:character> можно форматировать отдельные символы, как в следующем случае, где символы в слове «HELLO» выделяются различными цветами:

<fo:character character="H" font-size="24pt" color="red"/>

<fo:character character="E" font-size="24pt" color="yellow"/>

<fo:character character="L" font-size="24pt" color="green"/>

<fo:character character="L" font-size="24pt" color="blue"/>

<fo:character character="O" font-size="24pt" color="orange"/>

С элементом <fo:character> можно применять следующие свойства:

• общие звуковые свойства: azimuth, cue-after, cue-before, elevation, pause-after, pause-before, pitch, pitch-range, play-during, richness, speak, speak-header, speak-numeral, speak-punctuation, speech-rate, stress, voice-family, volume;

• общие свойства границ, заполнения и заднего фона: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, background-position-vertical, border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, border-right-width, padding-before, padding-after, padding-start, padding-end, padding-top, padding-bottom, padding-left, padding-right;

• общие свойства шрифтов: font-family, font-size, font-stretch, font-size-adjust, font-style, font-variant, font-weight;

• общие свойства переносов: country, language, script, hyphenate, hyphenation-character, hyphenation-push-character-count, hyphenation-remain-character-count;

• общие свойства встроенных полей: space-end, space-start;

• alignment-adjust;

• treat-as-word-space;

• baseline-identifier;

• baseline-shift;

• character;

• color;

• dominant-baseline;

• font-height-override-after;

• font-height-override-before;

• glyph-orientation-horizontal;

• glyph-orientation-vertical;

• id;

• keep-with-next;

• keep-with-previous;

• letter-spacing;

• line-height;

• line-height-shift-adjustment;

• relative-position;

• score-spaces;

• suppress-at-line-break;

• text-decoration;

• text-shadow;

• text-transform;

• word-spacing.

Создание номеров страниц: <fo:page-number>

Встроенный форматирующий объект <fo:page-number> создает встроенную область, отображающую номер текущей страницы. Например:

<fo:block>

 You are now reading page <fo:page-number/>.

</fo:block>

С элементом <fo:page-number> можно применять следующие свойства:

• общие свойства доступа: source-document, role;

• общие звуковые свойства: azimuth, cue-after, cue-before, elevation, pause-after, pause-before, pitch, pitch-range, play-during, richness, speak, speak-header, speak-numeral, speak-punctuation, speech-rate, stress, voice-family, volume;

• общие свойства границ, заполнения и заднего фона: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, background-position-vertical, border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, border-right-width, padding-before, padding-after, padding-start, padding-end, padding-top, padding-bottom, padding-left, padding-right;

• общие свойства шрифтов: font-family, font-size, font-stretch, font-size-adjust, font-style, font-variant, font-weight;

• общие свойства встроенных полей: space-end, space-start;

• alignment-adjust;

• baseline-identifier;

• baseline-shift;

• dominant-baseline;

• id;

• keep-with-next;

• keep-with-previous;

• letter-spacing;

• line-height;

• line-height-shift-adjustment;

• relative-position;

• score-spaces;

• text-decoration;

• text-shadow;

• text-transform;

• word-spacing.

Пример применения номеров страниц будет показан при обсуждении последовательностей страниц в конце этой главы.

Вставка графики: <fo:external-graphic>

Популярный элемент при форматировании XSL-FO — <fo:external-graphic>, при помощи которого можно вставить в документ рисунок.

С элементом <fo:external-graphic> можно применять следующие свойства:

• общие свойства доступа: source-document, role;

• общие звуковые свойства: azimuth, cue-after, cue-before, elevation, pause-after, pause-before, pitch, pitch-range, play-during, richness, speak, speak-header, speak-numeral, speak-punctuation, speech-rate, stress, voice-family, volume;

• общие свойства границ, заполнения и заднего фона: background-attachment, background-color, background-image, background-repeat, background-position-horizontal, background-position-vertical, border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, border-right-width, padding-before, padding-after, padding-start, padding-end, padding-top, padding-bottom, padding-left, padding-right;

• общие свойства встроенных полей: space-end, space-start;

• alignment-adjust;

• baseline-identifier;

• baseline-shift;

• block-progression-dimension;

• content-height;

• content-type;

• content-width;

• dominant-baseline;

• height;

• id;

• inline-progression-dimension;

• keep-with-next;

• keep-with-previous;

• line-height;

• line-height-shift-adjustment;

• relative-position;