comparison html.xsl @ 50:01a7c2ebd3d1

top 20 shared formulae coloured in
author Henry S. Thompson <ht@markup.co.uk>
date Thu, 11 May 2017 09:29:33 +0100
parents 5b2333e59d91
children f90bbd38b8f6
comparison
equal deleted inserted replaced
49:d3569a8cbf7a 50:01a7c2ebd3d1
16 .e {color: red} 16 .e {color: red}
17 .formula {font-style: italic} 17 .formula {font-style: italic}
18 .reffed {border: solid 1px black} 18 .reffed {border: solid 1px black}
19 table {table-layout: fixed} 19 table {table-layout: fixed}
20 th {width: 1en} 20 th {width: 1en}
21 /* http://stackoverflow.com/questions/470690/how-to-automatically-generate-n-distinct-colors */
22 .c1 {background-color: #FFB300} /* Vivid Yellow */
23 .c2 {background-color: #803E75} /* Strong Purple */
24 .c3 {background-color: #FF6800} /* Vivid Orange */
25 .c4 {background-color: #A6BDD7} /* Very Light Blue */
26 .c5 {background-color: #C10020} /* Vivid Red */
27 .c6 {background-color: #CEA262} /* Grayish Yellow */
28 .c7 {background-color: #817066} /* Medium Gray */
29 /* The following don't work well for people with defective color vision */
30 .c8 {background-color: #007D34} /* Vivid Green */
31 .c9 {background-color: #F6768E} /* Strong Purplish Pink */
32 .c10 {background-color: #00538A} /* Strong Blue */
33 .c11 {background-color: #FF7A5C} /* Strong Yellowish Pink */
34 .c12 {background-color: #53377A} /* Strong Violet */
35 .c13 {background-color: #FF8E00} /* Vivid Orange Yellow */
36 .c14 {background-color: #B32851} /* Strong Purplish Red */
37 .c15 {background-color: #F4C800} /* Vivid Greenish Yellow */
38 .c16 {background-color: #7F180D} /* Strong Reddish Brown */
39 .c17 {background-color: #93AA00} /* Vivid Yellowish Green */
40 .c18 {background-color: #593315} /* Deep Yellowish Brown */
41 .c19 {background-color: #F13A13} /* Vivid Reddish Orange */
42 .c20 {background-color: #232C16} /* Dark Olive Green */
21 </style> 43 </style>
22 </head> 44 </head>
23 <body> 45 <body>
24 <xsl:apply-templates/> 46 <xsl:apply-templates/>
25 </body> 47 </body>
50 <xsl:choose> 72 <xsl:choose>
51 <xsl:when test="@t|text()"> 73 <xsl:when test="@t|text()">
52 <xsl:attribute name="class"> 74 <xsl:attribute name="class">
53 <xsl:value-of select="(if (@t) then @t else text(), 75 <xsl:value-of select="(if (@t) then @t else text(),
54 if (e:f) then 'formula' else (), 76 if (e:f) then 'formula' else (),
55 if (e:i) then 'reffed' else ())"/> 77 if (e:i) then 'reffed' else (),
78 if (@fi) then concat('c',@fi) else ())"/>
56 </xsl:attribute> 79 </xsl:attribute>
57 <xsl:attribute name="title"> 80 <xsl:attribute name="title">
58 <xsl:choose> 81 <xsl:choose>
59 <xsl:when test="e:i"> 82 <xsl:when test="e:i">
60 <xsl:value-of select="e:i/@r"/>: <xsl:value-of select="e:i/e:r"/> 83 <xsl:value-of select="e:i/@r"/>: <xsl:value-of select="e:i/e:r"/>