Tecnologías XML / XSL-FO / Referencia / Extensiones XSL de Antenna House Formatter / Propiedades / text-justify-trim

(Extracto de «XSL-FO ― Die Referenz» de Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Categoría Recorte y puntuación colgante

Especifica el método de reducción de espacios para justificar el texto. [CSS3-Text] Compresión adicional: la propiedad 'text-justify-trim'

Valor:

none | [ punctuation || punctuation-except-fullstop || punctuation-except-middledot || [ kana | ideograph ] || inter-word ] | auto

Valor inicial:

auto

Se aplica a:

todos los objetos de formato de bloque o de línea

Heredado:

yes

Porcentajes:

N/A

Los valores tienen los significados siguientes.

none

No reduce los espacios del texto japonés.

punctuation

Reduce los espacios de los paréntesis, puntos medios y signos de puntuación de anchura completa en japonés.

punctuation-except-fullstop

Se comporta como punctuation, excepto para los dos caracteres siguientes.

U+3002

IDEOGRAPHIC FULL STOP

。

U+FF0E

FULLWIDTH FULL STOP

.


punctuation-except-middledot

Se comporta como punctuation, excepto para los siguientes puntos medios.

U+30FB

KATAKANA MIDDLE DOT

・

U+FF1A

FULLWIDTH COLON

:

U+FF1B

FULLWIDTH SEMICOLON

;


kana

Reduce ligeramente los espacios de los hiragana y katakana.

ideograph

Reduce los espacios entre kanji o kana.

inter-word

Reduce los espacios entre palabras occidentales.

auto

Depende del ajuste del sistema. Es el valor especificado mediante punctuation-trim y text-justify-mode en el archivo de configuración de opciones. Sin embargo, cuando axf:avoid-widow-words es "true", se considera que "Ideograph inter-word" está especificado.

Reduce los espacios entre caracteres según los ajustes para que el texto quepa en una línea. Cuando se especifica axf:punctuation-trim="all", puede no quedar espacio que reducir.

Ejemplo XSL-FO:

<fo:root xml:lang="en" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<axf:document-info name="document-title" value="Example of trimming Japanese text"/>
<axf:document-info name="author" value="Antenna House, Inc."/>
<fo:layout-master-set>
<fo:simple-page-master page-height="297mm" page-width="210mm" margin-top="10mm" margin-left="20mm" margin-right="20mm" margin-bottom="10mm" master-name="PageMaster1">
<fo:region-after extent="7mm"/>
<fo:region-body margin-top="0mm" margin-left="0mm" margin-right="0mm" margin-bottom="10mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="PageMaster1">
<fo:static-content flow-name="xsl-region-after">
<fo:block font-size="0.8em" text-align="right" color="green">
<fo:basic-link external-destination="http://www.antennahouse.com/">
Antenna House, Inc.
</fo:basic-link>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body" font-family="serif" font-size="1em" line-height="1.4" axf:hyphenate-hyphenated-word="false" hyphenate="true">
<fo:block span="all" font-family="sans-serif" font-size="2em" font-weight="bold" line-height="2" space-before="1em" space-after="1em" space-before.conditionality="retain" space-after.conditionality="retain" background-color="#EEEEEE">
<fo:block start-indent="1em" end-indent="1em">
Example of trimming Japanese text
</fo:block>
</fo:block>
<fo:block span="all" space-before="1em" space-after="1em" space-after.conditionality="retain" text-indent="0em" border="1pt solid #9999FF" start-indent="0.5em" end-indent="0.5em" padding="0.5em" text-align="justify">

Spesify whether text is trimmed or not. If none is specified to axf:text-justify-trim, text is not trimmed. Parentheses, middle dots, and punctuations of full width in Japanese are also trimmed. Hiragana and Katakana, spaces between Kanji or Kana, spaces between Western words can also be trimmed.
</fo:block>
<fo:block text-align="justify">
<fo:block font-size="1.2em">
none
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="10em" axf:text-justify-trim="none">
<fo:block background="orange" xml:lang="ja">
(あいうえお。かき・くけこ)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
punctuation
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="10em" axf:text-justify-trim="punctuation">
<fo:block background="orange" xml:lang="ja">
(あいうえお。かき・くけこ)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
punctuation-except-fullstop
</fo:block>
<fo:block>
Same as punctuation, but the two letters of U+3002 (。), U+FF0E (.) are excluded.
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="10em" axf:text-justify-trim="punctuation-except-fullstop">
<fo:block background="orange" xml:lang="ja">
(あいうえお。かき・くけこ)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
punctuation-except-middledot 
</fo:block>
<fo:block>
Same as punctuation, but middle dots of U+30FB (・), U+FF1A (:), U+FF1B (;) are excluded.
</fo:block>
<fo:block-container space-after="1em" font-size="1.5em" width="10em" axf:text-justify-trim="punctuation-except-middledot">
<fo:block background="orange" xml:lang="ja">
(あいうえお。かき・くけこ)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
none
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="12.5em" axf:text-justify-trim="none">
<fo:block background="orange">
Specify whether text is trimmed or not.
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
kana, ideograph
</fo:block>
<fo:block-container space-after="1.5em" font-size="1.5em" width="12.5em" axf:text-justify-trim="ideograph">
<fo:block background="orange">
Specify whether text is trimmed or not.
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
none
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="20em" axf:text-justify-trim="none">
<fo:block background="orange">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam bibendum tincidunt pharetra.
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
inter-word
</fo:block>
<fo:block-container space-after="1em" font-size="1.5em" width="20em" axf:text-justify-trim="inter-word">
<fo:block background="orange">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam bibendum tincidunt pharetra.
</fo:block>
</fo:block-container>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Descargar los ejemplos

Resultado:

volver arriba