Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 736fdcc

Browse files
author
vagrant
committed
Adding callouts and updating oneoff files
1 parent 872b1b1 commit 736fdcc

24 files changed

+87
-0
lines changed

callouts/1.pdf

16.6 KB
Binary file not shown.

callouts/1.png

329 Bytes
Loading

callouts/10.pdf

27.4 KB
Binary file not shown.

callouts/10.png

361 Bytes
Loading

callouts/11.pdf

27 KB
Binary file not shown.

callouts/11.png

565 Bytes
Loading

callouts/2.pdf

27.4 KB
Binary file not shown.

callouts/2.png

353 Bytes
Loading

callouts/3.pdf

27.6 KB
Binary file not shown.

callouts/3.png

350 Bytes
Loading

callouts/4.pdf

26.9 KB
Binary file not shown.

callouts/4.png

345 Bytes
Loading

callouts/5.pdf

27.5 KB
Binary file not shown.

callouts/5.png

348 Bytes
Loading

callouts/6.pdf

27.5 KB
Binary file not shown.

callouts/6.png

355 Bytes
Loading

callouts/7.pdf

26.9 KB
Binary file not shown.

callouts/7.png

344 Bytes
Loading

callouts/8.pdf

27.8 KB
Binary file not shown.

callouts/8.png

357 Bytes
Loading

callouts/9.pdf

27.6 KB
Binary file not shown.

callouts/9.png

357 Bytes
Loading

theme/pdf/pdf.css

+35
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,43 @@
33
/*--------Put Your Custom CSS Rules Below--------*/
44
/*--- This oneoff overrides the code in https://github.com/oreillymedia/animal_theme/blob/master/pdf/pdf.css---*/
55

6+
/* right align */
7+
8+
.alignmeright
9+
{
10+
text-align: right;
11+
}
12+
13+
/* Font fall backs */
14+
p
15+
{
16+
font-family: "MinionPro", "Symbola", "Arial Unicode MS", "DejaVu Sans", "Code2000";
17+
}
18+
19+
20+
21+
22+
table tbody tr td p
23+
{
24+
font-family: "MinionPro", "Symbola", "Arial Unicode MS", "DejaVu Sans", "Code2000";
25+
}
26+
27+
pre[data-type="programlisting"]
28+
{
29+
font-family: "UbuntuMono", "Arial Unicode MS", "Code2000";
30+
}
31+
code
32+
{
33+
font-family: "UbuntuMono", "Arial Unicode MS", "DejaVu Sans", "Code2000";
34+
}
35+
36+
37+
38+
39+
640
/*----Uncomment to turn on automatic code wrapping
741
42+
843
pre {
944
white-space: pre-wrap;
1045
word-wrap: break-word;

theme/pdf/pdf.xsl

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<xsl:stylesheet version="1.0"
2+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3+
xmlns:h="http://www.w3.org/1999/xhtml"
4+
xmlns="http://www.w3.org/1999/xhtml"
5+
exclude-result-prefixes="h">
6+
7+
<!-- Do add border div for figure images in animal series -->
8+
<xsl:param name="figure.border.div" select="1"/>
9+
10+
<xsl:template name="string-replace-all">
11+
<xsl:param name="text"/>
12+
<xsl:param name="replace"/>
13+
<xsl:param name="by"/>
14+
<xsl:choose>
15+
<xsl:when test="contains($text, $replace)">
16+
<xsl:value-of select="substring-before($text,$replace)"/>
17+
<xsl:value-of select="$by"/>
18+
<xsl:call-template name="string-replace-all">
19+
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
20+
<xsl:with-param name="replace" select="$replace"/>
21+
<xsl:with-param name="by" select="$by"/>
22+
</xsl:call-template>
23+
</xsl:when>
24+
<xsl:otherwise>
25+
<xsl:value-of select="$text"/>
26+
</xsl:otherwise>
27+
</xsl:choose>
28+
</xsl:template>
29+
30+
<xsl:template match="h:img/@src">
31+
<xsl:choose>
32+
<xsl:when test="contains(., 'callouts/')">
33+
<xsl:variable name="newtext">
34+
<xsl:call-template name="string-replace-all">
35+
<xsl:with-param name="text" select="."/>
36+
<xsl:with-param name="replace" select="'png'"/>
37+
<xsl:with-param name="by" select="'pdf'"/>
38+
</xsl:call-template>
39+
</xsl:variable>
40+
<xsl:attribute name="src">
41+
<xsl:value-of select="$newtext"/>
42+
</xsl:attribute>
43+
</xsl:when>
44+
<xsl:otherwise>
45+
<xsl:copy>
46+
<xsl:apply-templates select="@*|node()"/>
47+
</xsl:copy>
48+
</xsl:otherwise>
49+
</xsl:choose>
50+
</xsl:template>
51+
52+
</xsl:stylesheet>

0 commit comments

Comments
 (0)