appy.gen: improved cleaning and formatting of XHTML content; appy.pod: added some default appy-related table styles for producing cells with text in bold/normal, aligned right/left, etc.
This commit is contained in:
parent
d3a2b85a10
commit
028040351c
11 changed files with 195 additions and 54 deletions
|
@ -78,7 +78,7 @@ CONTENT_POD_STYLES = f.read()
|
|||
f.close()
|
||||
|
||||
# Default font added by pod in content.xml
|
||||
CONTENT_POD_FONTS = '<@style@:font-face style:name="PodStarSymbol" ' \
|
||||
CONTENT_POD_FONTS = '<@style@:font-face @style@:name="PodStarSymbol" ' \
|
||||
'@svg@:font-family="StarSymbol"/>'
|
||||
|
||||
# Default text styles added by pod in styles.xml
|
||||
|
@ -213,7 +213,8 @@ class Renderer:
|
|||
nsUris={'style': pe.NS_STYLE, 'svg': pe.NS_SVG}),
|
||||
OdInsert(STYLES_POD_STYLES,
|
||||
XmlElement('styles', nsUri=pe.NS_OFFICE),
|
||||
nsUris={'style': pe.NS_STYLE, 'fo': pe.NS_FO}))
|
||||
nsUris={'style': pe.NS_STYLE, 'fo': pe.NS_FO,
|
||||
'text': pe.NS_TEXT}))
|
||||
self.stylesParser = self.createPodParser('styles.xml', context,
|
||||
stylesInserts)
|
||||
# Stores the styles mapping
|
||||
|
|
|
@ -114,8 +114,30 @@
|
|||
</@text@:list-level-style-number>
|
||||
</@text@:list-style>
|
||||
<@style@:style @style@:name="podImageLeft" @style@:family="graphic" @style@:parent-style-name="Graphics">
|
||||
<@style@:graphic-properties @style@:run-through="foreground" @style@:wrap="parallel" @style@:number-wrapped-paragraphs="no-limit" @style@:wrap-contour="false" @style@:vertical-pos="top" @style@:vertical-rel="paragraph" @style@:horizontal-pos="left" @style@:horizontal-rel="paragraph" @style@:mirror="none" @fo@:clip="rect(0cm, 0cm, 0cm, 0cm)" @fo@:margin-right="0.3cm" @fo@:margin-bottom="0.2cm"/>
|
||||
<@style@:graphic-properties @style@:run-through="foreground" @style@:wrap="parallel" @style@:number-wrapped-paragraphs="no-limit" @style@:wrap-contour="false" @style@:vertical-pos="top" @style@:vertical-rel="paragraph" @style@:horizontal-pos="left" @style@:horizontal-rel="paragraph" @style@:mirror="none" @fo@:clip="rect(0cm, 0cm, 0cm, 0cm)" @fo@:margin-right="0.3cm" @fo@:margin-bottom="0.2cm"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podImageRight" @style@:family="graphic" @style@:parent-style-name="Graphics">
|
||||
<@style@:graphic-properties @style@:run-through="foreground" @style@:wrap="parallel" @style@:number-wrapped-paragraphs="no-limit" @style@:wrap-contour="false" @style@:vertical-pos="top" @style@:vertical-rel="paragraph" @style@:horizontal-pos="right" @style@:horizontal-rel="paragraph" @style@:mirror="none" @fo@:clip="rect(0cm, 0cm, 0cm, 0cm)" @fo@:margin-left="0.3cm" @fo@:margin-bottom="0.2cm"/>
|
||||
<@style@:graphic-properties @style@:run-through="foreground" @style@:wrap="parallel" @style@:number-wrapped-paragraphs="no-limit" @style@:wrap-contour="false" @style@:vertical-pos="top" @style@:vertical-rel="paragraph" @style@:horizontal-pos="right" @style@:horizontal-rel="paragraph" @style@:mirror="none" @fo@:clip="rect(0cm, 0cm, 0cm, 0cm)" @fo@:margin-left="0.3cm" @fo@:margin-bottom="0.2cm"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podTablePara" @style@:family="paragraph" @style@:parent-style-name="Appy_Table_Content">
|
||||
<@style@:text-properties @fo@:font-size="8pt" @fo@:font-weight="normal" @style@:font-weight-asian="normal" @style@:font-weight-complex="normal"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podTableParaBold" @style@:family="paragraph" @style@:parent-style-name="Appy_Table_Content">
|
||||
<@style@:text-properties @fo@:font-size="8pt" @fo@:font-weight="bold" @style@:font-weight-asian="bold" @style@:font-weight-complex="bold"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podTableParaRight" @style@:family="paragraph" @style@:parent-style-name="Appy_Table_Content">
|
||||
<@style@:paragraph-properties @fo@:text-align="end" @style@:justify-single-word="false"/>
|
||||
<@style@:text-properties @fo@:font-size="8pt" @fo@:font-weight="normal" @style@:font-weight-asian="normal" @style@:font-weight-complex="normal"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podTableParaBoldRight" @style@:family="paragraph" @style@:parent-style-name="Appy_Table_Content">
|
||||
<@style@:paragraph-properties @fo@:text-align="end" @style@:justify-single-word="false"/>
|
||||
<@style@:text-properties @fo@:font-size="8pt" @fo@:font-weight="bold" @style@:font-weight-asian="bold" @style@:font-weight-complex="bold"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podTableCell" @style@:family="table-cell">
|
||||
<@style@:table-cell-properties @fo@:padding="0.097cm" @fo@:border="0.018cm solid #000000"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podTableHeaderCell" @style@:family="table-cell">
|
||||
<@style@:table-cell-properties @fo@:background-color="#e6e6e6" @fo@:padding="0.097cm" @fo@:border="0.018cm solid #000000">
|
||||
<@style@:background-image/>
|
||||
</@style@:table-cell-properties>
|
||||
</@style@:style>
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
<@style@:style @style@:name="podNumberStyle" @style@:display-name="POD Numbering Symbols" @style@:family="text"/>
|
||||
<@style@:style @style@:name="podBulletStyle" @style@:display-name="POD Bullet Symbols" @style@:family="text">
|
||||
<@style@:text-properties @style@:font-name="PodStarSymbol" @fo@:font-size="9pt"
|
||||
@style@:font-name-asian="PodStarSymbol" @style@:font-size-asian="9pt"
|
||||
@style@:font-name-complex="PodStarSymbol" @style@:font-size-complex="9pt"/>
|
||||
</@style@:style>
|
||||
<@style@:text-properties @style@:font-name="PodStarSymbol" @fo@:font-size="9pt"
|
||||
@style@:font-name-asian="PodStarSymbol" @style@:font-size-asian="9pt"
|
||||
@style@:font-name-complex="PodStarSymbol" @style@:font-size-complex="9pt"/>
|
||||
</@style@:style>
|
||||
<@style@:style style:name="AppyStandard" style:family="paragraph" style:class="text" style:master-page-name="">
|
||||
<@style@:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.101cm" fo:margin-bottom="0.169cm" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto"/>
|
||||
<@style@:text-properties style:font-name="DejaVu Sans" fo:font-size="10pt"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="Appy_Table_Content" @style@:display-name="Appy Table Contents" @style@:family="paragraph"
|
||||
@style@:parent-style-name="AppyStandard" @style@:class="extra">
|
||||
<@style@:paragraph-properties @fo@:margin-top="0cm" @fo@:margin-bottom="0cm" @text@:number-lines="false" @text@:line-number="0"/>
|
||||
<@style@:text-properties @fo@:font-size="8pt"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="Appy_Table_Heading" @style@:display-name="Appy Table Heading" @style@:family="paragraph"
|
||||
@style@:parent-style-name="Appy_Table_Contents" @style@:class="extra">
|
||||
<@style@:paragraph-properties @fo@:text-align="center" @style@:justify-single-word="false" @text@:number-lines="false"
|
||||
@text@:line-number="0"/>
|
||||
<@style@:text-properties @fo@:font-weight="bold" @style@:font-weight-asian="bold" @style@:font-weight-complex="bold"/>
|
||||
</@style@:style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue