Merge pull request #37881 from grahamc/doc/svg-callouts

nixpkgs docs: Use SVGs for callouts
This commit is contained in:
Graham Christensen 2018-03-26 16:01:31 -04:00 committed by GitHub
commit 63406fa1cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 13 deletions

View file

@ -17,26 +17,30 @@ validate: manual-full.xml
out/html/index.html: manual-full.xml style.css
mkdir -p out/html
xsltproc $$xsltFlags \
xsltproc ${xsltFlags} \
--nonet --xinclude \
--output $@ \
"$$XSL/docbook/xhtml/docbook.xsl" \
./manual-full.xml
cp ./overrides.css out/html/
cp ./style.css out/html/style.css
mkdir -p out/html/images/callouts
cp "$$XSL/docbook/images/callouts/"*.gif out/html/images/callouts/
cp "$$XSL/docbook/images/callouts/"*.svg out/html/images/callouts/
chmod u+w -R out/html/images/
out/epub/manual.epub: manual-full.xml
mkdir -p out/epub/scratch
xsltproc $$xsltFlags --nonet \
xsltproc ${xsltFlags} --nonet \
--output out/epub/scratch/ \
"$$XSL/docbook/epub/docbook.xsl" \
./manual-full.xml
cp "$$XSL/docbook/images/callouts/"*.gif out/epub/scratch/OEBPS
cp ./overrides.css out/epub/scratch/OEBPS
cp ./style.css out/epub/scratch/OEBPS
mkdir -p out/epub/scratch/OEBPS/images/callouts/
cp "$$XSL/docbook/images/callouts/"*.svg out/epub/scratch/OEBPS/images/callouts/
echo "application/epub+zip" > mimetype
zip -0Xq "out/epub/manual.epub" mimetype
rm mimetype

View file

@ -16,11 +16,11 @@ pkgs.stdenv.mkDerivation {
xsltFlags = lib.concatStringsSep " " [
"--param section.autolabel 1"
"--param section.label.includes.component.label 1"
"--param html.stylesheet 'style.css'"
"--stringparam html.stylesheet 'style.css overrides.css'"
"--param xref.with.number.and.title 1"
"--param toc.section.depth 3"
"--param admon.style ''"
"--param callout.graphics.extension '.gif'"
"--stringparam admon.style ''"
"--stringparam callout.graphics.extension .svg"
];
postPatch = ''

8
doc/overrides.css Normal file
View file

@ -0,0 +1,8 @@
.programlisting img {
width: 1em;
}
.calloutlist img {
width: 1.5em;
}

View file

@ -29,8 +29,8 @@ h2 /* chapters, appendices, subtitle */
}
/* Extra space between chapters, appendices. */
div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
{
div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
{
margin-top: 1.5em;
}
@ -118,7 +118,6 @@ div.example pre.programlisting
margin: 0 0 0 0;
}
/***************************************************************************
Notes, warnings etc:
***************************************************************************/
@ -172,7 +171,7 @@ div.navfooter *
/***************************************************************************
Links colors and highlighting:
Links colors and highlighting:
***************************************************************************/
a { text-decoration: none; }
@ -209,7 +208,7 @@ tt, code
.term
{
font-weight: bold;
}
div.variablelist dd p, div.glosslist dd p
@ -252,4 +251,4 @@ table
div.affiliation
{
font-style: italic;
}
}