OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] CSS for DocBook 5 example


This is short example of what I use when writing a software manual


manual.css - The core CSS file, which includes ..
phphl.css - To style hilghlighted PHP source


I also use some different graphics for the admonitions but I have not included them in this reply in order to keep the list reply small. Contact me directly via mail and I can send you the admonition graphics as well.


In addition I use the following setting for xsltproc in order to reduce the numerous TOCs and get the numbering schema I prefer



--stringparam section.autolabel 1
--stringparam section.autolabel.max.depth 2
--stringparam section.label.includes.component.label 1
--stringparam part.autolabel I
--stringparam generate.section.toc.level 0
--stringparam toc.max.depth 2


Not everything is styled in these CSS sheets, just what I normally use.


Rgds
Johan


On the 2009-05-15 you wrote:
> Are there one or two simple cascading stylesheets that are particularly good
> for demonstrating how CSS can style DocBook output? I see the small example
> in Stayton's book, p. 71, but have been looking around for other choices and
> have found a lot of stuff that's really outdated or otherwise not quite
> right. I'd prefer something that can be used with one of the default
> stylesheets and just pretties it up a little (this is for a demo next week).
>
> Thanks
> --
> --
> | Karen G. Schneider
> | Community Librarian
> | Equinox Software Inc. "The Evergreen Experts"
> | Toll-free: 1.877.Open.ILS (1.877.673.6457) x712
> | kgs@esilibrary.com
> | Web: http://www.esilibrary.com
> | Be a part of the Evergreen International Conference, May 20-22, 2009!
> | http://www.lyrasis.org/evergreen
>

/**
 * CSS file for syntax highlightning together with Text_Highlighter
 * $Id: phphl.css 1174 2009-05-01 11:11:12Z ljp $
 */
.hl-default {
    color: #000;
}
.hl-code {
    color: #808080;
}
.hl-brackets {
    color: #808000;
}
.hl-comment {
    color: #777;
    font-style: italic;
}
.hl-quotes {
    color: #8B0000;
}
.hl-string {
    color: #F00;
}
.hl-identifier {
    color: #00F;
}
.hl-builtin {
    color:   #008080;
}
.hl-reserved {
    color:   #008000;
}
.hl-inlinedoc {
    color:   #483D8B;
}
.hl-var {
    color:   #00008B;
}
.hl-url {
    color: #00F;
}
.hl-special {
    color:   #000080;
}
.hl-number {
    color: #800000;
}
.hl-inlinetags {
    color: #00F;
}
.hl-main { 
    margin-right: 10px;
    margin-left: 15px;
    font-size: 0.80em;
    background-color: #f9f9f9;
}
.hl-gutter {
    background-color: #999999;
    color: White;
    width: 30px;
    font-size: 0.80em;
    border: solid 0px red;  
    padding-right:3px;
}
.hl-table {
    font-family: courier;
    border: dashed 1px gray;  
    background-color: #f9f9f9;
}
/**
 * DocBook CSS Stylesheet for producing the JpGraph HTML manual
 * 
 * Version: $Id$
 *
 */

@import "phphl.css";

/* This is reserved for the part header */
h1 {
    font-size: 1.7em;
    font-weight: bold;
    color: white;
    background-color: #3780aE;
    border:2px solid  #17608E;
    margin-left: 0px;
    margin-bottom: 15px;
    margin-top: 0px;
    padding-left: 5px;
    padding-right: 5px;
    padding-bottom: 15px;
    padding-top: 15px;
}
/* This is reserved for the chapter header */
h2 {
    font-size: 1.8em;
    font-weight: bold;
    font-variant: small-caps;
    color: #555;
    /*color: #a85;*/
    line-height: 1.7em;
    margin: 15px 0 15px 0;
    border-bottom: 1px solid #cbb;
    /*border-bottom: 2px solid #a85;*/
}

/* This is reserved for the sect1 header */
div[class=sect1] h2 {
    font-size: 1.4em;
    font-weight: normal;
    /*font-variant: small-caps;*/
    color: #555;
    line-height: 1.7em;
    margin: 15px 0 15px 0;
    border-bottom: none;
}

/* This is used for generic h3 header, e.g. sect2 */
h3 {
    font-size: 1.33em;
    font-weight: normal;
    color: #555;
    text-align: left;
    padding-left: 15px;
}
/* This is used for generic h3 header, e.g. sect3 */
h4 {
    font-size: 1em;
    font-weight: bold;
    padding-left: 15px;
}

