git.iko.soy/typeable/nixpkgs
on master help sign in
nixpkgs docs: Use SVGs for callouts
commita80856cec5811b9eb7778b157e5ea943db26e74b authorGraham Christensen <graham@grahamc.com> dateMon 26 Mar 2018, 14:04 (9 years ago) parent2b3ba40
3 files changed+22−12
doc/Makefile+6−4 doc/default.nix+3−3 doc/style.css+13−5
doc/Makefile+6−4
@@ -17,7 +17,7 @@ validate: manual-full.xml
1717
1818out/html/index.html: manual-full.xml style.css
1919 mkdir -p out/html
20− xsltproc $$xsltFlags \
20+ xsltproc ${xsltFlags} \
2121 --nonet --xinclude \
2222 --output $@ \
2323 "$$XSL/docbook/xhtml/docbook.xsl" \
@@ -26,17 +26,19 @@ out/html/index.html: manual-full.xml style.css
2626 cp ./style.css out/html/style.css
2727
2828 mkdir -p out/html/images/callouts
29− cp "$$XSL/docbook/images/callouts/"*.gif out/html/images/callouts/
29+ cp "$$XSL/docbook/images/callouts/"*.svg out/html/images/callouts/
3030 chmod u+w -R out/html/images/
3131
3232out/epub/manual.epub: manual-full.xml
3333 mkdir -p out/epub/scratch
34− xsltproc $$xsltFlags --nonet \
34+ xsltproc ${xsltFlags} --nonet \
3535 --output out/epub/scratch/ \
3636 "$$XSL/docbook/epub/docbook.xsl" \
3737 ./manual-full.xml
3838
39− cp "$$XSL/docbook/images/callouts/"*.gif out/epub/scratch/OEBPS
39+ cp ./style.css out/epub/scratch/OEBPS
40+ mkdir -p out/epub/scratch/OEBPS/images/callouts/
41+ cp "$$XSL/docbook/images/callouts/"*.svg out/epub/scratch/OEBPS/images/callouts/
4042 echo "application/epub+zip" > mimetype
4143 zip -0Xq "out/epub/manual.epub" mimetype
4244 rm mimetype
doc/default.nix+3−3
@@ -16,11 +16,11 @@ pkgs.stdenv.mkDerivation {
1616 xsltFlags = lib.concatStringsSep " " [
1717 "--param section.autolabel 1"
1818 "--param section.label.includes.component.label 1"
19− "--param html.stylesheet 'style.css'"
19+ "--stringparam html.stylesheet 'style.css'"
2020 "--param xref.with.number.and.title 1"
2121 "--param toc.section.depth 3"
22− "--param admon.style ''"
23− "--param callout.graphics.extension '.gif'"
22+ "--stringparam admon.style ''"
23+ "--stringparam callout.graphics.extension .svg"
2424 ];
2525
2626 postPatch = ''
doc/style.css+13−5
@@ -29,8 +29,8 @@ h2 /* chapters, appendices, subtitle */
2929}
3030
3131/* Extra space between chapters, appendices. */
32−div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
33−{
32+div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
33+{
3434 margin-top: 1.5em;
3535}
3636
@@ -118,6 +118,14 @@ div.example pre.programlisting
118118 margin: 0 0 0 0;
119119}
120120
121+.programlisting img {
122+ width: 1em;
123+}
124+
125+
126+.calloutlist img {
127+ width: 1.5em;
128+}
121129
122130/***************************************************************************
123131 Notes, warnings etc:
@@ -172,7 +180,7 @@ div.navfooter *
172180
173181
174182/***************************************************************************
175− Links colors and highlighting:
183+ Links colors and highlighting:
176184 ***************************************************************************/
177185
178186a { text-decoration: none; }
@@ -209,7 +217,7 @@ tt, code
209217.term
210218{
211219 font-weight: bold;
212−
220+
213221}
214222
215223div.variablelist dd p, div.glosslist dd p
@@ -252,4 +260,4 @@ table
252260div.affiliation
253261{
254262 font-style: italic;
255−}
263+}