Using the Emerald package from CTAN for the drop capitals.
authorDavid Griffith <dave@661.org>
Wed, 13 Apr 2016 07:25:22 +0000 (00:25 -0700)
committerDavid Griffith <dave@661.org>
Wed, 13 Apr 2016 07:25:22 +0000 (00:25 -0700)
README.md
chapters/01.rst
chapters/02.rst
chapters/03.rst
chapters/04.rst
chapters/05.rst
config/preamble.tex
install-emerald.sh [new file with mode: 0755]
uninstall-emerald.sh [new file with mode: 0755]

index 34581352e0b46440940ffb5cd0043eac65b3f26c..6a89c81508709e6bfcf3923c675e903c4b0893d6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -36,6 +36,15 @@ guide from a command prompt, like this:
 
        make html
 
 
        make html
 
+For building the PDF version, you need a reasonably recent installation 
+of TeX Live.  Release 2014 will do.  You will also need the Emerald 
+package from https://www.ctan.org/tex-archive/fonts/emerald/.  This 
+cannot be installed with tlmgr, nor does it seem to be packaged by the 
+usual Linux or BSD distributions.  Scripts for installing and 
+uninstalling Emerald are provided here.  When you're ready, type this:
+
+       make latexpdf
+
 Other formats are available; just type `make` for more details.
 
 Conversion strategy
 Other formats are available; just type `make` for more details.
 
 Conversion strategy
index b04d963834a64cb4e7dddf99b4cfd996cbb03834..4aa43f396965105fcc4d30be4bbb6e35ab399f66 100644 (file)
@@ -9,8 +9,13 @@
    | *A was an archer, who shot at a frog;*
    | *B was a butcher, who had a great dog.*
 
    | *A was an archer, who shot at a frog;*
    | *B was a butcher, who had a great dog.*
 
-.. image:: /images/picB.png
-   :align: left
+.. only:: html
+  .. image:: /images/picB.png
+     :align: left
+
+.. raw:: latex
+
+    \dropcap{b}
 
 efore we start learning to use the Inform system, it's probably sensible
 to consider briefly how IF, which has many narrative elements, differs from
 
 efore we start learning to use the Inform system, it's probably sensible
 to consider briefly how IF, which has many narrative elements, differs from
index 609279e85844cbe4ace98ae09ad922a2bce938af..dfc49ebf9befb42c110be6ff1ed3debba4b19c9e 100644 (file)
@@ -7,8 +7,13 @@
    | *C was a captain, all covered with lace;*
    | *D was a drunkard, and had a red face.*
 
    | *C was a captain, all covered with lace;*
    | *D was a drunkard, and had a red face.*
 
-.. image:: /images/picC.png
-   :align: left
+.. only:: html
+  .. image:: /images/picC.png
+     :align: left
+
+.. raw:: latex
+
+   \dropcap{c}
 
 onventional -- static -- fiction can be written using nothing more than
 pencil and paper, or typewriter, or word-processor; however, the
 
 onventional -- static -- fiction can be written using nothing more than
 pencil and paper, or typewriter, or word-processor; however, the
index d9f2df1010260fb51086ef2d4b0cdcd619c42058..7f72e254d2a9c3164db743e88881b66516dbd82a 100644 (file)
@@ -7,8 +7,13 @@
    | *E was an esquire, with pride on his brow;*
    | *F was a farmer, and followed the plough.*
 
    | *E was an esquire, with pride on his brow;*
    | *F was a farmer, and followed the plough.*
 
-.. image:: /images/picE.png
-   :align: left
+.. only:: html
+  .. image:: /images/picE.png
+     :align: left
+
+.. raw:: latex
+
+    \dropcap{e}
 
 ach of the three games in this guide is created step by step; you'll get
 most benefit (especially to begin with) if you take an active part, typing
 
 ach of the three games in this guide is created step by step; you'll get
 most benefit (especially to begin with) if you take an active part, typing
index 7ca9cf30f232a25b3e9a1fb20f7401120fea451c..337537db9703c9b1c72e1c0c259c011fca276cc8 100644 (file)
@@ -7,8 +7,13 @@
    | *G was a gamester, who had but ill-luck;*
    | *H was a hunter, and hunted a buck.*
 
    | *G was a gamester, who had but ill-luck;*
    | *H was a hunter, and hunted a buck.*
 