filename, .option {
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
}
.guimenu, .guimenuitem {
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
    padding: 0 3px;
    background-color:#FF7;
}
.classname {
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
    font-weight:bold;
}
.methodname {
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
    font-weight:bold;
}
.command {
    font-weight: bold;
}
.parameter {
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
}
.envar {
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
    font-weight:bold;
}
.function {
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
}
.variablelist {
    margin-left: 15px;
}
.variablelist td {
    font-size: 1em;
}
.variablelist th {
    font-size: 1em;
}
.screen {
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
    padding: 5px;
    overflow: hidden;
}
.synopsis {
    padding-left: 5px;
    font-family: "Bitstream Vera Sans Mono", Courier, monospace;
    background-color: #fef3c1;
}

.important {
    margin-top: 10px;
    margin-bottom: 10px;
}

div.mediaobject {
    margin-top: 15px;
    margin-bottom: 15px;
}

.mediaobject img {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Admonitions */
.note,
.tip {
    background-color: #F8F7EF;
    padding-bottom: 2px;
    margin-bottom:10px;
    padding-left:60px;
    border-left:6px solid #56a;
    background-image: url("admon-note.png");
    background-position: 6px 0.5em;
    background-repeat: no-repeat;
}

.tip h3,
.note h3 {
    padding-top: 4px;
    background-color: #F8F7EF;
    color:#56a;
    font-weight: bold;
    font-style: italic;
    font-size: 1.05em;
}

.tip {
    background-image: url("admon-tip.png");
}

.note p,
.tip p,
.caution p,
.warning p {
    font-size: .85em;
    font: italic .85em Georgia, serif;
}

.caution,
.warning {
    background-color: #F8F7EF;
    padding-bottom: 2px;
    margin-bottom:10px;
    padding-left:60px;
    border-left:6px solid #D55C21;
    background-image: url("admon-warning.png");
    background-position: 6px 0.5em;
    background-repeat: no-repeat;
}

.caution h3,
.warning h3 {
    padding-top: 4px;
    color: #922;
    font-weight: bold;
    font-style: italic;
    font-size: 1.05em;
}


.warning {
    background-image: url("admon-bug2_small.png");
}


.important {
    background-color: #f18b8b;
}

.important h1 {
    background-color: #f18b8b;
}

.important .important_content {
    background-color: #f8cbcb;
    border-left: 4px solid #f18b8b;
    border-right: 4px solid #f18b8b;
    border-bottom: 4px solid #f18b8b;
    padding: 5px 0;
}


.screenshot {
    margin: 10px;
    text-align: center;
}
.variablelist {
    margin-left: 15px;
    margin-right: 15px;
}

p, .synopsis, .example, .important, .formaltable {
    margin: 0 15px 1em 15px;
}

a:hover {
    border-bottom: 1px solid gray;
}

a, a:visited {
    color: #000055;
    font-weight: normal;
    text-decoration: none;
}

.example {
	background: #fff;
	border: none;
	margin-left: 0px;
	margin-right: 15px;
}

.example p.title,
.figure p.title{
    font-size: 0.85em;
}

.example-contents {
    background-color: #fff;
    padding: 2px;
}

.programlisting {
	padding: 1ex;
	background-color: #eee;
	border: 1px dashed #ccc;
    margin-left:10px;
    margin-right:15px;
    white-space: normal;
    overflow : hidden; 
}

.figure {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}


/*
.titlepage h2.title {
   font-weight:bold;
}
*/

/* TOC */

.toc span.preface {
    padding-left: 15px;
    font: bold 1.05em Arial, serif;
    font-style: italic;
}


.toc span.part {
    padding-left: 15px;
    font: bold 1.3em Arial, serif;
}

span.chapter {
    padding-left: 15px;
    font: normal 1.05em Arial, serif;
}

span.sect1 {
    padding-left: 15px;
    font-size: .85em;
    font: normal .85em Georgia, serif;

}

div.toc {
    background-color:#efeedd;
    border:1px solid #cebcac;
    padding-bottom:2px;
    padding-top:10px;
    margin-bottom:15px;
}

span.sect2 {
    padding-left: 15px;
    font-size: .85em;
    font: normal .85em Georgia, serif;

}



.toc b {
    font-size: 1.5em;
    color:#555;
}

div.list-of-examples  {
    padding-top:10px;
    padding-bottom:5px;
    background-color:#e5ded2; 
    background-color:#efeedd;
    border:1px solid #c5beb2; 
    margin-bottom: 15px;
}

div.list-of-examples dl {
    margin-left: 25px;
}

div.list-of-figures  {
    padding-top:10px;
    padding-bottom:5px;
    background-color:#e5ded2; 
    background-color:#efeedd;
    border:1px solid #c5beb2; 
    margin-bottom: -1px;
    margin-top: -16px;
}

div.list-of-figures dl {
    margin-left: 25px;
}

div.navheader {
    background-color:#ebf1e8;
}

div.navfooter {
    background-color:#ebf1e8;
}

div.navheader td {
    font-size:0.85em;
}

div.navfooter td {
    font-size:0.85em;
}



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]