﻿/* Complete DocBook 4.1 Stylesheet
   Brian Lalonde <brianiacus@yahoo.com>, 2002-02-14  */

/* titles */
title,bridgehead,conftitle { color: maroon; font-size: larger; font-weight: bold; }
subtitle { color: maroon; font-weight: bold; }
titleabbrev { color: maroon; }
set > title, setinfo > title { font-size: 4em; margin: 1em; }
book > title, bookinfo > title, setindex > title, setindexinfo > title { font-size: 3em; }
part > title, partinfo > title { font-size: 2.5em; }
appendix > title, appendixinfo > title, article > title, articleinfo > title, reference > title, 
referenceinfo > title,chapter > title, chapterinfo > title, glossary > title, glossaryinfo > title 
{ font-size: 2em; }
part > title:before, partinfo > title:before { content: "Part " counter(n-,upper-roman) "\A"; }
chapter > title:before, chapterinfo > title:before 
{ content: "Chapter " counter(n-,decimal) ": "; }
appendix > title:before, appendixinfo > title:before 
{ content: "Appendix " counter(n-,upper-alpha) ": "; }
section > title, sectioninfo > title, sect1 > title, sect1info > title 
{ font-size: 1.5em; margin: .83ex 0; }
section section > title, section section > sectioninfo > title, sect2 > title, sect2info > title 
{ font-size: 1.2em; margin: 1ex 0; }
sect3 > title, sect3info > title, sect4 > title, sect4info > title, sect5 > title, 
sect5info > title,section section section > title, section section section > sectioninfo > title,
section section * section > title, section section * section > sectioninfo > title 
{ font-size: 1em; margin: 1.33ex 0; }
section > title:before, sectioninfo > title:before, sect1 > title:before, sect1info > title:before 
{ content: counter(n-) " "; }
section section > title:before, section section > sectioninfo > title:before, sect2 > title:before, 
sect2info > title:before { content: counter(nn-) " "; }
section section section > title:before, section section section > sectioninfo > title:before, 
sect3 > title:before, sect3info > title:before { content: counter(nnn-) " "; }
section section section section > title:before, 
section section section section > sectioninfo > title:before, 
sect4 > title:before, sect4info > title:before { content: counter(nnnn-) " "; }
section section section * section > title:before, 
section section section * section > sectioninfo > title:before, sect5 > title:before, 
sect5info > title:before { content: ""; }
blockquote > title { font-style: italic; }
*[role=nocounters] title:before, *[condition=nocounters] title:before { content: "" !important; }

