aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2016-05-25 13:13:15 +0200
committerLars Thorsen <[email protected]>2016-06-01 14:38:36 +0200
commit801e99b298fd292037256db945b5daaa99cdf655 (patch)
tree38adfb313da5a34c23ca7d42045171d652075116 /lib/erl_docgen
parentedec337e3c4361d87efdd48bcfe10ac382a7837c (diff)
downloadotp-801e99b298fd292037256db945b5daaa99cdf655.tar.gz
otp-801e99b298fd292037256db945b5daaa99cdf655.tar.bz2
otp-801e99b298fd292037256db945b5daaa99cdf655.zip
[erl_docgen] Fix support for quote tag
Diffstat (limited to 'lib/erl_docgen')
-rw-r--r--lib/erl_docgen/priv/css/otp_doc.css5
-rw-r--r--lib/erl_docgen/priv/dtd/common.dtd2
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl12
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf.xsl14
4 files changed, 30 insertions, 3 deletions
diff --git a/lib/erl_docgen/priv/css/otp_doc.css b/lib/erl_docgen/priv/css/otp_doc.css
index 347782eb1e..219740a557 100644
--- a/lib/erl_docgen/priv/css/otp_doc.css
+++ b/lib/erl_docgen/priv/css/otp_doc.css
@@ -122,6 +122,11 @@ span.code { font-family: Courier, monospace; font-weight: normal }
font-size: 90%;
padding: 5px 10px;
}
+
+.quote {
+ font-style: italic
+}
+
.example {
background-color:#eeeeff;
padding: 0px 10px;
diff --git a/lib/erl_docgen/priv/dtd/common.dtd b/lib/erl_docgen/priv/dtd/common.dtd
index 945924fe79..b1578ad9d4 100644
--- a/lib/erl_docgen/priv/dtd/common.dtd
+++ b/lib/erl_docgen/priv/dtd/common.dtd
@@ -69,7 +69,7 @@
<!ATTLIST list type (ordered|bulleted) "bulleted" >
<!ELEMENT taglist (tag,item+)+ >
<!ELEMENT tag (#PCDATA|c|i|em|br|seealso|url|marker|anno)* >
-<!ELEMENT item (%inline;|%block;|warning|note|dont|do)* >
+<!ELEMENT item (%inline;|%block;|warning|note|dont|do|quote)* >
<!-- References -->
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index 57913e7168..2f8fb05da6 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -996,6 +996,18 @@
</div>
</xsl:template>
+ <!-- Quote -->
+ <xsl:template match="quote">
+ <xsl:param name="chapnum"/>
+ <div class="quote">
+ <p>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </p>
+ </div>
+ </xsl:template>
+
<!-- Paragraph -->
<xsl:template match="p">
<p>
diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl
index 2f7b363b67..99263847fb 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl
@@ -1171,6 +1171,16 @@
</fo:block>
</xsl:template>
+ <!-- Quote -->
+ <xsl:template match="quote">
+ <xsl:param name="chapnum"/>
+ <fo:block font-style="italic">
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </xsl:template>
+
<!-- Paragraph -->
<xsl:template match="p">
<fo:block xsl:use-attribute-sets="p">
@@ -1181,7 +1191,7 @@
<!-- Inline elements -->
<xsl:template match="i">
- <fo:inline font-weight="italic">
+ <fo:inline font-style="italic">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
@@ -1197,7 +1207,7 @@
</xsl:template>
<xsl:template match="em">
- <fo:inline font-style="italic">
+ <fo:inline font-weight="bold">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>