lfs-nochunks.xsl 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns="http://www.w3.org/1999/xhtml"
  4. version="1.0">
  5. <!-- We use XHTML -->
  6. <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/profile-docbook.xsl"/>
  7. <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
  8. <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
  9. <!-- Including our others customized templates -->
  10. <xsl:include href="xhtml/lfs-index.xsl"/>
  11. <xsl:include href="xhtml/lfs-mixed.xsl"/>
  12. <xsl:include href="xhtml/lfs-sections.xsl"/>
  13. <xsl:include href="xhtml/lfs-toc.xsl"/>
  14. <xsl:include href="xhtml/lfs-xref.xsl"/>
  15. <!-- This file contains our localization strings (for internationalization) -->
  16. <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
  17. <!-- Dropping some unwanted style attributes -->
  18. <xsl:param name="ulink.target" select="''"></xsl:param>
  19. <xsl:param name="css.decoration" select="0"></xsl:param>
  20. <!-- Don't use graphics in admonitions -->
  21. <xsl:param name="admon.graphics" select="0"/>
  22. <!-- Changing the admonitions output tagging -->
  23. <xsl:template name="nongraphical.admonition">
  24. <div class="{name(.)}">
  25. <div class ="admonhead">
  26. <h3 class="admontitle">
  27. <xsl:apply-templates select="." mode="object.title.markup"/>
  28. </h3>
  29. </div>
  30. <div class="admonbody">
  31. <xsl:apply-templates/>
  32. </div>
  33. </div>
  34. </xsl:template>
  35. <!-- To drop the remainig dot when title is empty (from lfs-titles.xsl)-->
  36. <xsl:template name="sect2.titlepage">
  37. <xsl:choose>
  38. <xsl:when test="string-length(title) = 0"/>
  39. <xsl:otherwise>
  40. <div class="titlepage">
  41. <xsl:if test="@id">
  42. <a id="{@id}" name="{@id}"/>
  43. </xsl:if>
  44. <h3 class="{name(.)}">
  45. <xsl:apply-templates select="." mode="label.markup"/>
  46. <xsl:text>. </xsl:text>
  47. <xsl:value-of select="title"/>
  48. </h3>
  49. </div>
  50. </xsl:otherwise>
  51. </xsl:choose>
  52. </xsl:template>
  53. <!-- Added the role param for proper punctuation in xref calls
  54. (from lfs-titles.xsl). -->
  55. <xsl:template match="*" mode="insert.title.markup">
  56. <xsl:param name="purpose"/>
  57. <xsl:param name="xrefstyle"/>
  58. <xsl:param name="title"/>
  59. <xsl:param name="role"/>
  60. <xsl:choose>
  61. <xsl:when test="$purpose = 'xref' and titleabbrev">
  62. <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  63. </xsl:when>
  64. <xsl:otherwise>
  65. <xsl:copy-of select="$title"/>
  66. <xsl:value-of select="$role"/>
  67. </xsl:otherwise>
  68. </xsl:choose>
  69. </xsl:template>
  70. <!-- The CSS Stylesheet -->
  71. <xsl:template name='user.head.content'>
  72. <style type="text/css">
  73. <xsl:text>
  74. /* Global settings */
  75. body {
  76. font-family: sans-serif;
  77. text-align: left;
  78. background: #fff;
  79. color: #333;
  80. margin: 1em;
  81. padding: 0;
  82. font-size: 1em;
  83. line-height: 1.2em
  84. }
  85. a:link { color: #22b; }
  86. a:visited { color: #7e4988; }
  87. a:hover, a:focus { color: #d30e08; }
  88. a:active { color: #6b77b1;}
  89. /* Headers */
  90. h1, h2, b, strong {
  91. color: #000;
  92. font-weight: bold;
  93. }
  94. h3, h4, h5, h6 {
  95. color: #222;
  96. }
  97. h1 { font-size: 173%; text-align: center; }
  98. h2 { font-size: 144%; }
  99. h2.subtitle { text-align: center; }
  100. h3 { font-size: 120%; padding-top: 0.2em; margin-top: 0.3em; }
  101. h4 { font-size: 110%;}
  102. h5, h6 { font-size: 110%; font-style: italic; }
  103. /* TOC and Index*/
  104. div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
  105. list-style: none;
  106. }
  107. div.toc, div.dedication {
  108. padding-left: 1em;
  109. }
  110. li.preface {
  111. margin-left: 1em;
  112. }
  113. div.toc ul li h3, div.toc ul li h4 {
  114. margin: .4em;
  115. }
  116. .item {
  117. width: 15em;
  118. float: left;
  119. }
  120. .secitem {
  121. font-weight: normal;
  122. width: 14em;
  123. float: left;
  124. }
  125. /* Admonitions */
  126. div.note, div.tip {
  127. background-color: #fffff6;
  128. border: 2px solid #dbddec;
  129. width: 90%;
  130. margin: .5em auto;
  131. }
  132. div.important, div.warning, div.caution {
  133. background-color: #fffff6;
  134. border: medium solid #400;
  135. width: 90%;
  136. margin: 1.5em auto;
  137. color: #600;
  138. font-size: larger;
  139. }
  140. div.important h3, div.warning h3, div.caution h3 {
  141. color: #900;
  142. }
  143. h3.admontitle {
  144. padding-left: 2.5em;
  145. padding-top: 1em;
  146. }
  147. div.admonbody {
  148. margin: .5em;
  149. }
  150. div.important em, div.warning em, div.caution em {
  151. color: #000;
  152. font-weight: bold;
  153. }
  154. div.important tt, div.warning tt, div.caution tt {
  155. font-weight: bold;
  156. }
  157. /* variablelist and segmentedlist */
  158. dl {
  159. margin: 0;
  160. padding: 0;
  161. }
  162. dt {
  163. display: list-item;
  164. font-weight: bold;
  165. margin: .33em 0 0 1em;
  166. padding: 0;
  167. }
  168. div.content dt {
  169. list-style: none;
  170. }
  171. dd {
  172. margin: 0 0 1em 3em;
  173. padding: 0;
  174. }
  175. div.variablelist dd {
  176. margin-bottom: 1em;
  177. }
  178. div.variablelist dd p {
  179. margin-top: 0px;
  180. }
  181. dl.materials dd {
  182. margin-left: 0px;
  183. }
  184. div.segmentedlist {
  185. margin-top: 1em;
  186. }
  187. div.segmentedlist p {
  188. margin: 0px auto;
  189. }
  190. /* itemizedlist */
  191. div.itemizedlist {
  192. margin-left: 1em;
  193. }
  194. /* Indented blocks */
  195. p, ul, dl, code, blockquote {
  196. padding-left: 1em;
  197. }
  198. /* Monospaced elements */
  199. tt, code, kbd, pre, .command {
  200. font-family: monospace;
  201. }
  202. pre.userinput {
  203. color: #101310;
  204. background-color: #e5e5e5;
  205. border: 1px solid #050505;
  206. padding: .5em 1em;
  207. margin: 0 2em;
  208. font-weight: bold;
  209. }
  210. pre.screen {
  211. background-color: #e9e9e9;
  212. border: 1px solid #050505;
  213. padding: .5em 1em;
  214. margin: 0 2em;
  215. }
  216. /* Sections */
  217. div.package {
  218. background: #f5f6f7;
  219. border-bottom: 0.2em solid #dbddec;
  220. padding: 0.5em 0.5em 0.3em 0.5em;
  221. margin: 0px auto;
  222. }
  223. div.installation {
  224. padding: 0 0.5em 0.3em 0.5em;
  225. margin: 0.5em 0 0.5em 0;
  226. }
  227. div.configuration {
  228. background: #fefefe;
  229. border-top: 0.2em solid #dbddec;
  230. padding: 0.5em;
  231. margin: 0.5em 0 .5em 0;
  232. }
  233. div.content {
  234. background: #f5f6f7;
  235. border-top: 0.2em solid #dbddec;
  236. border-bottom: 0.2em solid #dbddec;
  237. padding: 0.5em 0.5em 1em 0.5em;
  238. margin: 0.5em 0 .5em 0;
  239. }
  240. div.installation h3.title, div.content h3.title {
  241. padding-top: 0.3em;
  242. margin: 0;
  243. }
  244. div.book, div.preface, div.part, div.chapter, div.sect1, div.index {
  245. padding-bottom: 0.5em;
  246. }
  247. div.preface h2, div.part h1, div.chapter h2.title, div.sect1 h2.title, div.index h1 {
  248. background: #f5f6f7;
  249. border-bottom: .2em solid #dbddec;
  250. border-top: .2em solid #dbddec;
  251. margin-top 1em;
  252. padding: .5em;
  253. text-align: center;
  254. }
  255. div.book h1 {
  256. background: #f5f6f7;
  257. margin: 0px auto;
  258. padding: 0.5em;
  259. }
  260. div.book h2.subtitle {
  261. background: #dbddec;
  262. margin: 0px auto;
  263. padding: 0.2em;
  264. }
  265. div.authorgroup, div p.copyright, div.abstract {
  266. background: #f5f6f7;
  267. margin: 0px auto;
  268. padding: 1em 0.5em;
  269. }
  270. hr {
  271. background: #dbddec;
  272. height: .3em;
  273. border: 0px;
  274. margin: 0px auto;
  275. padding: 0;
  276. }
  277. </xsl:text>
  278. </style>
  279. </xsl:template>
  280. </xsl:stylesheet>