/* info */
appendixinfo,articleinfo,bibliographyinfo,bookinfo,chapterinfo,glossaryinfo,indexinfo,objectinfo,
partinfo,prefaceinfo,refentryinfo,referenceinfo,refsect1info,refsect2info,refsect3info,refsynopsisdivinfo,
screeninfo,sect1info,sect2info,sect3info,sect4info,sect5info,sectioninfo,setinfo,sidebarinfo,biblioentry,
bibliomixed,bibliomset,biblioset 
{ display: block; background-color: #EEF; border: thin solid blue; padding: .6ex; }
confgroup { border: thin solid blue; }
appendixinfo > title,articleinfo > title,bibliographyinfo > title,bookinfo > title,chapterinfo > title,
glossaryinfo > title,indexinfo > title,partinfo > title,objectinfo > title,prefaceinfo > title,
refentryinfo > title,referenceinfo > title,refsect1info > title,refsect2info > title,refsect3info > title,
refsynopsisdivinfo > title,screeninfo > title,sect1info > title,sect2info > title,sect3info > title,
sect4info > title,sect5info > title,sectioninfo > title,setinfo > title,sidebarinfo > title,
appendixinfo > subtitle,articleinfo > subtitle,bibliographyinfo > subtitle,bookinfo > subtitle,
chapterinfo > subtitle,glossaryinfo > subtitle,indexinfo > subtitle,partinfo > subtitle,
objectinfo > subtitle,prefaceinfo > subtitle,refentryinfo > subtitle,referenceinfo > subtitle,
refsect1info > subtitle,refsect2info > subtitle,refsect3info > subtitle,refsynopsisdivinfo > subtitle,
screeninfo > subtitle,sect1info > subtitle,sect2info > subtitle,sect3info > subtitle,sect4info > subtitle,
sect5info > subtitle,sectioninfo > subtitle,setinfo > subtitle,sidebarinfo > subtitle,
appendixinfo > titleabbrev,articleinfo > titleabbrev,bibliographyinfo > titleabbrev,
bookinfo > titleabbrev,chapterinfo > titleabbrev,glossaryinfo > titleabbrev,indexinfo > titleabbrev,
partinfo > titleabbrev,objectinfo > titleabbrev,prefaceinfo > titleabbrev,refentryinfo > titleabbrev,
referenceinfo > titleabbrev,refsect1info > titleabbrev,refsect2info > titleabbrev,
refsect3info > titleabbrev,refsynopsisdivinfo > titleabbrev,screeninfo > titleabbrev,
sect1info > titleabbrev,sect2info > titleabbrev,sect3info > titleabbrev,sect4info > titleabbrev,
sect5info > titleabbrev,sectioninfo > titleabbrev,setinfo > titleabbrev,sidebarinfo > titleabbrev,
biblioentry > title,bibliomixed > title,bibliomset > title, biblioset > title,biblioentry > subtitle, 
bibliomixed > subtitle, bibliomset > subtitle, biblioset > subtitle,biblioentry > titleabbrev, 
bibliomixed > titleabbrev, bibliomset > titleabbrev, biblioset > titleabbrev { margin-left: 0; }
appendixinfo > *,articleinfo > *,bibliographyinfo > *,bookinfo > *,chapterinfo > *,glossaryinfo > *,
indexinfo > *,objectinfo > *,partinfo > *,prefaceinfo > *,refentryinfo > *,referenceinfo > *,refsect1info > *,
refsect2info > *,refsect3info > *,refsynopsisdivinfo > *,screeninfo > *,sect1info > *,sect2info > *,
sect3info > *,sect4info > *,sect5info > *,sectioninfo > *,setinfo > *,sidebarinfo > *, authorgroup > *,
biblioentry > *,bibliomixed > *,bibliomset > *,biblioset > * { display: block; margin-left: 12ex; }
author:before, corpauthor:before, abbrev:before, abstract:before, artpagenums:before, authorgroup:before, 
collab:before, confgroup:before, contractnum:before, contractsponsor:before, copyright:before, corpname:before, 
date:before, edition:before, editor:before, invpartnumber:before, isbn:before, issn:before, issuenum:before, 
itermset:before, keywordset:before, legalnotice:before, orgname:before, othercredit:before, 
pagenums:before, printhistory:before, productname:before, productnumber:before, pubdate:before, 
publisher:before, releaseinfo:before, revhistory:before, seriesvolnums:before, subjectset:before, 
volumenum:before { color: blue; display: marker; font-size: small; }
author:before { content: "Author: "; }
corpauthor:before { content: "Corp. Author: "; }
abbrev:before { content: "Abbrev: "; }
abstract:before { content: "Abstract: "; }
artpagenums:before { content: "Art. Pages: "; }
authorgroup:before { content: "Authors: "; }
collab:before { content: "Collaborator: "; }
confgroup:before { content: "Conference: "; }
contractnum:before { content: "Contract: "; }
contractsponsor:before { content: "Sponsor: "; }
copyright:before { content: "Copyright: "; }
corpname:before { content: "Corporation: "; }
date:before { content: "Date: "; }
edition:before { content: "Edition: "; }
editor:before { content: "Editor: "; }
invpartnumber:before { content: "Inv. Part# "; }
isbn:before { content: "ISBN: "; }
issn:before { content: "ISSN: "; }
issuenum:before { content: "Issue: "; }
itermset:before { content: "Index Terms: "; }
keywordset:before { content: "Keywords: "; }
legalnotice:before { content: "Legal Notice: "; }
orgname:before { content: "Organization: "; }
othercredit:before { content: "Credit: "; }
pagenums:before { content: "Pages: "; }
printhistory:before { content: "Printings: "; }
productname:before { content: "Product: "; }
productnumber:before { content: "Product # "; }
pubdate:before { content: "Publish Date: "; }
publisher:before { content: "Publisher: "; }
releaseinfo:before { content: "Rel. Info: "; }
revhistory:before { content: "Revisions: "; }
seriesvolnums:before { content: "Vols: "; }
subjectset:before { content: "Subjects: "; }
volumenum:before { content: "Vol: "; }
year:after { content: " "; }
affiliation > *:before, author > *:before, authorgroup > *:before { content: "" !important; }
itermset > indexterm:first-child:before { content: ""; }
itermset > indexterm:before { content: ", "; }
itermset > indexterm:after { content: ""; }
itermset > indexterm { color: inherit; }
keywordset { display: block; }
keyword:first-child:before { content: ""; }
keyword:before { content: ", "; }
authorinitials:before, revision > date:before, revremark:before { content: ", "; }
revdescription { margin: 0 0 1ex 3ex; padding: 0; }
revdescription > *:first-child { margin-top: 0; margin-bottom: 0; }
secondary:before,tertiary:before { content: "/"; }
see:before { content: " see "; color: olive; }
seealso:before { content: " see also "; color: olive; }
subject:first-child:before { content: ""; }
subject:before { content: ", "; }
subjectterm:first-child:before { content: ""; }
subjectterm:before { content: "/"; }

/* media */
mediaobject,mediaobjectco { display: table; }
inlinemediaobject { display: inline-table; }
audioobject,imageobject,textobject,videoobject { display: table-cell; }
figure, mediaobject { text-align: center; margin: 1.33ex auto; }
figure > title, caption { font-style: italic; }
audiodata { content: "[audio]"; color: olive; }
videodata { content: "[video]"; color: olive; }
graphic,imagedata,inlinegraphic { content: image(attr(fileref),-400,-200); }
graphic { margin-left: auto; margin-right: auto; }

/* tables */
table,informaltable { display: table; margin: 1.2ex 0; }
segmentedlist { display: table; margin: 1.2ex 0; }
segmentedlist > title { display: table-caption; }
table > title { font-style: italic; text-align: center; margin: 0 2ex 2px; }
tgroup { display: table; border: thin outset gray; text-align: eval(attr(align)); }
colspec, spanspec { display: table-column; }
thead, tbody, tfoot { display: table-row-group; vertical-align: eval(attr(valign)); }
row,seglistitem { display: table-row; vertical-align: eval(attr(valign)); }
segtitle { font-weight: bold; display: table-cell; }
seg { display: table-cell; border: thin inset gray; padding: 2; }
entry { display: table-cell; text-align: eval(attr(align)); vertical-align: eval(attr(valign)); 
  border: thin inset gray; padding: 2; }
entry > *:first-child, segtitle > *:first-child, seg > *:first-child { margin-top: 0; margin-bottom: 0; }
entrytbl { display: table; border: thin inset gray; padding: 2; }

/* lists */
area, co { content: icon(left-half-disc) counter(n) icon(right-half-disc); color: olive; }
callout { margin-left: 6ex; }
callout > *:first-child { margin-top: 0; margin-bottom: 0; }
synopfragment { margin-left: 2em; }
calloutlist > callout:before, synopfragment:before 
{ display: marker; content: icon(left-half-disc) counter(n) icon(right-half-disc); color: olive; }
caption > *:first-child,listitem > *:first-child,step > *:first-child { margin: 0 auto; }
itemizedlist { margin-left: 2ex; margin-top: 1.33ex; margin-bottom: 1.33ex; }
itemizedlist > listitem { margin-left: 2.5ex; }
itemizedlist > listitem:before { display: marker; content: disc; }
itemizedlist > listitem itemizedlist > listitem:before { display: marker; content: square; }
itemizedlist > listitem itemizedlist > listitem itemizedlist > listitem:before 
{ display: marker; content: icon(diamond); }
itemizedlist > listitem itemizedlist > listitem itemizedlist > listitem itemizedlist > listitem:before 
{ display: marker; content: circle; }
orderedlist,procedure { margin-left: 2ex; margin-top: 1.33ex; margin-bottom: 1.33ex; }
orderedlist > listitem, procedure > step, substeps > step { margin-left: 6ex; }
orderedlist > listitem:before, procedure > step:before 
{ display: marker; content: counter(n, decimal); font-weight: bold; }
orderedlist[numeration=loweralpha] > listitem:before, substeps > step:before 
{ display: marker; content: counter(n, lower-alpha); }
orderedlist[numeration=upperalpha] > listitem:before { display: marker; content: counter(n, upper-alpha); }
orderedlist[numeration=lowerroman] > listitem:before { display: marker; content: counter(n, lower-roman); }
orderedlist[numeration=upperroman] > listitem:before { display: marker; content: counter(n, upper-roman); }
qandaentry { margin-top: 1.33ex; margin-bottom: 1.33ex; }
question { font-style: italic; }
question,answer { margin-left: 4ex; }
question:before, answer:before { display: marker; color: olive; font-weight: bold; }
question:before { content: "Q:"; font-style: normal; }
answer:before { content: "A:"; }
label { color: olive; }
simplelist[type=horiz] > member, simplelist[type=vert] > member { display: block; margin-left: 2ex; }
simplelist[type=inline] > member:first-child:before { content: ""; }
simplelist[type=inline] > member:before { content: ", "; }
variablelist { margin-left: 2ex; margin-top: 1.33ex; margin-bottom: 1.33ex; }
varlistentry > term { font-weight: bold; }
varlistentry > listitem { margin-left: 4ex; }
question > *:first-child, answer > *:first-child { margin-top: 0; margin-bottom: 0; }

/* blocks */
ackno,address,affiliation,answer,appendix,areaset,areaspec,article,attribution,authorblurb,authorgroup,
beginpage,bibliodiv,biblioentry,bibliography,bibliomixed,bibliomset,biblioset,blockquote,book,
bridgehead,callout,calloutlist,caption,caution,chapter,classsynopsis,classsynopsisinfo,cmdsynopsis,
collab,colophon,confdates,confgroup,confnum,confsponsor,conftitle,constructorsynopsis,contractnum,
contrib,destructorsynopsis,contractsponsor,copyright,corpauthor,corpname,dedication,edition,editor,
equation,equation > alt,example,fieldsynopsis,figure,formalpara,funcprototype,funcsynopsis,
funcsynopsisinfo,glossary,glossdef,glossdiv,glossentry,glosslist,glosssee,glossseealso,
glossentry > glossterm,graphic,graphicco,highlights,important,index,indexdiv,indexentry,
informalequation,informalequation > alt,informalexample,informalfigure,itemizedlist,jobtitle,
legalnotice,listitem,lot,lotentry,methodsynopsis,modespec,msg,msgaud,msgentry,msgexplan,msginfo,
msglevel,msgmain,msgorig,msgrel,msgset,msgsub,msgtext,note,orderedlist,orgdiv,orgname,otheraddr,
othercredit,para,part,preface,primaryie,printhistory,procedure,programlisting,programlistingco,
publisher,publishername,qandadiv,qandaentry,qandaset,question,refclass,refdescriptor,refentry,
refentrytitle,reference,refmeta,refmiscinfo,refnamediv,refsect1,refsect2,refsect3,refsynopsisdiv,
releaseinfo,revdescription,revhistory,revision,screen,screenco,screeninfo,screenshot,secondaryie,
sect1,sect2,sect3,sect4,sect5,section,seealsoie,seeie,set,setindex,shortaffil,sidebar,simpara,
simplemsgentry,simplesect,simplelist[type=horiz],simplelist[type=vert],step,subtitle,synopsis,term,
tertiaryie,tip,title,titleabbrev,toc,tocback,tocchap,tocentry,tocfront,toclevel1,toclevel2,toclevel3,
toclevel4,toclevel5,tocpart,variablelist,varlistentry,warning { display: block; }
set,book,part,chapter,section,sect1 { margin: 1ex; }
* book,* part,* chapter,* section, * sect1 { margin: 0; }
classsynopsis,classsynopsisinfo,funcsynopsis,funcsynopsisinfo,programlisting,programlistingco,screen,
screenco,synopsis { font-family: monospace; }
address,address *,biblioentry,bibliomixed,bibliomset,classsynopsis,classsynopsisinfo,funcsynopsis,
funcsynopsisinfo,literallayout,programlisting,programlistingco,screen,screenco,synopsis 
{ white-space: pre; }
programlisting,programlistingco,screen,screenco
{ margin: 1ex; padding: .6ex; background-color: #EEE; border: thin solid gray; }
ackno { font-style: italic; }
ackno,refentry { border: thin solid; border-color: silver transparent transparent; 
  margin-bottom: 1ex; padding-top: .6ex; }
areaspec:before { content: "areas "; color: olive; font-weight: bold; }
arg:before { content: " "; }
arg[choice=opt]:before,group:before { content: " ["; }
arg[choice=opt]:after { content: "]"; }
group:after { content: " ]"; }
arg[choice=req]:before,group[choice=req]:before { content: " {"; }
arg[choice=req]:after { content: "}"; }
group[choice=req]:after { content: " }"; }
group > arg:first-child:before { content: " "; }
group > arg[choice=opt]:first-child:before { content: " ["; }
group > arg[choice=req]:first-child:before { content: " {"; }
group > arg:before { content: " | "; }
group > arg[choice=opt]:before { content: " | ["; }
group > arg[choice=req]:before { content: " | {"; }
attribution:after { content: " -- "; }
caption { font-style: italic; }
beginpage { border: thin solid; border-width: thin 0 0; }
blockquote,epigraph { margin: 1.2ex 10ex; }
caution,important,note,tip,warning { margin-left: 14ex; }
caution:before { content: "caution "; display: marker; color: olive; }
important:before { content: "important "; display: marker; color: olive; }
note:before { content: "note "; display: marker; color: olive; }
tip:before { content: "tip "; display: marker; color: olive; }
warning:before { content: "warning "; display: marker; color: olive; }
footnote:before { content: "footnote "; display: marker; color: olive; }
footnote { font-size: .83em; margin-left: 15ex; margin-right: 5ex; display: block; }
glossentry { margin: 1ex auto; }
glossentry > glossterm { font-weight: bold; display: block; }
glossdef,glosssee,glossseealso { margin-left: 4ex; }
glossdef > *:first-child { margin-top: 0; margin-bottom: 0; }
glossentry > glossterm { font-style: normal; }
para,simpara,formalpara { margin-top: 1.33ex; margin-bottom: 1.33ex; }
formalpara > * { margin-top: 0; margin-bottom: 0; }
formalpara > title { font-weight: bold; }
secondaryie,seeie,seealsoie { margin-left: 2ex; }
tertiaryie { margin-left: 4ex; }
seeie:before { content: "see "; color: olive; }
seealsoie:before { content: "see also "; color: olive; }
sidebar { background-color: #CFC; border: thin solid #696; padding: 1ex; margin: 1ex; }

/* inlines */
command,computeroutput,constant,envar,filename,function,initializer,keycode,keysym,literal,markup,
methodname,methodparam,ooclass,ooexception,oointerface,option,parameter,property,sgmltag,symbol,
token,type,varname { font-family: monospace; }
guibutton,guiicon,guilabel,guimenu,guimenuitem,guisubmenu,keycap,shortcut { font-weight: bold; }
accel { text-decoration: underline; }
anchor:before { content: icon(left-target); vertical-align: text-top; color: olive; }
email,link,olink,ulink,synopfragmentref,email *,link *,olink *,ulink *,synopfragmentref *
{ color: navy; text-decoration: underline; }
citetitle,emphasis,firstterm,foreignphrase,glossterm,replaceable { font-style: italic; }
citation:before { content: "["; }
citation:after { content: "]"; }
emphasis[role=bold] { font-style: normal; font-weight: bold; }
footnoteref { content: icon(right-link); }
funcparams:before,manvolnum:before,shortcut:before { content: "("; }
funcparams:after,manvolnum:after,shortcut:after { content: ")"; }
optional:before { content: "["; }
optional:after { content: "]"; }
indexterm:before { content: "[indexterm: "; color: olive; }
indexterm:after { content: "]"; color: olive; }
indexterm { color: olive; }
keycombo *:first-child:before { content: "" !important; }
keycombo *:before { content: "+"; color: olive; }
keycombo[action=seq] *:before { content: ","; }
menuchoice *:first-child:before { content: ""; }
menuchoice *:before { content: " >> "; }
methodparam:first-child:before,paramdef:first-child:before { content: ""; }
methodparam:before,paramdef:before { content: ", "; }
othername:before,surname:before { content: " "; }
lineage:before { content: ", "; }
prompt { font-family: monospace; } 
quote:before { content: open-quote; }
quote:after { content: close-quote; }
refpurpose:before { content: " -- "; }
remark { font-style: italic; color: red; }
sbr { content: "\A"; }
sgmltag { color: green; }
sgmltag[class=element]:before,sgmltag[class=emptytag]:before,sgmltag[class=starttag]:before { content: "<"; }
sgmltag[class=element]:after,sgmltag[class=endtag]:after,sgmltag[class=starttag]:after { content: ">"; }
sgmltag[class=emptytag]:after { content: " />"; }
sgmltag[class=endtag]:before { content: "</"; }
sgmltag[class=genentity]:before { content: "&"; }
sgmltag[class=paramentity]:before { content: "%"; }
sgmltag[class=genentity]:after,sgmltag[class=paramentity]:after { content: ";"; }
sgmltag[class=pi]:before { content: "<?"; }
sgmltag[class=pi]:after,sgmltag[class=xmlpi]:after { content: " ?>"; }
sgmltag[class=sgmlcomment]:before { content: "<!-- "; }
sgmltag[class=sgmlcomment]:after { content: " -->"; }
sgmltag[class=xmlpi]:before { content: "<?xml "; }

/* subscript and superscript? */
trademark[class=copyright]:after { content: "©"; }
trademark[class=registered]:after { content: "®"; }
trademark[class=service]:after { content: " (SM)"; font-size:80%; color: olive; }
trademark[class=trade]:after { content: " (TM)"; font-size: 80%; color: olive; }
userinput { font-family: monospace; background-color: yellow; }
varargs { content: "..."; }
void { content: "void"; }
xref { content: icon(right-link) attr(linkend) " "; vertical-align: text-top; color: navy; }

/* simple inlines (no styling required): abbrev acronym action application artpagenums authorinitials 
bibliomisc  citerefentry city classname collabname command country database date errorcode errorname 
errortype exceptionname fax firstname funcdef function hardware holder honorific initializer 
inlineequation inlineequation > alt interfaceinterfacename invpartnumber isbn issn issuenum 
lineannotation medialabelmethodname modifier mousebutton ooclass ooexception oointerface option 
pagenums parameter phone phrase pob postcode productname productnumber prompt property pubdate 
pubsnumber refname returnvalue seriesvolnums state street structfield structname systemitem volumenum 
wordasword year*/

/* print */
@media print {  
  colspec, spanspec { display: none; }
  * { background-color: transparent; line-height: 1.2; }
  programlisting, screen { background-color: #EEE; border: thin solid silver; }
  graphic,  imagedata { content: image(attr(fileref), -500, -700, smooth); }
}
