|
6 | 6 |
|
7 | 7 | <xsl:variable name="debug">false</xsl:variable>
|
8 | 8 |
|
9 |
| - <xsl:variable name="isIgnoreComplexScripts">true</xsl:variable> |
| 9 | + <!-- <xsl:variable name="isIgnoreComplexScripts">true</xsl:variable> --> |
10 | 10 |
|
11 | 11 | <xsl:variable name="doctype" select="//plateau:plateau-standard[1]/plateau:bibdata/plateau:ext/plateau:doctype[@language = '' or not(@language)]"/>
|
12 | 12 |
|
13 | 13 | <xsl:variable name="i18n_doctype_dict_annex"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">doctype_dict.annex</xsl:with-param></xsl:call-template></xsl:variable>
|
14 | 14 | <xsl:variable name="i18n_doctype_dict_technical_report"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">doctype_dict.technical-report</xsl:with-param></xsl:call-template></xsl:variable>
|
15 | 15 | <xsl:variable name="i18n_table_of_contents"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">table_of_contents</xsl:with-param></xsl:call-template></xsl:variable>
|
16 | 16 |
|
| 17 | + <xsl:variable name="vertical_layout" select="normalize-space(/*/plateau:metanorma-extension/plateau:presentation-metadata/plateau:vertical-layout)"/> |
| 18 | + |
17 | 19 | <xsl:variable name="page_header">
|
18 | 20 | <xsl:value-of select="/*/plateau:metanorma-extension/plateau:presentation-metadata/plateau:use-case"/>
|
19 | 21 | <xsl:text>_</xsl:text>
|
|
90 | 92 | </fo:simple-page-master>
|
91 | 93 |
|
92 | 94 | <fo:simple-page-master master-name="document_preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
93 |
| - <fo:region-body margin-top="50mm" margin-bottom="35mm" margin-left="26mm" margin-right="34mm"/> |
| 95 | + <xsl:if test="$vertical_layout = 'true'"> |
| 96 | + <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute> |
| 97 | + <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute> |
| 98 | + </xsl:if> |
| 99 | + <fo:region-body margin-top="50mm" margin-bottom="35mm" margin-left="26mm" margin-right="34mm"> |
| 100 | + <xsl:if test="$vertical_layout = 'true'"> |
| 101 | + <xsl:attribute name="writing-mode">tb-rl</xsl:attribute> |
| 102 | + </xsl:if> |
| 103 | + </fo:region-body> |
94 | 104 | <fo:region-before region-name="header" extent="50mm"/>
|
95 | 105 | <fo:region-after region-name="footer" extent="35mm"/>
|
96 | 106 | <fo:region-start region-name="left-region" extent="26mm"/>
|
97 | 107 | <fo:region-end region-name="right-region" extent="34mm"/>
|
98 | 108 | </fo:simple-page-master>
|
99 | 109 |
|
100 | 110 | <fo:simple-page-master master-name="document_toc" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
101 |
| - <fo:region-body margin-top="16.5mm" margin-bottom="22mm" margin-left="14.5mm" margin-right="22.3mm"/> |
| 111 | + <xsl:if test="$vertical_layout = 'true'"> |
| 112 | + <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute> |
| 113 | + <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute> |
| 114 | + </xsl:if> |
| 115 | + <fo:region-body margin-top="16.5mm" margin-bottom="22mm" margin-left="14.5mm" margin-right="22.3mm"> |
| 116 | + <xsl:if test="$vertical_layout = 'true'"> |
| 117 | + <xsl:attribute name="writing-mode">tb-rl</xsl:attribute> |
| 118 | + </xsl:if> |
| 119 | + </fo:region-body> |
102 | 120 | <fo:region-before region-name="header" extent="16.5mm"/>
|
103 | 121 | <fo:region-after region-name="footer" extent="22mm"/>
|
104 | 122 | <fo:region-start region-name="left-region" extent="14.5mm"/>
|
105 | 123 | <fo:region-end region-name="right-region" extent="22.3mm"/>
|
106 | 124 | </fo:simple-page-master>
|
107 | 125 |
|
108 | 126 | <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
109 |
| - <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/> |
| 127 | + <xsl:if test="$vertical_layout = 'true'"> |
| 128 | + <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute> |
| 129 | + <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute> |
| 130 | + </xsl:if> |
| 131 | + <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"> |
| 132 | + <xsl:if test="$vertical_layout = 'true'"> |
| 133 | + <xsl:attribute name="writing-mode">tb-rl</xsl:attribute> |
| 134 | + </xsl:if> |
| 135 | + </fo:region-body> |
110 | 136 | <fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
111 | 137 | <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
112 | 138 | <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
|
235 | 261 | <fo:static-content flow-name="header" role="artifact" id="__internal_layout__preface_header_{generate-id()}">
|
236 | 262 | <!-- grey background -->
|
237 | 263 | <fo:block-container absolute-position="fixed" left="24.2mm" top="40mm" height="231.4mm" width="161mm" background-color="rgb(242,242,242)" id="__internal_layout__preface_header_{$num}_{generate-id()}">
|
| 264 | + <xsl:if test="$vertical_layout = 'true'"> |
| 265 | + <xsl:attribute name="top">24.2mm</xsl:attribute> |
| 266 | + <xsl:attribute name="left">40mm</xsl:attribute> |
| 267 | + <xsl:attribute name="writing-mode">tb-rl</xsl:attribute> |
| 268 | + </xsl:if> |
238 | 269 | <fo:block> </fo:block>
|
239 | 270 | </fo:block-container>
|
240 | 271 | </fo:static-content>
|
|
0 commit comments