lfs-nochunks.xsl 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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. <!-- REVISED -->
  6. <!-- Stylesheet for non-chunked XHTML output
  7. Replaces {docbook-xsl}/xhtml/profile-docbook.xsl -->
  8. <!-- Upstream XHTML profiled templates -->
  9. <xsl:import href="docbook-xsl-snapshot/xhtml/profile-docbook.xsl"/>
  10. <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
  11. <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
  12. <!-- Including our others customized templates -->
  13. <xsl:include href="xhtml/lfs-index.xsl"/>
  14. <xsl:include href="xhtml/lfs-mixed.xsl"/>
  15. <xsl:include href="xhtml/lfs-sections.xsl"/>
  16. <xsl:include href="xhtml/lfs-toc.xsl"/>
  17. <xsl:include href="xhtml/lfs-xref.xsl"/>
  18. <!-- Control generation of ToCs and LoTs -->
  19. <xsl:param name="generate.toc">
  20. book toc,title
  21. preface nop
  22. part nop
  23. chapter nop
  24. appendix nop
  25. sect1 nop
  26. sect2 nop
  27. sect3 nop
  28. sect4 nop
  29. sect5 nop
  30. section nop
  31. </xsl:param>
  32. <!-- How deep should recursive sections appear in the TOC? -->
  33. <xsl:param name="toc.section.depth">1</xsl:param>
  34. <!-- How maximaly deep should be each TOC? -->
  35. <xsl:param name="toc.max.depth">3</xsl:param>
  36. <!-- This file contains our localization strings (for internationalization) -->
  37. <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
  38. <!-- Dropping some unwanted style attributes -->
  39. <xsl:param name="ulink.target" select="''"></xsl:param>
  40. <xsl:param name="css.decoration" select="0"></xsl:param>
  41. <!-- Don't use graphics in admonitions -->
  42. <xsl:param name="admon.graphics" select="0"/>
  43. <!-- Changing the admonitions output tagging:
  44. Removed $admon.style support
  45. Hardcoded $admon.textlabel feature -->
  46. <!-- The original template is in {docbook-xsl}/xhtml/admon.xsl -->
  47. <xsl:template name="nongraphical.admonition">
  48. <div class="{name(.)}">
  49. <div class ="admonhead">
  50. <h3 class="admontitle">
  51. <xsl:apply-templates select="." mode="object.title.markup"/>
  52. </h3>
  53. </div>
  54. <div class="admonbody">
  55. <xsl:apply-templates/>
  56. </div>
  57. </div>
  58. </xsl:template>
  59. <!-- sect2.titlepage:
  60. Removed a lot of unneeded code.
  61. Skip empty titles.
  62. No label in preface. -->
  63. <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
  64. <xsl:template name="sect2.titlepage">
  65. <xsl:choose>
  66. <xsl:when test="string-length(title) = 0"/>
  67. <xsl:otherwise>
  68. <div class="titlepage">
  69. <xsl:if test="@id">
  70. <a id="{@id}" name="{@id}"/>
  71. </xsl:if>
  72. <h3 class="{name(.)}">
  73. <xsl:if test="not(ancestor::preface)">
  74. <xsl:apply-templates select="." mode="label.markup"/>
  75. <xsl:text>. </xsl:text>
  76. </xsl:if>
  77. <xsl:value-of select="title"/>
  78. </h3>
  79. </div>
  80. </xsl:otherwise>
  81. </xsl:choose>
  82. </xsl:template>
  83. <!-- The CSS Stylesheet:
  84. Note: there is a few diferences with lfs.css code releated
  85. to h* values-->
  86. <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
  87. <xsl:template name='user.head.content'>
  88. <style type="text/css">
  89. <xsl:text>
  90. /* Global settings */
  91. body {
  92. font-family: sans-serif;
  93. text-align: left;
  94. background: #fff;
  95. color: #333;
  96. margin: 1em;
  97. padding: 0;
  98. font-size: 1em;
  99. line-height: 1.2em
  100. }
  101. a:link { color: #22b; }
  102. a:visited { color: #7e4988; }
  103. a:hover, a:focus { color: #d30e08; }
  104. a:active { color: #6b77b1;}
  105. /* External links in italic font */
  106. a.ulink { font-style: italic; }
  107. /* Headers */
  108. h1, h2, b, strong {
  109. color: #000;
  110. font-weight: bold;
  111. }
  112. h3, h4, h5, h6 {
  113. color: #222;
  114. }
  115. h1 { font-size: 173%; text-align: center; line-height: 1.2em; }
  116. h2 { font-size: 144%; line-height: 1.2em; }
  117. h2.subtitle { text-align: center; line-height: 1.2em; }
  118. h3 { font-size: 120%; padding-top: 0.2em; margin-top: 0.3em; line-height: 1.2em; }
  119. h4 { font-size: 110%; line-height: 1.2em;}
  120. h5, h6 { font-size: 110%; font-style: italic; line-height: 1.2em; }
  121. /* TOC and Index*/
  122. div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
  123. list-style: none;
  124. }
  125. div.toc, div.dedication {
  126. padding-left: 1em;
  127. }
  128. li.preface, li.appendix {
  129. margin-left: 1em;
  130. }
  131. div.toc ul li h3, div.toc ul li h4 {
  132. margin: .4em;
  133. }
  134. .item {
  135. width: 17em;
  136. float: left;
  137. }
  138. .secitem {
  139. font-weight: normal;
  140. width: 16em;
  141. float: left;
  142. }
  143. /* Admonitions */
  144. div.note, div.tip {
  145. background-color: #fffff6;
  146. border: 2px solid #dbddec;
  147. width: 90%;
  148. margin: .5em auto;
  149. }
  150. div.important, div.warning, div.caution {
  151. background-color: #fffff6;
  152. border: medium solid #400;
  153. width: 90%;
  154. margin: 1.5em auto;
  155. color: #600;
  156. font-size: larger;
  157. }
  158. div.important h3, div.warning h3, div.caution h3 {
  159. color: #900;
  160. }
  161. h3.admontitle {
  162. padding-left: 2.5em;
  163. padding-top: 1em;
  164. }
  165. div.admonbody {
  166. margin: .5em;
  167. }
  168. div.important em, div.warning em, div.caution em {
  169. color: #000;
  170. font-weight: bold;
  171. }
  172. div.important tt, div.warning tt, div.caution tt {
  173. font-weight: bold;
  174. }
  175. div.important tt.literal, div.warning tt.literal, div.caution tt.literal {
  176. font-weight: normal;
  177. }
  178. /* variablelist and segmentedlist */
  179. dl {
  180. margin: 0;
  181. padding: 0;
  182. }
  183. dt {
  184. display: list-item;
  185. font-weight: bold;
  186. margin: .33em 0 0 1em;
  187. padding: 0;
  188. }
  189. dd {
  190. margin: 0 0 1em 3em;
  191. padding: 0;
  192. }
  193. table {
  194. width: auto;
  195. margin-left: 1em;
  196. }
  197. td {
  198. vertical-align: top;
  199. }
  200. td span, td p {
  201. margin: 0.3em;
  202. }
  203. span.term {
  204. display: block;
  205. }
  206. div.variablelist dd {
  207. margin-bottom: 1em;
  208. }
  209. div.variablelist dd p {
  210. margin-top: 0px;
  211. margin-bottom: 0px;
  212. padding-top: 0px;
  213. padding-bottom: 0px;
  214. }
  215. dl.materials dd {
  216. margin-left: 0px;
  217. }
  218. div.package div.seg {
  219. margin-bottom: 0em;
  220. margin-top: 0em;
  221. clear: left;
  222. }
  223. div.package span.segtitle, div.appendix span.segtitle {
  224. float: left;
  225. }
  226. div.package span.seg, div.appendix span.seg {
  227. display: block;
  228. padding-left: 14em;
  229. }
  230. div.appendix div.segmentedlist {
  231. padding-left: 1em;
  232. }
  233. div.appendix h3 {
  234. font-size: 133%;
  235. margin-top: 1em;
  236. margin-bottom: 0.2em;
  237. }
  238. div.content div.seg {
  239. margin-bottom: 1em;
  240. margin-top: 1em;
  241. clear: left;
  242. }
  243. div.content span.segtitle {
  244. float: left;
  245. }
  246. div.content span.seg {
  247. display: block;
  248. padding-left: 12em;
  249. }
  250. /* itemizedlist */
  251. div.itemizedlist {
  252. margin-left: 1em;
  253. }
  254. ul[compact="compact"] {
  255. list-style: none;
  256. }
  257. ul[compact="compact"] li {
  258. margin: 0em;
  259. padding: 0em;
  260. }
  261. ul[compact="compact"] li p {
  262. padding: 0.3em;
  263. margin: 0em;
  264. }
  265. /*table */
  266. div.table {
  267. text-align: center;
  268. }
  269. div.table table {
  270. margin-left: auto;
  271. margin-right: auto;
  272. text-align: center;
  273. }
  274. div.table table th, div.table table td {
  275. padding: 0.2em 2em 0.2em 2em;
  276. }
  277. /* Indented blocks */
  278. p, ul, dl, code, blockquote {
  279. padding-left: 1em;
  280. }
  281. /* Monospaced elements */
  282. tt, code, kbd, pre, .command {
  283. font-family: monospace;
  284. }
  285. tt.systemitem {
  286. font-style: italic;
  287. }
  288. pre.userinput {
  289. color: #101310;
  290. background-color: #e5e5e5;
  291. border: 1px solid #050505;
  292. padding: .5em 1em;
  293. margin: 0 2em;
  294. font-weight: bold;
  295. }
  296. .literal {
  297. font-weight: normal;
  298. }
  299. pre.screen {
  300. color: #000;
  301. background-color: #e9e9e9;
  302. border: 1px solid #050505;
  303. padding: .5em 1em;
  304. margin: 0 2em;
  305. }
  306. /* Sections */
  307. div.wrap h2 {
  308. background: #f5f6f7;
  309. padding: 1em 0 0.5em 0;
  310. margin: 0px auto;
  311. }
  312. div.package {
  313. background: #f5f6f7;
  314. border-bottom: 0.2em solid #dbddec;
  315. padding: 0.5em 0.5em 0.3em 0.5em;
  316. margin: 0px auto;
  317. }
  318. div.installation {
  319. padding: 0 0.5em 0.3em 0.5em;
  320. margin: 0.5em 0 0.5em 0;
  321. }
  322. div.configuration {
  323. background: #fefefe;
  324. border-top: 0.2em solid #dbddec;
  325. padding: 0.5em;
  326. margin: 0.5em 0 .5em 0;
  327. }
  328. div.content {
  329. background: #f5f6f7;
  330. border-top: 0.2em solid #dbddec;
  331. border-bottom: 0.2em solid #dbddec;
  332. padding: 0.5em 0.5em 1em 0.5em;
  333. margin: 0.5em 0 .5em 0;
  334. }
  335. div.installation h3.title, div.content h3.title {
  336. padding-top: 0.3em;
  337. margin: 0;
  338. }
  339. div.book, div.preface, div.part, div.chapter, div.sect1, div.appendix, div.index {
  340. padding-bottom: 0.5em;
  341. }
  342. div.preface h2, div.part h1, div.chapter h2, div.sect1 h2, div.appendix h2, div.index h1 {
  343. background: #f5f6f7;
  344. border-bottom: .2em solid #dbddec;
  345. border-top: .2em solid #dbddec;
  346. margin-top 1em;
  347. padding: .5em;
  348. text-align: center;
  349. }
  350. div.book h1 {
  351. background: #f5f6f7;
  352. margin: 0px auto;
  353. padding: 0.5em;
  354. }
  355. div.book h2.subtitle {
  356. background: #dbddec;
  357. margin: 0px auto;
  358. padding: 0.2em;
  359. }
  360. div.authorgroup, div p.copyright, div.abstract {
  361. background: #f5f6f7;
  362. margin: 0px auto;
  363. padding: 1em 0.5em;
  364. }
  365. hr {
  366. background: #dbddec;
  367. height: .3em;
  368. border: 0px;
  369. margin: 0px auto;
  370. padding: 0;
  371. }
  372. </xsl:text>
  373. </style>
  374. </xsl:template>
  375. </xsl:stylesheet>