From cd917e88f5718eead826c896864cfe85cd3d301b Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 17 Dec 2014 21:07:55 +0100 Subject: Support for and doc tags --- lib/erl_docgen/priv/css/otp_doc.css | 28 +++++++++++++++++++++++++++- lib/erl_docgen/priv/dtd/application.dtd | 2 +- lib/erl_docgen/priv/dtd/book.dtd | 4 ++-- lib/erl_docgen/priv/dtd/chapter.dtd | 4 ++-- lib/erl_docgen/priv/dtd/common.dtd | 2 ++ lib/erl_docgen/priv/dtd/common.refs.dtd | 6 +++--- lib/erl_docgen/priv/dtd/part.dtd | 2 +- lib/erl_docgen/priv/dtd/report.dtd | 4 +++- lib/erl_docgen/priv/xsl/db_html.xsl | 30 ++++++++++++++++++++++++++++++ lib/erl_docgen/priv/xsl/db_man.xsl | 24 +++++++++++++++++++++++- lib/erl_docgen/priv/xsl/db_pdf.xsl | 25 +++++++++++++++++++++++++ lib/erl_docgen/priv/xsl/db_pdf_params.xsl | 27 +++++++++++++++++++++++++++ 12 files changed, 146 insertions(+), 12 deletions(-) (limited to 'lib/erl_docgen') diff --git a/lib/erl_docgen/priv/css/otp_doc.css b/lib/erl_docgen/priv/css/otp_doc.css index c56de378f4..2aae87a759 100644 --- a/lib/erl_docgen/priv/css/otp_doc.css +++ b/lib/erl_docgen/priv/css/otp_doc.css @@ -66,7 +66,7 @@ a:visited { color: blue; text-decoration: none } span.bold_code { font-family: Courier, monospace; font-weight: bold } span.code { font-family: Courier, monospace; font-weight: normal } -.note, .warning { +.note, .warning, .do, .dont { border: solid black 1px; margin: 1em 3em; } @@ -96,6 +96,32 @@ span.code { font-family: Courier, monospace; font-weight: normal } font-size: 90%; padding: 5px 10px; } +.do .label { + background: #30d42a; + color: white; + font-weight: bold; + padding: 5px 10px; +} +.do .content { + background: #eafeea; + color: black; + line-height: 120%; + font-size: 90%; + padding: 5px 10px; +} +.dont .label { + background: #C00; + color: white; + font-weight: bold; + padding: 5px 10px; +} +.dont .content { + background: #FFF0F0; + color: black; + line-height: 120%; + font-size: 90%; + padding: 5px 10px; +} .example { background-color:#eeeeff; padding: 0px 10px; diff --git a/lib/erl_docgen/priv/dtd/application.dtd b/lib/erl_docgen/priv/dtd/application.dtd index 8a1e8832ec..fcadaced72 100644 --- a/lib/erl_docgen/priv/dtd/application.dtd +++ b/lib/erl_docgen/priv/dtd/application.dtd @@ -24,6 +24,6 @@ %common.header; - + diff --git a/lib/erl_docgen/priv/dtd/book.dtd b/lib/erl_docgen/priv/dtd/book.dtd index bb89a6d255..ef723a9eed 100644 --- a/lib/erl_docgen/priv/dtd/book.dtd +++ b/lib/erl_docgen/priv/dtd/book.dtd @@ -38,7 +38,7 @@ - + @@ -67,7 +67,7 @@ - + diff --git a/lib/erl_docgen/priv/dtd/chapter.dtd b/lib/erl_docgen/priv/dtd/chapter.dtd index eb2c96b04f..4beff6cc54 100644 --- a/lib/erl_docgen/priv/dtd/chapter.dtd +++ b/lib/erl_docgen/priv/dtd/chapter.dtd @@ -29,8 +29,8 @@ - diff --git a/lib/erl_docgen/priv/dtd/common.dtd b/lib/erl_docgen/priv/dtd/common.dtd index f999ef8ea4..92d814e0f1 100644 --- a/lib/erl_docgen/priv/dtd/common.dtd +++ b/lib/erl_docgen/priv/dtd/common.dtd @@ -34,6 +34,8 @@ + + diff --git a/lib/erl_docgen/priv/dtd/common.refs.dtd b/lib/erl_docgen/priv/dtd/common.refs.dtd index 93592607df..a08b9e89d4 100644 --- a/lib/erl_docgen/priv/dtd/common.refs.dtd +++ b/lib/erl_docgen/priv/dtd/common.refs.dtd @@ -24,7 +24,7 @@ %common.header; - + @@ -34,12 +34,12 @@ name_i CDATA #IMPLIED> - + + warning|note|dont|do)*) > diff --git a/lib/erl_docgen/priv/dtd/part.dtd b/lib/erl_docgen/priv/dtd/part.dtd index 3f97199042..79f68c415d 100644 --- a/lib/erl_docgen/priv/dtd/part.dtd +++ b/lib/erl_docgen/priv/dtd/part.dtd @@ -24,6 +24,6 @@ %common.header; - + diff --git a/lib/erl_docgen/priv/dtd/report.dtd b/lib/erl_docgen/priv/dtd/report.dtd index 3d07e6e5a7..eb463f8867 100644 --- a/lib/erl_docgen/priv/dtd/report.dtd +++ b/lib/erl_docgen/priv/dtd/report.dtd @@ -48,7 +48,7 @@ @@ -58,6 +58,8 @@ + + diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index ab5f24c406..3b390f48fb 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -952,6 +952,36 @@ + + + +
+
Do
+
+

+ + + +

+
+
+
+ + + + +
+
Don't
+
+

+ + + +

+
+
+
+

diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl index 3bcdd11c35..0caaba560f 100644 --- a/lib/erl_docgen/priv/xsl/db_man.xsl +++ b/lib/erl_docgen/priv/xsl/db_man.xsl @@ -543,7 +543,29 @@ - + + + .LP + .RS -4 + .B + Do: + .RE + + + + + + + .LP + .RS -4 + .B + Dont: + .RE + + + + + diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl index c15b16eb5b..8e7ffddefa 100644 --- a/lib/erl_docgen/priv/xsl/db_pdf.xsl +++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl @@ -1138,6 +1138,31 @@ + + + + + + Do: + + + + + + + + + + + + + Don't: + + + + + + diff --git a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl index 2e3b22acf4..c2d9fb4320 100644 --- a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl +++ b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl @@ -289,6 +289,33 @@ always + + #d0fed0 + 1em + 2em + justify + 1em + 0.3em + 0.5em + 0.5em + 0.5em + 0.5em + always + + + + #ffd6d6 + 1em + 2em + justify + 1em + 0.3em + 0.5em + 0.5em + 0.5em + 0.5em + always + 1.33em -- cgit v1.2.3