--- /dev/null
+/**********************************************************/
+/* PAGE-WIDE SETTINGS */
+/**********************************************************/
+
+html {
+ height: 100%;
+}
+
+body {
+ background-color: white;
+ color: black;
+ font-size: 80%;
+ height: 100%;
+ line-height: 1.25em;
+ margin: 0 auto;
+ padding: 0;
+}
+
+
+/***********************************************************/
+/* HEADERS */
+/***********************************************************/
+
+.chapter, .section, .subsection,
+.appendix, .appendixsec, .appendixsubsec,
+.unnumberedsubsubsec, .subsubheading,
+.unnumbered, .subheading {
+ border-bottom: 1px dashed black;
+ color: #204a87;
+ padding-bottom: 0.4em;
+ margin-bottom: 1em;
+ margin-top: 1em;
+}
+
+.settitle {
+ background-color: #eef;
+ border-bottom: 1px solid #3465A4;
+ font-size: 2em;
+ margin: 0.25em 0 0 0;
+ padding: 0.75em;
+ text-align: center;
+}
+
+.chapter {
+ font-size: 1.8em;
+}
+
+.section {
+ font-size: 1.6em;
+}
+
+.subsection {
+ font-size: 1.4em;
+}
+
+.unnumberedsubsubsec {
+ font-size: 1.25em;
+}
+
+.subsubheading {
+ font-size: 1em;
+ font-weight: bold;
+}
+
+/***********************************************************/
+/* LINKS */
+/***********************************************************/
+
+a:link {
+ /* color: #4169e1; */
+ /* color: #3555b6; */
+ color: #3465a4;
+}
+
+a:visited {
+ color: #8f5902;
+}
+
+a:hover {
+ color: #ce5c00;
+}
+
+a:active {
+ color: #73d216;
+}
+
+/***********************************************************/
+/* BLOCK FORMATTING */
+/***********************************************************/
+
+blockquote {
+ border: thin solid #3465a4;
+ border-width: 0 0 0 2px;
+ margin: 1em 0 1em 3em;
+ padding: 0;
+}
+
+blockquote p {
+ margin: 0;
+ padding: 1em;
+}
+
+blockquote blockquote {
+ border: thick red dashed;
+}
+
+.verbatim, .example .example, .lisp {
+ font-size: 1em;
+ margin: 0;
+ padding: 1em;
+}
+
+.example {
+ padding: 0;
+ margin: 0;
+}
+
+hr {
+ height: 0;
+ padding: 0;
+ border: 0;
+ margin: 0;
+ text-indent: -999em;
+}
+
+table.cartouche {
+ background: #eee;
+ border: 1px solid #3465a4;
+ border-width: 1px 0;
+ width: 85%;
+ padding: 0 0.5em;
+ margin: 0 auto;
+}
+
+table.cartouche p {
+ padding: 1em;
+ margin: 0;
+}
+
+table.cartouche td {
+ border: none;
+}
+
+/***********************************************************/
+/* MAIN CONTENT */
+/***********************************************************/
+
+div#main {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 27%;
+ padding: 0;
+ margin: 0;
+ overflow: auto;
+}
+
+div#main li {
+ padding: 0 1em 0.5em 0;
+}
+
+div#main ul {
+ margin: 0;
+}
+
+h1, h2, h3, h4, p, table, address, dt {
+ padding-left: 1em;
+ padding-right: 1em;
+}
+
+p {
+ margin: 1em 0;
+}
+
+#languages {
+ margin: 0;
+ padding: 1em;
+}
+
+pre.menu-comment {
+ font-size: 1em;
+ padding-top: 1em;
+ padding-bottom: 0;
+ margin: 0;
+}
+
+/***********************************************************/
+/* TOC SIDEBAR */
+/***********************************************************/
+
+div#tocframe {
+ position: absolute;
+ top: 0;
+ right: 73%;
+ bottom: 0;
+ left: 0;
+ padding: 0;
+ margin: 0;
+ overflow: auto;
+ background-color: #f9f9ff;
+ z-index: 100;
+ list-style-type: none;
+ font-size: 0.83em;
+ line-height: 1.4em;
+}
+
+/* position: fixed for savvy browsers */
+
+@media screen {
+ body > div#tocframe {
+ position: fixed
+ }
+}
+
+/*
+#tocframe a:link, #tocframe a:visited {
+ text-decoration: none;
+}
+
+#tocframe a:hover {
+ text-decoration: underline;
+}
+*/
+
+div#tocframe h4 {
+ font-size: 1.2em;
+ font-weight: normal;
+ color: #344;
+ background-color: #eef;
+ padding: 2px 0 1px 1em;
+ border-bottom: 1px solid #3465A4;
+ margin: 0;
+}
+
+#tocframe .contents {
+ background-color: transparent;
+ list-style-type: none;
+ padding: 0;
+ border: 0;
+ margin: 0;
+}
+
+#tocframe ul.toc {
+ padding: 1em 0.5em;
+ list-style-type: none;
+ margin: 0;
+}
+
+#tocframe ul.toc ul.toc {
+ padding: 0;
+ margin: 0;
+}
+
+#tocframe ul.toc li {
+ padding: 0;
+ margin: 0;
+}
+
+#tocframe ul.toc > li {
+ font-size: 1em;
+}
+
+#tocframe ul.toc li li {
+ padding-left: 1em;
+}
+
+li.toc_current {
+ font-weight: bold;
+ font-style: italic;
+}
+
+li.toc_current ul {
+ font-weight: normal;
+ font-style: normal;
+ background: transparent;
+}
+
+
+/***********************************************************/
+/* NAVIGATION */
+/***********************************************************/
+
+.nav_table {
+ background-color: #eef;
+ border: 1px solid #3465A4;
+ border-width: 0 0 1px 0;
+ font-size: 0.8em;
+ margin: 0;
+ padding: 0;
+ width: 100%;
+}
+
+div.header {
+ background-color: #be6;
+ text-align: center;
+ padding: 0.5em;
+ margin: 0;
+ height: auto;
+}
+
+div.header h1 {
+ padding: 0.5em;
+ margin: 0;
+}
+
+div.subheader {
+ background-color: #ddd;
+ padding: 0;
+ border-top: 5px solid #899;
+ border-bottom: 1px solid #9aa;
+ margin: 0;
+ text-align: center;
+}
+
+div.subheader p {
+ padding: 0.5em;
+ margin: 0;
+}
+
+table#navigation {
+ line-height: 1.5;
+ padding: 0;
+ margin: 1em auto;
+}
+
+table#navigation td {
+ padding: 0.5em 0.75em;
+}
+
+table#navigation ul {
+ padding-left: 0.5em;
+ margin-bottom: 1em;
+}
+
+table .title {
+ font-weight: bold;
+}
+
+.footer {
+ background-color: #fff;
+ border: none;
+ font-size: 0.8em;
+ text-indent: 1em;
+ padding: 1.5em 0;
+ margin: 0;
+}
+
+.footer p {
+ line-height: 1.5;
+ padding: 0;
+ margin: 0 0.25em;
+}
+
+table.menu {
+ margin: 0 0 1em;
+}
+
+/***********************************************************/
+/* OVERRIDES FOR PRINTING */
+/***********************************************************/
+
+@media print {
+ body { padding-left: 0; font: 10pt Georgia, Garamond, serif;}
+ /* Hide the sidebar: */
+ #tocframe { display: none; }
+ .nav_table { display: none; }
+ /* Let #main expand to fill the new space */
+ div#main { position: static; left: 0; }
+}
doctype = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n'
css_re = re.compile ('(?i)<link rel="stylesheet" type="text/css" ([^>]*)href="[^">]*?lilypond.*\.css"([^>]*)>')
end_head_tag_re = re.compile ('(?i)</head>')
-css_link = '<link rel="stylesheet" type="text/css" href="%sDocumentation/lilypond.css">\n'
+css_link = """ <link rel="stylesheet" type="text/css" title="Patrick McCarty's design" href="%(rel)sDocumentation/lilypond-mccarty.css">
+ <link rel="alternate stylesheet" type="text/css" href="%(rel)sDocumentation/lilypond.css" title="Andrew Hawryluk's design">
+ <link rel="alternate stylesheet" type="text/css" href="%(rel)sDocumentation/lilypond-blue.css" title="Kurt Kroon's blue design">
+ <!--[if lte IE 7]>
+ <link href="%(rel)sDocumentation/lilypond-ie-fixes.css" rel="stylesheet" type="text/css">
+ <![endif]-->
+"""
+
def add_header (s, prefix):
"""Add header (<body>, doctype and CSS)"""
if css_re.search (s) == None:
depth = (prefix.count ('/') - 1) * '../'
- s = end_head_tag_re.sub ((css_link % depth) + '</head>', s)
+ s = end_head_tag_re.sub ((css_link % {'rel': depth}) + '</head>', s)
return s
title_tag_re = re.compile ('.*?<title>(.*?)</title>', re.DOTALL)