diff --git a/doc/compile-doc.py b/doc/compile-doc.py index 9e152cb..0a551e5 100755 --- a/doc/compile-doc.py +++ b/doc/compile-doc.py @@ -49,8 +49,12 @@ directives.register_directive('sourcecode', pygments_directive) # ======================================== from docutils.core import publish_cmdline, default_description - description = ('Generates (X)HTML documents from standalone reStructuredText ' 'sources. ' + default_description) +overrides = {'stylesheet_path' : 'styles.css', + 'embed_stylesheet' : False, + 'template' : 'doc/template.txt'} -publish_cmdline(writer_name='html', description=description) +publish_cmdline(writer_name='html', + description=description, + settings_overrides=overrides) diff --git a/doc/html4css1.css b/doc/html4css1.css new file mode 100644 index 0000000..bf10767 --- /dev/null +++ b/doc/html4css1.css @@ -0,0 +1,279 @@ +/* +:Author: David Goodger +:Contact: goodger@users.sourceforge.net +:Date: $Date: 2005-12-18 01:56:14 +0100 (Sun, 18 Dec 2005) $ +:Revision: $Revision: 4224 $ +:Copyright: This stylesheet has been placed in the public domain. + +Default cascading style sheet for the HTML output of Docutils. + +See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to +customize this style sheet. +*/ + +/* used to remove borders from tables and images */ +.borderless, table.borderless td, table.borderless th { + border: 0 } + +table.borderless td, table.borderless th { + /* Override padding for "table.docutils td" with "! important". + The right padding separates the table cells. */ + padding: 0 0.5em 0 0 ! important } + +.first { + /* Override more specific margin styles with "! important". */ + margin-top: 0 ! important } + +.last, .with-subtitle { + margin-bottom: 0 ! important } + +.hidden { + display: none } + +a.toc-backref { + text-decoration: none ; + color: black } + +blockquote.epigraph { + margin: 2em 5em ; } + +dl.docutils dd { + margin-bottom: 0.5em } + +/* Uncomment (and remove this text!) to get bold-faced definition list terms +dl.docutils dt { + font-weight: bold } +*/ + +div.abstract { + margin: 2em 5em } + +div.abstract p.topic-title { + font-weight: bold ; + text-align: center } + +div.admonition, div.attention, div.caution, div.danger, div.error, +div.hint, div.important, div.note, div.tip, div.warning { + margin: 2em ; + border: medium outset ; + padding: 1em } + +div.admonition p.admonition-title, div.hint p.admonition-title, +div.important p.admonition-title, div.note p.admonition-title, +div.tip p.admonition-title { + font-weight: bold ; + font-family: sans-serif } + +div.attention p.admonition-title, div.caution p.admonition-title, +div.danger p.admonition-title, div.error p.admonition-title, +div.warning p.admonition-title { + color: red ; + font-weight: bold ; + font-family: sans-serif } + +/* Uncomment (and remove this text!) to get reduced vertical space in + compound paragraphs. +div.compound .compound-first, div.compound .compound-middle { + margin-bottom: 0.5em } + +div.compound .compound-last, div.compound .compound-middle { + margin-top: 0.5em } +*/ + +div.dedication { + margin: 2em 5em ; + text-align: center ; + font-style: italic } + +div.dedication p.topic-title { + font-weight: bold ; + font-style: normal } + +div.figure { + margin-left: 2em ; + margin-right: 2em } + +div.footer, div.header { + clear: both; + font-size: smaller } + +div.line-block { + display: block ; + margin-top: 1em ; + margin-bottom: 1em } + +div.line-block div.line-block { + margin-top: 0 ; + margin-bottom: 0 ; + margin-left: 1.5em } + +div.sidebar { + margin-left: 1em ; + border: medium outset ; + padding: 1em ; + background-color: #ffffee ; + width: 40% ; + float: right ; + clear: right } + +div.sidebar p.rubric { + font-family: sans-serif ; + font-size: medium } + +div.system-messages { + margin: 5em } + +div.system-messages h1 { + color: red } + +div.system-message { + border: medium outset ; + padding: 1em } + +div.system-message p.system-message-title { + color: red ; + font-weight: bold } + +div.topic { + margin: 2em } + +h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, +h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { + margin-top: 0.4em } + +h1.title { + text-align: center } + +h2.subtitle { + text-align: center } + +hr.docutils { + width: 75% } + +img.align-left { + clear: left } + +img.align-right { + clear: right } + +ol.simple, ul.simple { + margin-bottom: 1em } + +ol.arabic { + list-style: decimal } + +ol.loweralpha { + list-style: lower-alpha } + +ol.upperalpha { + list-style: upper-alpha } + +ol.lowerroman { + list-style: lower-roman } + +ol.upperroman { + list-style: upper-roman } + +p.attribution { + text-align: right ; + margin-left: 50% } + +p.caption { + font-style: italic } + +p.credits { + font-style: italic ; + font-size: smaller } + +p.label { + white-space: nowrap } + +p.rubric { + font-weight: bold ; + font-size: larger ; + color: maroon ; + text-align: center } + +p.sidebar-title { + font-family: sans-serif ; + font-weight: bold ; + font-size: larger } + +p.sidebar-subtitle { + font-family: sans-serif ; + font-weight: bold } + +p.topic-title { + font-weight: bold } + +pre.address { + margin-bottom: 0 ; + margin-top: 0 ; + font-family: serif ; + font-size: 100% } + +pre.literal-block, pre.doctest-block { + margin-left: 2em ; + margin-right: 2em ; + background-color: #eeeeee } + +span.classifier { + font-family: sans-serif ; + font-style: oblique } + +span.classifier-delimiter { + font-family: sans-serif ; + font-weight: bold } + +span.interpreted { + font-family: sans-serif } + +span.option { + white-space: nowrap } + +span.pre { + white-space: pre } + +span.problematic { + color: red } + +span.section-subtitle { + /* font-size relative to parent (h1..h6 element) */ + font-size: 80% } + +table.citation { + border-left: solid 1px gray; + margin-left: 1px } + +table.docinfo { + margin: 2em 4em } + +table.docutils { + margin-top: 0.5em ; + margin-bottom: 0.5em } + +table.footnote { + border-left: solid 1px black; + margin-left: 1px } + +table.docutils td, table.docutils th, +table.docinfo td, table.docinfo th { + padding-left: 0.5em ; + padding-right: 0.5em ; + vertical-align: top } + +table.docutils th.field-name, table.docinfo th.docinfo-name { + font-weight: bold ; + text-align: left ; + white-space: nowrap ; + padding-left: 0 } + +h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, +h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { + font-size: 100% } + +tt.docutils { + background-color: #eeeeee } + +ul.auto-toc { + list-style-type: none } diff --git a/doc/images/bg-content-left.png b/doc/images/bg-content-left.png new file mode 100644 index 0000000..a64b346 Binary files /dev/null and b/doc/images/bg-content-left.png differ diff --git a/doc/images/bg-content-right.png b/doc/images/bg-content-right.png new file mode 100644 index 0000000..f07ebb5 Binary files /dev/null and b/doc/images/bg-content-right.png differ diff --git a/doc/images/bg-content.png b/doc/images/bg-content.png new file mode 100644 index 0000000..d55828e Binary files /dev/null and b/doc/images/bg-content.png differ diff --git a/doc/images/bg-navigation-item-hover.png b/doc/images/bg-navigation-item-hover.png new file mode 100644 index 0000000..c783d71 Binary files /dev/null and b/doc/images/bg-navigation-item-hover.png differ diff --git a/doc/images/bg-navigation-item.png b/doc/images/bg-navigation-item.png new file mode 100644 index 0000000..d2452ac Binary files /dev/null and b/doc/images/bg-navigation-item.png differ diff --git a/doc/images/bg-navigation.png b/doc/images/bg-navigation.png new file mode 100644 index 0000000..18b9559 Binary files /dev/null and b/doc/images/bg-navigation.png differ diff --git a/doc/images/body.png b/doc/images/body.png new file mode 100644 index 0000000..b361e7b Binary files /dev/null and b/doc/images/body.png differ diff --git a/doc/images/external.png b/doc/images/external.png new file mode 100644 index 0000000..419c06f Binary files /dev/null and b/doc/images/external.png differ diff --git a/doc/index.rst b/doc/index.rst index ddf0dd5..74aebdc 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,6 +1,6 @@ -=================================================== -YASnippet - Yet Another Snippet extension for Emacs -=================================================== +============================= +Yet Another Snippet extension +============================= :Author: pluskid :Contact: pluskid@gmail.com diff --git a/doc/styles.css b/doc/styles.css new file mode 100644 index 0000000..fad0240 --- /dev/null +++ b/doc/styles.css @@ -0,0 +1,141 @@ +/* Base stylesheet from Docutils distribution */ +@import url(html4css1.css); + +/* Theme stylesheet */ +body { + background: #EDF5FA; + margin: 0; + padding: 0; +} +.clear-block { + display: block; +} +#header-region { + background: #D2E6F3 url(images/bg-navigation.png) repeat-x scroll 50% 100%;; + min-height: 1em; +} +#wrapper { + background: #EDF5FA url(images/body.png) repeat-x scroll 50% 0pt; +} +#container { + margin: 0pt auto; + padding: 0pt 20px; +} +#header { + height: 80px; +} +#sidebar-left { + float: left; + margin: 60px 0pt 5em; + position: relative; + width: 210px; + z-index: 2; +} +#center #squeeze { + background: #FFFFFF url(images/bg-content.png) repeat-x scroll 50% 0pt; + position: relative; +} +#center .right-corner { + background: transparent url(images/bg-content-right.png) no-repeat scroll 100% 0pt; + left: 10px; + position: relative; +} +#center .left-corner { + background: transparent url(images/bg-content-left.png) no-repeat scroll 0pt 0pt; + left: -10px; + margin-left: -10px; + min-height: 400px; + padding: 60px 25px 5em 35px; + position: relative; +} +ul.primary-links { + float: right; + margin: 0px; + padding: 0px; + position: relative; + z-index: 4; +} +ul.primary-links li { + list-style-type: none; + float: left; + margin: 0px; + padding: 0px; +} +ul.primary-links li a { + background: transparent url(images/bg-navigation-item.png) no-repeat scroll 50% 0pt; + color: #FFFFFF; + display: block; + margin: 0pt 1em; + padding: 0.75em 0pt 0pt; +} +ul.primary-links li a:hover { + background: transparent url(images/bg-navigation-item-hover.png) no-repeat scroll 50% 0pt; +} +#logo-floater { + position: absolute; + color: #FFFFFF; + height: 80px; + font-weight: normal; + text-shadow: #1659AC 0px 1px 3px; +} +#logo-floater h1 { + margin-top: 25px; + margin-left: 10px; + font-family: Georgia, Serif; +} + +/* Contents stylesheet */ +body { + font-family: Georgia, Serif; +} +#contents { + margin-right: 0; + width: 340px; + overflow: hidden; + float: right; +} +#contents p.topic-title { + margin: 0 0 0 18px; +} +#contents ul.simple { + margin: 5px 0 5px 5px; + padding: 2px 0 8px 30px; + border-left: 1px solid #E0E5FB; +} +a { + color: #027AC6; + text-decoration: none; +} +a:hover { + color: #0062A0; + text-decoration: underline; +} +a.toc-backref:hover { + color: #000000; +} +a.external { + padding-right: 13px; + background: transparent url(images/external.png) no-repeat scroll right center; +} + +tt.docutils { + background-color: #EAFFEA; + font-family: Monaco, Consolas, Courier New, Monospace; +} + +div.highlight { + margin: 5px 40px 5px 15px; + overflow: auto; + padding: 0; + background: #F7F7F7; + border: 1px solid #E0E5FB; +} +div.highlight pre { + margin: 8px 15px 8px 15px; + font-family: Monaco, Consolas, Courier New, Monospace; + font-size: 0.9em; + line-height: 1.2em; +} +img { + margin: 8px; +} \ No newline at end of file diff --git a/doc/template.txt b/doc/template.txt new file mode 100644 index 0000000..821246b --- /dev/null +++ b/doc/template.txt @@ -0,0 +1,38 @@ +%(head_prefix)s +%(head)s +%(stylesheet)s +%(body_prefix)s +
+
+
+ +
+
+
+
+ %(body)s +
+
+
+
+
+
+%(body_suffix)s diff --git a/yasnippet.el b/yasnippet.el index b257573..98c3958 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -3,7 +3,7 @@ ;; Copyright 2008 pluskid ;; ;; Author: pluskid -;; Version: 0.5.0 +;; Version: 0.5.1 ;; X-URL: http://code.google.com/p/yasnippet/ ;; This file is free software; you can redistribute it and/or modify @@ -178,7 +178,7 @@ to expand. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Internal variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defvar yas/version "0.5.0") +(defvar yas/version "0.5.1") (defvar yas/snippet-tables (make-hash-table) "A hash table of snippet tables corresponding to each major-mode.")