lfs-nochunks.xsl 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  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. <!-- Stylesheet for non-chunked XHTML output
  6. Replaces {docbook-xsl}/xhtml/profile-docbook.xsl -->
  7. <!-- Upstream XHTML profiled templates -->
  8. <xsl:import href="docbook-xsl-snapshot/xhtml/profile-docbook.xsl"/>
  9. <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
  10. <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
  11. <!-- Including our others customized templates -->
  12. <xsl:include href="lfs-common.xsl"/>
  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. <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
  19. <xsl:param name="book-type">lfs</xsl:param>
  20. <!-- Control generation of ToCs and LoTs -->
  21. <xsl:param name="generate.toc">
  22. book toc,title
  23. preface nop
  24. part nop
  25. chapter nop
  26. appendix nop
  27. sect1 nop
  28. sect2 nop
  29. sect3 nop
  30. sect4 nop
  31. sect5 nop
  32. section nop
  33. </xsl:param>
  34. <!-- How deep should recursive sections appear in the TOC? -->
  35. <xsl:param name="toc.section.depth">1</xsl:param>
  36. <!-- How maximaly deep should be each TOC? -->
  37. <xsl:param name="toc.max.depth">3</xsl:param>
  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 (actualy, skip the hardcoded dot). -->
  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) and $section.autolabel != 0">
  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 some diferences with lfs.css code releated
  85. to h* values, admonitions and no navigational code. -->
  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: verdana, tahoma, helvetica, arial, sans-serif;
  93. text-align: left;
  94. background: #fff;
  95. color: #222;
  96. margin: 1em;
  97. padding: 0;
  98. font-size: 1em;
  99. line-height: 1.2em
  100. }
  101. /* Links */
  102. a:link { color: #22b; }
  103. a.ulink:link { font-weight: bold; color: #55f; }
  104. a:visited { color: #7e4988 ! important; }
  105. a:hover, a:focus { color: #d30e08 ! important; }
  106. a:active { color: #6b77b1 ! important;}
  107. /* Book titlepage */
  108. .book {
  109. margin: 0px auto;
  110. padding: 0 1em;
  111. }
  112. .book h1, .book .authorgroup, .book .copyright, .book .legalnotice .revhistory {
  113. background: #f5f6f7;
  114. margin: 0px auto;
  115. padding: .1em 1em;
  116. }
  117. .book hr {
  118. background: #dbddec;
  119. height: .3em;
  120. border: 0px;
  121. margin: 0;
  122. padding: 0;
  123. }
  124. div.dedication .titlepage {
  125. background: #fff;
  126. }
  127. div.dedication p {
  128. padding-left: 2em;
  129. }
  130. /* Sections */
  131. div.sect1, div.appendix {
  132. padding-left: .3em;
  133. }
  134. .package, .kernel, .installation, .commands, .testing, .configuration, .content {
  135. padding: 0 .5em .2em 0;
  136. margin: 0;
  137. }
  138. .lfs .package {
  139. background: #f5f6f7;
  140. border-bottom: 0.2em solid #dbddec;
  141. padding-top: .1em;
  142. margin-top: 0;
  143. }
  144. .lfs .configuration {
  145. background: #fefefe;
  146. border-top: 0.2em solid #dbddec;
  147. }
  148. .lfs .content {
  149. background: #f5f6f7;
  150. border-top: 0.2em solid #dbddec;
  151. border-bottom: 0.2em solid #dbddec;
  152. padding-bottom: .1em;
  153. margin-bottom: 0;
  154. }
  155. /* Headers */
  156. h1, h2, h3, h4, h5, h6, b, .strong {
  157. color: #000;
  158. font-weight: bold;
  159. line-height: 1em;
  160. }
  161. h1 {
  162. font-size: 173%;
  163. text-align: center;
  164. }
  165. .book h1 {
  166. margin: 0;
  167. padding: 0.4em;
  168. }
  169. h1.title sup {
  170. font-size: small;
  171. }
  172. h2 {
  173. font-size: 144%;
  174. }
  175. .preface h2, .part h1, .chapter h2, .appendix h2, .index h1, .sect1 h2 {
  176. background: #f5f6f7;
  177. border-top: .2em solid #dbddec;
  178. border-bottom: .2em solid #dbddec;
  179. margin-bottom: 1em;
  180. margin-top: 1em;
  181. padding: .4em;
  182. text-align: center;
  183. }
  184. .sect1 h2, .appendix h2 {
  185. margin-left: -.2em;
  186. }
  187. .wrap h2 {
  188. background: #f5f6f7;
  189. border-bottom: 0;
  190. margin-top: 1em;
  191. margin-bottom: 0;
  192. padding-top: .4em;
  193. }
  194. .book h2.subtitle {
  195. text-align: center;
  196. background: #dbddec;
  197. margin: 0;
  198. padding: 0.2em;
  199. }
  200. h3 {
  201. font-size: 120%;
  202. }
  203. .appendix h3 {
  204. font-size: 133%;
  205. margin-top: .8em;
  206. margin-bottom: 0.2em;
  207. }
  208. h4 {
  209. font-size: 110%;
  210. }
  211. .package h4, h5, h6 {
  212. font-size: 100%;
  213. font-style: italic;
  214. }
  215. /* TOC */
  216. div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
  217. list-style: none;
  218. }
  219. div.toc {
  220. padding-left: 1em;
  221. }
  222. li.preface, .part li.appendix {
  223. margin-left: 1em;
  224. }
  225. div.toc h3 {
  226. margin: 1em 0 .3em 0;
  227. }
  228. li.appendix h3, li.glossary h3, li.index h3 {
  229. margin: .5em
  230. }
  231. div.toc h4 {
  232. margin: .6em 0 .2em 0;
  233. }
  234. li.chapter h4 a {
  235. display: block;
  236. margin-bottom: .4em
  237. }
  238. .dummy {
  239. display: block;
  240. font-weight: bold;
  241. font-size: 110%;
  242. margin: .6em 0 .2em 0;
  243. }
  244. /* Index */
  245. .item {
  246. float: left;
  247. }
  248. .secitem {
  249. font-weight: normal;
  250. float: left;
  251. }
  252. .lfs .item + .indexref {
  253. margin-left: 18em;
  254. }
  255. .lfs .secitem + .indexref {
  256. margin-left: 17em;
  257. }
  258. .blfs .indexref {
  259. margin-left: 26em;
  260. }
  261. /* Admonitions */
  262. div.note, div.tip {
  263. background-color: #fffff6;
  264. border: 2px solid #dbddec;
  265. width: 90%;
  266. margin: .5em auto;
  267. }
  268. div.important, div.warning, div.caution {
  269. background-color: #fffff6;
  270. border: medium solid #400;
  271. width: 90%;
  272. margin: .5em auto;
  273. color: #600;
  274. }
  275. div.important h3, div.warning h3, div.caution h3 {
  276. color: #900;
  277. }
  278. div.admonhead h3 {
  279. padding-left: 2.5em;
  280. padding-top: 1em;
  281. }
  282. div.admonbody {
  283. margin: .5em;
  284. }
  285. div.important em, div.warning em, div.caution em {
  286. color: #000;
  287. font-weight: bold;
  288. }
  289. /* table */
  290. .table p.title {
  291. text-align: center;
  292. margin-top: 0;
  293. margin-bottom: .3em;
  294. }
  295. .table table {
  296. margin-left: auto;
  297. margin-right: auto;
  298. }
  299. .table table th, .table table td {
  300. padding: 0.2em 2em 0.2em 2em;
  301. text-align: left;
  302. }
  303. div.revhistory {
  304. padding-left: 1em;
  305. }
  306. div.revhistory th {
  307. line-height: 2em;
  308. text-align: left;
  309. }
  310. div.revhistory td {
  311. padding-right: 1em;
  312. }
  313. /* variablelist as table */
  314. .variablelist table {
  315. width: auto;
  316. margin: 0 1em 0 1em;
  317. }
  318. .variablelist td {
  319. vertical-align: top;
  320. }
  321. .variablelist td span, td p {
  322. margin: 0.25em;
  323. }
  324. .variablelist td p {
  325. margin-top: 0;
  326. }
  327. /* variablelist as list */
  328. dl {
  329. padding-left: 1em
  330. }
  331. dt {
  332. font-weight: bold;
  333. margin-left: 1em;
  334. }
  335. dd {
  336. margin-bottom: .6em;
  337. margin-left: 1em;
  338. }
  339. dd p {
  340. margin-top: 0;
  341. margin-bottom: 0;
  342. padding-top: 0;
  343. padding-bottom: 0;
  344. }
  345. div.materials dt {
  346. display: list-item;
  347. }
  348. div.materials dd {
  349. margin-left: 0;
  350. padding-left: 0;
  351. }
  352. /* segmentedlist */
  353. .appendix .segmentedlist {
  354. padding-left: 1em;
  355. }
  356. .package .seg {
  357. margin-bottom: 0em;
  358. margin-top: 0em;
  359. clear: left;
  360. }
  361. .content .seg {
  362. margin-bottom: .4em;
  363. margin-top: .4em;
  364. clear: left;
  365. }
  366. .segtitle {
  367. float: left;
  368. }
  369. .package .segbody, .appendix .segbody {
  370. display: block;
  371. padding-left: 14em;
  372. }
  373. .content .segbody {
  374. display: block;
  375. padding-left: 12em;
  376. }
  377. /* itemizedlist */
  378. ul {
  379. padding-left: 1em
  380. }
  381. .itemizedlist ul {
  382. margin-left: 1em
  383. }
  384. .itemizedlist li ul {
  385. margin-bottom: 1.2em;
  386. }
  387. .itemizedlist li ul li p {
  388. margin-top: .2em;
  389. margin-bottom: .2em;
  390. }
  391. .itemizedlist li ul li:first-child p:first-child {
  392. margin-top: -.6em;
  393. }
  394. ul.compact {
  395. list-style: none;
  396. }
  397. .blfs ul.compact {
  398. list-style: disc;
  399. }
  400. ul.compact li {
  401. margin: 0em;
  402. padding: 0em;
  403. }
  404. ul.compact li p {
  405. padding: 0.3em;
  406. margin: 0em;
  407. }
  408. .blfs ul.compact li p {
  409. background-color: #f0fff0;
  410. }
  411. /* orderedlist */
  412. ol {
  413. list-style: decimal;
  414. }
  415. ol ol {
  416. list-style: lower-alpha;
  417. }
  418. ol ol ol {
  419. list-style: lower-roman;
  420. }
  421. ol.compact li {
  422. margin: 0em;
  423. padding: 0em;
  424. }
  425. ol.compact li p {
  426. padding: 0.3em;
  427. margin: 0em;
  428. }
  429. /* Indented blocks */
  430. p, blockquote {
  431. padding-left: 1em;
  432. padding-right: 1em;
  433. }
  434. /* Monospaced elements */
  435. tt, code, kbd, pre, .command {
  436. font-family: monospace;
  437. }
  438. .systemitem {
  439. font-style: italic;
  440. }
  441. pre.userinput {
  442. color: #101310;
  443. background-color: #e5e5e5;
  444. border: 1px solid #050505;
  445. padding: .5em 1em;
  446. margin: 0 2em .5em 2em;
  447. font-weight: bold;
  448. }
  449. pre.root {
  450. color: #101310;
  451. background-color: #e5e5e5;
  452. border: 1px solid #11a;
  453. padding: .5em 1em;
  454. margin: 0 2em;
  455. font-weight: bold;
  456. }
  457. pre.screen {
  458. color: #000;
  459. background-color: #e9e9e9;
  460. border: 1px solid #050505;
  461. padding: .5em 1em;
  462. margin: 0 2em;
  463. }
  464. .literal, .prompt {
  465. font-weight: normal;
  466. }
  467. /* Mixed tags */
  468. p.usernotes {
  469. margin-left: -1em;
  470. font-size: small;
  471. font-weight: bold;
  472. font-style: italic;
  473. }
  474. .underlined {
  475. text-decoration: underline;
  476. }
  477. /* Last edited info */
  478. p.updated {
  479. font-size: small;
  480. font-weight: bold;
  481. font-style: italic;
  482. }
  483. </xsl:text>
  484. </style>
  485. </xsl:template>
  486. </xsl:stylesheet>