-.. image:: /images/picG.png
-   :align: left
+.. only:: html
+  .. image:: /images/picG.png
+     :align: left
+
+.. raw:: latex
+
+    \dropcap{g}
 
 oing through the design of our first game in the previous chapter has
 introduced all sorts of Inform concepts, often without giving you much
 
 oing through the design of our first game in the previous chapter has
 introduced all sorts of Inform concepts, often without giving you much
index 138c850548b0c082a0872773dc17929782dc296b..05d9c6949fab1e99238e71e10a18834399b58301 100644 (file)
@@ -7,8 +7,13 @@
    | *I was an innkeeper, who loved to carouse;*
    | *J was a joiner, and built up a house.*
 
    | *I was an innkeeper, who loved to carouse;*
    | *J was a joiner, and built up a house.*
 
-.. image:: /images/picI.png
-   :align: left
+.. only:: html
+  .. image:: /images/picI.png
+     :align: left
+
+.. raw:: latex
+
+    \dropcap{i}
 
 n even the simplest story, there's bound to be scope for the player to
 attempt activities that you hadn't anticipated.  Sometimes there may be
 
 n even the simplest story, there's bound to be scope for the player to
 attempt activities that you hadn't anticipated.  Sometimes there may be
index 8c4f5888907f965e785e343e5b6307e955187e65..8557210940a9bde9d6ab1f949fc7058c0312c783 100644 (file)
@@ -2,6 +2,9 @@
 
 \usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry}
 \usepackage{setspace}
 
 \usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry}
 \usepackage{setspace}
+\usepackage{emerald}
+\usepackage{type1cm}
+\usepackage{lettrine}
 
 %% Set up page.
 \pagestyle{fancy}
 
 %% Set up page.
 \pagestyle{fancy}
 }
 
 \makeatother
 }
 
 \makeatother
