Tecnologías XML / XSL-FO / Referencia / Extensiones XSL de Antenna House Formatter / Propiedades / punctuation-spacing

(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

La propiedad axf:punctuation-spacing especifica el espacio de recorte entre un signo de puntuación de anchura completa y un carácter de anchura completa en japonés.

Valor:

<length> | <percentage> | auto

Valor inicial:

auto

Se aplica a:

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

Heredado:

yes

Porcentajes:

se refieren a la font size

El valor inicial de este espacio puede establecerse mediante punctuation-spacing en el archivo de configuración de opciones.

Los valores tienen los significados siguientes.

<length>

Especifica el tamaño del espacio de recorte mediante un valor absoluto.

<percentage>

Al aplicarse, el valor es relativo al tamaño de fuente.

auto

Depende del ajuste del sistema. Es el valor especificado mediante punctuation-spacing en el archivo de configuración de opciones.

Este espacio se utiliza en los siguientes casos, definidos por axf:punctuation-trim="adjacent".

  • Entre un paréntesis de cierre y uno de apertura de anchura completa.

  • Entre un paréntesis de cierre de anchura completa y caracteres de anchura completa que no sean signos de puntuación.

  • Entre un carácter de anchura completa que no sea un signo de puntuación y un paréntesis de apertura de anchura completa.

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="Trimming the space between full-width punctuation and full-width character"/>
<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">
Trimming the space between full-width punctuation and full-width character
</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">
In Japanese, the space between punctuation and character in full-width can be specified by axf:punctuation-spacing. The specified space is applied between the full-width closing parenthesis and opening parenthesis, between the full-width closing parenthesis and full-width non-punctuation, between the full-width non-punctuation and full-width opening parenthesis when axf:punctuation-trim="adjacent" is specified. The value can be specified by the absolute or percentage. The default value of the space to trim can be specified by punctuation-spacing in the option setting file. The default value of punctuation-spacing is 50%.
</fo:block>
<fo:block text-align="justify">
<fo:block font-size="1.2em">
axf:punctuation-trim="adjacent" Without the setting of axf:punctuation-spacing
</fo:block>
<fo:block-container space-after="1em" font-size="1.5em" width="22em" axf:punctuation-trim="adjacent" axf:punctuation-spacing="">
<fo:block xml:lang="ja">
(あい「うえお」「「かきく」けこ」)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
axf:punctuation-trim="adjacent" axf:punctuation-spacing="1em"
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="22em" axf:punctuation-trim="adjacent" axf:punctuation-spacing="1em">
<fo:block xml:lang="ja">
(あい「うえお」「「かきく」けこ」)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
axf:punctuation-trim="adjacent" axf:punctuation-spacing="2em"
</fo:block>
<fo:block-container space-after="1em" font-size="1.5em" width="22em" axf:punctuation-trim="adjacent" axf:punctuation-spacing="2em">
<fo:block xml:lang="ja">
(あい「うえお」「「かきく」けこ」)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
axf:punctuation-trim="adjacent" axf:punctuation-spacing="0%"
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="22em" axf:punctuation-trim="adjacent" axf:punctuation-spacing="0%">
<fo:block xml:lang="ja">
(あい「うえお」「「かきく」けこ」)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
axf:punctuation-trim="adjacent" axf:punctuation-spacing="50%"
</fo:block>
<fo:block-container space-after="0.5em" font-size="1.5em" width="22em" axf:punctuation-trim="adjacent" axf:punctuation-spacing="50%">
<fo:block xml:lang="ja">
(あい「うえお」「「かきく」けこ」)
</fo:block>
</fo:block-container>
<fo:block font-size="1.2em">
axf:punctuation-trim="adjacent" axf:punctuation-spacing="200%"
</fo:block>
<fo:block-container space-after="1em" font-size="1.5em" width="22em" axf:punctuation-trim="adjacent" axf:punctuation-spacing="200%">
<fo:block xml:lang="ja">
(あい「うえお」「「かきく」けこ」)
</fo:block>
</fo:block-container>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Descargar los ejemplos

Resultado:

volver arriba