diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/export-example.css')
-rw-r--r-- | Master/texmf-dist/tex/context/base/export-example.css | 444 |
1 files changed, 281 insertions, 163 deletions
diff --git a/Master/texmf-dist/tex/context/base/export-example.css b/Master/texmf-dist/tex/context/base/export-example.css index dbecc01feae..af99d95dbe4 100644 --- a/Master/texmf-dist/tex/context/base/export-example.css +++ b/Master/texmf-dist/tex/context/base/export-example.css @@ -7,65 +7,100 @@ */ +/* + + Because empty div elements are not seen we put a comment in them so that empty + table cells etc work ok. + + We can style individual elements in several ways and we support in this css file + meaningful elements as well as divs. If needed you can use the chain field as well + as chain elements in the div class for styling groups. + + \definefloat[myfloata] + \definefloat[myfloatb][myfloatbs][figure] + + context|div.float.myfloata { } float[detail='myfloata'] { } + context|div.float.myfloatb { } float[detail='myfloatb'] { } + context|div.float.figure { } float[detail='figure'] { } + context|div.float.figure.myfloatb { } float[chain~='figure'][detail='myfloata'] { } + context|div.myfloata { } *[detail='myfloata'] { } + context|div.myfloatb { } *[detail='myfloatb'] { } + context|div.figure { } *[chain~='figure'] { } + context|div.figure.myfloatb { } *[chain~='figure'][detail='myfloatb'] { } + +*/ + +@namespace context url('http://www.pragma-ade.com/context/export') ; + /* ignore : mixed */ /* metadata: display */ -ignore { +ignore, context|div.ignore { + display : none ; +} + +ignore, context|div.private { display : none ; } -xmetadata { +xmetadata, context|div.xmetadata { display : none ; } -xmetavariable { +xmetavariable, context|div.xmetavariable { display : none ; } /* document : display */ -document:before { +document:before, context|div.document:before { content : attr(title) ; font-size : 44pt ; font-weight : bold ; margin-bottom : 1em ; } -document { +document, context|div.document { font-family : "DejaVu Serif", "Lucida Bright", serif ; font-size : 12pt ; + line-height : 14.4pt; max-width : 50em ; padding : 1em ; /* text-align : justify ; */ + text-align : justify ; /* hyphens : manual ; */ /* text-justify : inter-word ; */ } -document>metadata { - font-family : "Lucida Console", "DejaVu Sans Mono", monospace ; +document>metadata, context|div.document context|div.metadata { + font-family : "DejaVu Sans Mono", "Lucida Console", monospace ; margin-bottom : 2em ; } -document>metadata>metavariable[name="title"]:before { +document>metadata>metavariable[name="title"]:before, + context|div.document context|div.metadata context|div.metavariable.name-title:before { content : "title\00A0\00A0\00A0:\00A0" ; } -document>metadata>metavariable[name="author"]:before { - content : "author\00A0\00A0:\00A0" ; +document>metadata>metavariable[name="author"]:before, + context|div.document context|div.metadata context|div.metavariable.name-author:before { + content : "author\00A0\00A0:\00A0" ; } -document>metadata>metavariable[name="version"]:before { +document>metadata>metavariable[name="version"]:before, + context|div.document context|div.metadata context|div.metavariable.name-version:before { content : "version\00A0:\00A0" ; } -document>metadata>metavariable[name="title"], document>metadata>metavariable[name="author"], document>metadata>metavariable[name="version"] { +document>metadata>metavariable[name="title"], document>metadata>metavariable[name="author"], document>metadata>metavariable[name="version"], + context|div.document context|div.metadata context|div.metavariable.name-title, context|div.document context|div.metadata context|div.metavariable.name-author, context|div.document context|div.metadata context|div.metavariable.name-version { display : block ; } /* paragraph : mixed */ /* p : mixed */ -paragraph, p { +paragraph, p, context|div.paragraph, context|div.p { display : block ; margin-top : 0.5em ; margin-bottom : 0.5em ; @@ -73,7 +108,7 @@ paragraph, p { /* break : display */ -break { +break, context|div.break { display : block ; margin-bottom : 0.5em ; } @@ -81,14 +116,15 @@ break { /* construct : inline */ /* highlight : inline */ -construct { +construct, context|div.construct { } -construct[detail="important"] { +construct[detail="important"], context|div.construct.important { font-weight : bold ; } -highlight { /* todo: style and color */ +highlight, context|div.highlight { /* todo: style and color */ + display : inline ; } /* section : display */ @@ -96,76 +132,95 @@ highlight { /* todo: style and color */ /* sectionnumber : mixed */ /* sectioncontent : display */ -section { +section, context|div.section { display : block ; } -sectioncontent { +sectioncontent, context|div.sectioncontent { display : block ; margin-top : 1em ; margin-bottom : 1em ; } -section[detail="chapter"], section[detail="title"] { - margin-top : 3em ; - margin-bottom : 2em ; +section[detail="chapter"], section[detail="title"], + context|div.section.chapter, context|div.section.title { + page-break-before : always ; + page-break-after : avoid ; + margin-top : 3em ; + margin-bottom : 2em ; } -section[detail="section"], section[detail="subject"] { - margin-top : 2.5em ; - margin-bottom : 2.5em ; +section[detail="section"], section[detail="subject"], + context|div.section.section, context|div.section.subject { + page-break-after : avoid ; + margin-top : 2.5em ; + margin-bottom : 2.5em ; } -section[detail="subsection"], section[detail="subsubject"] { - margin-top : 2em ; - margin-bottom : 2em ; +section[detail="subsection"], section[detail="subsubject"], + context|div.section.subsection, context|div.section.subsubject { + page-break-after : avoid ; + margin-top : 2em ; + margin-bottom : 2em ; } -section[detail="subsubsection"], section[detail="subsubsubject"] { - margin-top : 1em ; - margin-bottom : 0em ; +section[detail="subsubsection"], section[detail="subsubsubject"], + context|div.section.subsubsection, context|div.section.subsubsubject { + page-break-after : avoid ; + margin-top : 1em ; + margin-bottom : 0em ; } -section[detail="summary"], section[detail="subsummary"] { +section[detail="summary"], section[detail="subsummary"], + context|div.section.summary, context|div.section.subsummary { margin-top : 1em ; margin-bottom : 1em ; } -section[detail="chapter"]>sectionnumber { +section[detail="chapter"]>sectionnumber, + context|div.section.chapter context|div.sectionnumber { display : inline-block ; margin-right : 1em ; font-size : 3em ; font-weight : bold ; } -section[detail="chapter"]>sectiontitle, section[detail="title"]>sectiontitle { +section[detail="chapter"]>sectiontitle, section[detail="title"]>sectiontitle, + context|div.section.chapter context|div.sectiontitle, context|div.section.title context|div.sectiontitle { + display : inline-block ; font-size : 3em ; font-weight : bold ; } -section[detail="section"]>sectiontitle, section[detail="subject"]>sectiontitle { +section[detail="section"]>sectiontitle, section[detail="subject"]>sectiontitle, + context|div.section.section context|div.sectiontitle, context|div.section.subject context|div.sectiontitle { + display : inline-block ; font-size : 2.5em ; font-weight : bold ; } -section[detail="subsection"]>sectiontitle, section[detail="subsubject"]>sectiontitle{ +section[detail="subsection"]>sectiontitle, section[detail="subsubject"]>sectiontitle, + context|div.section.subsection context|div.sectiontitle, context|div.section.subsubject context|div.sectiontitle { + display : inline-block ; font-size : 2em ; font-weight : bold ; } -section[detail="subsubsection"]>sectiontitle, section[detail="subsubsubject"]>sectiontitle{ +section[detail="subsubsection"]>sectiontitle, section[detail="subsubsubject"]>sectiontitle, + context|div.section.subsubsection context|div.sectiontitle, context|div.section.subsubsubject context|div.sectiontitle { + display : inline-block ; font-size : 1em ; font-weight : bold ; } -section[detail="section"]>sectionnumber { +section[detail="section"]>sectionnumber, context|div.section.section context|div.sectionnumber { display : inline-block ; margin-right : 1em ; font-size : 2.5em ; font-weight : bold ; } -section[detail="summary"]>sectiontitle { +section[detail="summary"]>sectiontitle, context|div.section.summary context|div.sectiontitle { display : block ; margin-top : 1em ; margin-bottom : 1em ; @@ -175,21 +230,14 @@ section[detail="summary"]>sectiontitle { border-width : .15em; } -section[detail="subsection"]>sectionnumber { - display : inline-block ; - margin-right : 1em ; - font-size : 2em ; - font-weight : bold ; -} - -section[detail="subsection"]>sectionnumber { +section[detail="subsection"]>sectionnumber, context|div.section.subsection context|div.sectionnumber { display : inline-block ; margin-right : 1em ; font-size : 1em ; font-weight : bold ; } -section[detail="subsummary"]>sectiontitle { +section[detail="subsummary"]>sectiontitle, context|div.section.subsummary context|div.sectiontitle { display : block ; margin-top : 1em ; margin-bottom : 1em ; @@ -217,37 +265,37 @@ section[detail="subsummary"]>sectiontitle { glyphs : 'Α' 'B' 'Γ' 'Δ' 'Ε' 'Ζ' 'Η' 'Θ' 'Ι' 'Κ' 'Λ' 'Μ' 'Ν' 'Ξ' 'Ο' 'Π' 'Ρ' 'Σ' 'Τ' 'Υ' 'Φ' 'Χ' 'Ψ' 'Ω' ; } -itemgroup { +itemgroup, context|div.itemgroup { display : block ; margin-bottom : 0.5em ; margin-top : 0.5em ; } -itemgroup[symbol="1"] { list-style-type : disc ; } -itemgroup[symbol="2"] { list-style-type : square ; } -itemgroup[symbol="3"] { list-style-type : square ; } -itemgroup[symbol="4"] { list-style-type : square ; } -itemgroup[symbol="5"] { list-style-type : circ ; } -itemgroup[symbol="a"] { list-style-type : lower-alpha ; } -itemgroup[symbol="A"] { list-style-type : alpha ; } -itemgroup[symbol="r"] { list-style-type : lower-roman ; } -itemgroup[symbol="R"] { list-style-type : upper-roman ; } -itemgroup[symbol="n"] { list-style-type : decimal ; } -itemgroup[symbol="g"] { list-style-type : lower-greek ; } -itemgroup[symbol="G"] { list-style-type : upper-greek ; } - -item { +itemgroup[symbol="1"], context|div.itemgroup.symbol-1 { list-style-type : disc ; } +itemgroup[symbol="2"], context|div.itemgroup.symbol-2 { list-style-type : square ; } +itemgroup[symbol="3"], context|div.itemgroup.symbol-3 { list-style-type : square ; } +itemgroup[symbol="4"], context|div.itemgroup.symbol-4 { list-style-type : square ; } +itemgroup[symbol="5"], context|div.itemgroup.symbol-5 { list-style-type : circ ; } +itemgroup[symbol="a"], context|div.itemgroup.symbol-a { list-style-type : lower-alpha ; } +itemgroup[symbol="A"], context|div.itemgroup.symbol-A { list-style-type : alpha ; } +itemgroup[symbol="r"], context|div.itemgroup.symbol-r { list-style-type : lower-roman ; } +itemgroup[symbol="R"], context|div.itemgroup.symbol-R { list-style-type : upper-roman ; } +itemgroup[symbol="n"], context|div.itemgroup.symbol-n { list-style-type : decimal ; } +itemgroup[symbol="g"], context|div.itemgroup.symbol-g { list-style-type : lower-greek ; } +itemgroup[symbol="G"], context|div.itemgroup.symbol-G { list-style-type : upper-greek ; } + +item, context|div.item { display : list-item ; margin-left : 1em ; margin-bottom : 0.5em ; margin-top : 0.5em ; } -itemtag { +itemtag, context|div.item { display: none ; } -itemcontent { +itemcontent, context|div.itemcontent { } /* description : display */ @@ -255,13 +303,14 @@ itemcontent { /* descriptioncontent : mixed */ /* descriptionsymbol : inline */ -description { +description, context|div.description { display : block ; margin-bottom : 1em ; margin-top : 1em ; } -descriptiontag { +descriptiontag, context|div.descriptiontag { + display : inline ; float : left ; clear : left ; margin-right : 1em ; @@ -269,10 +318,11 @@ descriptiontag { font-weight : bold ; } -descriptioncontent { +descriptioncontent, context|div.descriptioncontent { } -descriptionsymbol { +descriptionsymbol, context|div.descriptionsymbol { + display : inline ; } /* verbatimblock : display */ @@ -280,46 +330,47 @@ descriptionsymbol { /* verbatimline : mixed */ /* verbatim : inline */ -verbatimblock { +verbatimblock, context|div.verbatimblock { background-color : rgb(50%,50%,100%) ; display : block ; padding : 1em ; margin-bottom : 1em ; margin-top : 1em ; - font-family : "Lucida Console", "DejaVu Sans Mono", monospace ; + font-family : "DejaVu Sans Mono", "Lucida Console", monospace ; } -verbatimlines+verbatimlines { +verbatimlines+verbatimlines, context|div.verbatimlines+context|div.verbatimlines { display : block ; margin-top : 1em ; } -verbatimline { +verbatimline, context|div.verbatimline { display : block ; white-space : pre-wrap ; } -verbatim { +verbatim, context|div.verbatim { + display : inline ; white-space : pre-wrap ; color : rgb(60%,60%,0%) ; - font-family : "Lucida Console", "DejaVu Sans Mono", monospace ; + font-family : "DejaVu Sans Mono", "Lucida Console", monospace ; } /* lines : display */ /* line : mixed */ -lines { +lines, context|div.lines { display : block ; margin-bottom : 1em ; margin-top : 1em ; } -lines+lines { +lines+lines, context|div.lines+context|div.lines { display : block ; margin-top : 1em ; } -line { +line, context|div.line { display : block ; white-space : pre-wrap ; } @@ -327,7 +378,7 @@ line { /* synonym : inline */ /* sorting : inline */ -sorting, synonym { +sorting, synonym, context|div.sorting, context|div.synonym { display : inline ; font-variant : small-caps ; } @@ -342,41 +393,54 @@ sorting, synonym { /* registerpage : inline */ /* registerpagerange : mixed */ -register { +register, context|div.register { display: none ; } +registerlocation, context|div.registerlocation { + display: inline ; +} + +registerlocation:after, context|div.registerlocation:after { + content : "\25B6\00A0\00A0" ; + color : rgb(40%,40%,40%) ; + font-size : x-small ; + line-height : 0 ; + padding-top : 0.5ex ; + vertical-align : top ; +} + /* table : display */ /* tablerow : display */ /* tablecell : mixed */ -table { +table, context|div.table { display : table ; } -tablerow { +tablerow, context|div.tablerow { display : table-row ; } -tablecell[align="middle"] { +tablecell[align="middle"], context|div.tablecell.align-middle { display : table-cell ; text-align : center ; padding : .1em ; } -tablecell[align="flushleft"] { +tablecell[align="flushleft"], context|div.tablecell.align-flushleft { display : table-cell ; text-align : left ; padding : .1em ; } -tablecell[align="flushright"] { +tablecell[align="flushright"], context|div.tablecell.align-flushright { display : table-cell ; text-align : right ; padding : .1em ; } -tablecell { +tablecell, context|div.tablecell { display : table-cell ; text-align : left ; padding : .1em ; @@ -386,36 +450,40 @@ tablecell { /* tabulaterow : display */ /* tabulatecell : mixed */ -tabulate { +tabulate, context|div.tabulate { display : table ; margin-top : 1em ; margin-bottom : 1em ; margin-left : 2.5em ; } -tabulaterow { +floatcontent>tabulate, context|div.floatcontent context|div.tabulate { + margin-left : 0em ; +} + +tabulaterow, context|div.tabulaterow { display : table-row ; } -tabulatecell[align="middle"] { +tabulatecell[align="middle"], context|div.tabulatecell.align-middle { display : table-cell ; text-align : center ; padding-right : 1em ; } -tabulatecell[align="flushleft"] { +tabulatecell[align="flushleft"], context|div.tabulatecell.align-flushleft { display : table-cell ; text-align : left ; padding-right : 1em ; } -tabulatecell[align="flushright"] { +tabulatecell[align="flushright"], context|div.tabulatecell.align-flushright { display : table-cell ; text-align : right ; padding-right : 1em ; } -tabulatecell { +tabulatecell, context|div.tabulatecell { display : table-cell ; text-align : left ; padding-right : 1em ; @@ -426,23 +494,23 @@ tabulatecell { /* combinationcontent : mixed */ /* combinationcaption : mixed */ -combination { +combination, context|div.combination { display : table ; margin-top : 0em ; margin-bottom : 0em ; } -combinationpair { +combinationpair, context|div.combinationpair { display : table-cell ; padding-right : 1em ; } -combinationcontent { +combinationcontent, context|div.combinationcontent { display : table-row ; text-align : center ; } -combinationcaption { +combinationcaption, context|div.combinationcaption { display : table-row ; padding-top : 1ex ; text-align : center ; @@ -456,36 +524,39 @@ combinationcaption { /* listdata : mixed */ /* listpage : mixed */ -list { +list, context|div.list { display : block ; } -listitem[detail="chapter"] { +listitem[detail="chapter"], context|div.listitem.chapter { display : block ; margin-top : 1em ; font-weight : bold ; } -listitem[detail="section"] { +listitem[detail="section"], context|div.listitem.section { display : block ; } -listitem[detail="subsection"] { +listitem[detail="subsection"], context|div.listitem.subsection { display : block ; + display : inline-block ; } -listtag { +listtag, context|div.listtag { display : inline-block ; width : 5em ; } -listcontent { +listcontent, context|div.listcontent { + display : inline-block ; } -listdata { +listdata, context|div.listdata { + display : inline-block ; } -listpage { +listpage, context|div.listpage { display : none ; } @@ -495,35 +566,43 @@ listpage { /* :lang(en) */ -delimited[detail="quotation"]:before, delimitedblock[detail="quotation"]:before { - content : "\201C" ; +delimited[detail="quotation"]:before, delimitedblock[detail="quotation"]:before, + context|div.delimited.quotation:before, context|div.delimitedblock.quotation:before { + /* content : "\201C" ; */ + font-style : italic ; } -delimited[detail="quotation"]:after, delimitedblock[detail="quotation"]:after { - content : "\201D" ; +delimited[detail="quotation"]:after, delimitedblock[detail="quotation"]:after, + context|div.delimited.quotation:after, context|div.delimitedblock.quotation:after { + /* content : "\201D" ; */ + font-style : italic ; } -delimited[detail="quote"]:before, delimitedblock[detail="quote"]:before { - content : "\2018" ; +delimited[detail="quote"]:before, delimitedblock[detail="quote"]:before, + context|div.delimited.quote:before, context|div.delimitedblock.quote:before { + /* content : "\2018" ; */ + font-style : italic ; } -delimited[detail="quote"]:after, delimitedblock[detail="quote"]:after { - content : "\2019" ; +delimited[detail="quote"]:after, delimitedblock[detail="quote"]:after, + context|div.delimited.quote:after, context|div.delimitedblock.quote:after { + /* content : "\2019" ; */ + font-style : italic ; } -delimited { +delimited, context|div.delimited { display : inline } -delimitedblock { +delimitedblock, context|div.delimitedblock { display : block } -subsentence:before, subsentence:after { +subsentence:before, subsentence:after, context|div.subsentence:before, context|div.subsentence:after { content : "\2014" ; } -subsentence { +subsentence, context|div.subsentence { display : inline } @@ -537,32 +616,36 @@ subsentence { /* floattext : mixed */ /* floatcontent : mixed */ -float { +float, context|div.float { display : block ; margin-top : 1em ; margin-bottom : 1em ; margin-left : 2.5em ; } -floatcaption { +floatcaption, context|div.floatcaption { display : block ; margin-top : 0.5em ; color : rgb(60%,60%,0%) ; } -floatlabel { +floatlabel, context|div.floatlabel { + display : inline-block ; font-weight : bold ; - margin-right : 1em ; + margin-right : 0.25em ; } -floatnumber { - font-weight : bold ; +floatnumber, context|div.floatnumber { + display : inline ; + font-weight : bold ; + margin-right : 0.25em ; } -floattext { +floattext, context|div.floattext { + display : inline ; } -floatcontent { +floatcontent, context|div.floatcontent { } /* image : mixed */ @@ -576,11 +659,11 @@ floatcontent { height : 5.994cm ; } */ -mpgraphic:before { /* does not work with empty element */ +mpgraphic:before, context|div.mpgraphic:before { /* does not work with empty element */ content : "[runtime metapost graphic]" ; } -mpgraphic { +mpgraphic, context|div.mpgraphic { display : inline ; } @@ -592,52 +675,68 @@ mpgraphic { /* formulanumber : mixed */ /* formulacontent : display */ -formula { +formula, context|div.formula { display : block ; margin-top : 1em ; margin-bottom : 1em ; margin-left : 2.5em ; } -subformula { /* todo */ +subformula, context|div.subformula { /* todo */ display : block ; margin-top : 1em ; margin-bottom : 1em ; margin-left : 2.5em ; } -formulaset { /* todo */ +formulaset, context|div.formulaset { /* todo */ display : block ; margin-top : 1em ; margin-bottom : 1em ; margin-left : 2.5em ; } -formulacaption { /* todo */ +formulacaption, context|div.formulacaption { /* todo */ display : block ; margin-top : 0.5em ; color : rgb(60%,60%,0%) ; } -formulalabel { +formulalabel, context|div.formulalabel { + display : inline ; font-weight : bold ; - margin-right : 1em ; + margin-right : .25em ; } -formulanumber { +formulanumber, context|div.formulanumber { + display : inline ; font-weight : bold ; } -formulacontent { +formulacontent, context|div.formulacontent { display : block ; } -/* link : inline */ +link, context|div.link { + display : inline ; +} /* margintextblock : inline */ /* margintext : inline */ -/* math : inline */ +margintext, context|div.margintext { + display : block ; + font-weight : bold ; + margin-top : 1em ; + margin-bottom : 1em ; +} + +margintext:before, context|div.margintext:before { + content : "\25B6\00A0\00A0" ; + color : rgb(40%,40%,40%) ; +} + +/* math : inline | display */ /* mn : mixed */ /* mi : mixed */ /* mo : mixed */ @@ -660,67 +759,86 @@ formulacontent { /* mtr : display */ /* mtd : display */ +context|div.math-inline { + display : inline ; + vertical-align : 0 ; /* this will be set directly */ +} + +context|div.math-display { + display : block ; + margin : 1ex 0ex 1em 3em ; +} + /* quantity : inline */ /* unit : inline */ /* number : inline */ -quantity { +quantity, context|div.quantity { + display : inline ; } -quantity>unit { +quantity>unit, context|div.quantity>context|div.unit { + display : inline ; } -quantity>number { +quantity>number, context|div.quantity>context|div.number { + display : inline ; } /* sub : inline */ /* sup : inline */ /* subsup : inline */ -sup { +sup, context|div.sup { + display : inline-block ; font-size : xx-small ; - line-height : 0 ; - vertical-align : top ; + vertical-align : super ; } -sub { +sub, context|div.sub { + display : inline-block ; font-size : xx-small ; - line-height : 0 ; - vertical-align : bottom ; + vertical-align : sub ; } - -subsup>sup { +subsup>sup, context|div.subsup>context|div.sup { + display : inline ; vertical-align : top ; } -subsup>sub { +subsup>sub, context|div.subsup>context|div.sub { + display : inline ; vertical-align : bottom ; } -/* xhtml */ +/* links */ -a[href] { - text-decoration : none ; - color : inherit ; -} - -a[href]:hover { - color : rgb(50%,0%,0%) ; - text-decoration : underline ; +context|div[href]:hover { + color : rgb(50%,0%,0%) ; + background-color : rgb(85%,85%,85%) ; } /* setups */ -setup { - display : block ; +setup, context|div.setup { + display : block ; } -comment { +comment, context|div.comment { background-color : rgb(50%,75%,100%) ; display : block ; padding : 1em ; - margin-bottom : 1em ; - margin-top : 1em ; - font-family : "Lucida Console", "DejaVu Sans Mono", monospace ; + margin-bottom : 2ex ; + margin-top : 2ex ; + font-family : "DejaVu Sans Mono", "Lucida Console", monospace ; +} + +/* special */ + +c, context|div.c { + display : inline ; +} + +warning, context|div.warning { + display : none ; } |