+
+%% For picture alphabet drop caps
+\newcommand{\dropcap}[1]{\lettrine[lines=3]{\ECFAPicture{\fontsize{50}{60}\selectfont #1}\normalfont}{}}
diff --git a/install-emerald.sh b/install-emerald.sh
new file mode 100755 (executable)
index 0000000..79d0967
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# This script installs the Emerald CTAN package from
+# https://www.ctan.org/tex-archive/fonts/emerald/
+# into $TEXMFLOCAL, which is usually /usr/local/share/texmf
+#
+# To use, put emerald.zip in the same directory as this script, unzip
+# emerald.zip, and execute this script.
+#
+# Created by David Griffith <dave@661.org>
+# Released into the public domain 2016
+
+
+
+if [ `ps -o uid= $$` -ne 0 ] ; then
+       echo "This script must be run as root"
+       exit 1
+fi
+
+PERM=644
+DPERM=755
+PKGDIR="emerald"
+TEXMFLOCAL=`kpsewhich -var TEXMFLOCAL`
+
+echo "Installing to $TEXMFLOCAL..."
+echo "Making directories..."
+install -m $DPERM -d   $TEXMFLOCAL/fonts/afm/emerald \
+                       $TEXMFLOCAL/fonts/map/dvips \
+                       $TEXMFLOCAL/fonts/tfm/emerald \
+                       $TEXMFLOCAL/fonts/type1/emerald \
+                       $TEXMFLOCAL/fonts/vf/emerald
+
+install -m $DPERM -d   $TEXMFLOCAL/other $TEXMFLOCAL/tex/latex/emerald
+install -m $DPERM -d   $TEXMFLOCAL $TEXMFLOCAL/web2c
+
+echo "Installing stuff..."
+install -m $PERM -D $PKGDIR/fonts/afm/emerald/* $TEXMFLOCAL/fonts/afm/emerald
+install -m $PERM -D $PKGDIR/fonts/map/dvips/emerald.map $TEXMFLOCAL/fonts/map/dvips
+install -m $PERM -D $PKGDIR/fonts/tfm/emerald/* $TEXMFLOCAL/fonts/tfm/emerald
+install -m $PERM -D $PKGDIR/fonts/type1/emerald/* $TEXMFLOCAL/fonts/type1/emerald
+install -m $PERM -D $PKGDIR/fonts/vf/emerald/* $TEXMFLOCAL/fonts/vf/emerald
+install -m $PERM -D $PKGDIR/other/* $TEXMFLOCAL/other
+install -m $PERM -D $PKGDIR/tex/latex/emerald/* $TEXMFLOCAL/tex/latex/emerald
+
+echo "Map emerald.map" >> $TEXMFLOCAL/web2c/updmap.cfg
+mktexlsr $TEXMFLOCAL
+updmap-sys
diff --git a/uninstall-emerald.sh b/uninstall-emerald.sh
new file mode 100755 (executable)
index 0000000..c2a4640
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# This script uninstalls the Emerald CTAN package from $TEXMFLOCAL.
+# It may be executed anywhere.
+
+# Created by David Griffith <dave@661.org>
+# Released into the public domain 2016
+
+if [ `ps -o uid= $$` -ne 0 ] ; then
+       echo "This script must be run as root"
+       exit 1
+fi
+
+TEXMFLOCAL=`kpsewhich -var TEXMFLOCAL`
+
+echo "Deleting emerald from $TEXMFLOCAL..."
+
+rm -f $TEXMFLOCAL/fonts/map/dvips/emerald.map
+rm -rf $TEXMFLOCAL/fonts/afm/emerald
+rm -rf $TEXMFLOCAL/fonts/tfm/emerald
+rm -rf $TEXMFLOCAL/fonts/type1/emerald
+rm -rf $TEXMFLOCAL/fonts/vf/emerald
+rm -rf $TEXMFLOCAL/tex/latex/emerald
+
+rm -f $TEXMFLOCAL/other/apicture.ttf \
+       $TEXMFLOCAL/other/AUGIE___.INF \
+       $TEXMFLOCAL/other/DECAC___.INF \
+       $TEXMFLOCAL/other/DECADENC.INF \
+       $TEXMFLOCAL/other/DECAIAL_.INF \
+       $TEXMFLOCAL/other/DECAI___.INF \
+       $TEXMFLOCAL/other/DECAIM__.INF \
+       $TEXMFLOCAL/other/DECAITD_.INF \
+       $TEXMFLOCAL/other/DECAWTD_.INF \
+       $TEXMFLOCAL/other/INTID___.INF \
+       $TEXMFLOCAL/other/INTIMACY.INF \
+       $TEXMFLOCAL/other/J.D.____.INF \
+       $TEXMFLOCAL/other/movieola.inf \
+       $TEXMFLOCAL/other/moviettt.inf \
+       $TEXMFLOCAL/other/POOKIE__.INF \
+       $TEXMFLOCAL/other/SKEETCH_.TTF \
+       $TEXMFLOCAL/other/SPANBBI_.INF \
+       $TEXMFLOCAL/other/SPANBB__.INF \
+       $TEXMFLOCAL/other/SPANBI__.INF \
+       $TEXMFLOCAL/other/SPANB___.INF \
+       $TEXMFLOCAL/other/Syriac__.inf \
+       $TEXMFLOCAL/other/Tallpaul.inf \
+       $TEXMFLOCAL/other/TEENSPIR.TTF \
+       $TEXMFLOCAL/other/WEBSTER_.INF
+
+sed -i s/Map\ emerald.map//g $TEXMFLOCAL/web2c/updmap.cfg
+sed -i '/^$/d' $TEXMFLOCAL/web2c/updmap.cfg
+if [ ! -s $TEXMFLOCAL/web2c/updmap.cfg ] ; then
+       rm $TEXMFLOCAL/web2c/updmap.cfg
+fi
+
+rmdir --ignore-fail-on-non-empty $TEXMFLOCAL/fonts/map/dvips \
+                               $TEXMFLOCAL/fonts/afm \
+                               $TEXMFLOCAL/fonts/map \
+                               $TEXMFLOCAL/fonts/tfm \
+                               $TEXMFLOCAL/fonts/type1 \
+                               $TEXMFLOCAL/fonts/vf \
+                               $TEXMFLOCAL/tex/latex \
+                               $TEXMFLOCAL/fonts \
+                               $TEXMFLOCAL/tex \
+                               $TEXMFLOCAL/other \
+                               $TEXMFLOCAL/web2c/
+
+
+mktexlsr $TEXMFLOCAL
+updmap-sys