softcover 0.8.5 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0766ac42866dd85443902b62f6b741921d1a99e8
4
- data.tar.gz: 126280ee50b49530aa9b0f18bc887380e9bd9d29
3
+ metadata.gz: 458fa48d77cb8c70ecad424e5c65e63658791811
4
+ data.tar.gz: 79d6336d43d7b30550162ffb5abad2c507557f5a
5
5
  SHA512:
6
- metadata.gz: 75111c339a56ceee776cd203447f24c252888324b46d027ba620b6fb72181a6c716d00c0b110a384113da29d69f92a355f4f90fcca03ac4fad1245b3615b8374
7
- data.tar.gz: 93e9767c9e2b1f382667a12dfa0e4fc7f872eef4e4913445b562411f52e485185ebb63ee0f37050c58f1fa187a912af6864f2e3e80e0d816956a2e8295d67311
6
+ metadata.gz: 22562b3e132ed75f5f80e13894b8aa62ea77e25eb8660dd1b7675885c02329149e3a01623ef0074190305a3d5a2f5453a035d6f7c04d37344fca2f786ab5e46f
7
+ data.tar.gz: 5cffe6cc9b3c538ceb200e895a8fdf12341a4339b2cc9c93820e1fdb0aa6b5df85e0404dc9e772a9199b9ee40193ef8127733a685bf27566c4e3b62980a083bc
@@ -26,7 +26,7 @@ class Softcover::Book
26
26
  attr_accessor :checksum
27
27
  def initialize(*args)
28
28
  super
29
- @checksum = Digest::MD5.hexdigest File.read path
29
+ @checksum = Digest::MD5.file(path).hexdigest
30
30
  (@@lookup ||= {})[path] = self
31
31
  end
32
32
 
@@ -110,10 +110,17 @@ module Softcover
110
110
  pdf = basename + '.pdf'
111
111
  mkdir('ebooks')
112
112
  # Remove the intermediate tmp files unless only running once.
113
- rm_tmp = options[:once] || Softcover.test? ? "" : "&& rm -f *.tmp.*"
113
+ rm_tmp = keep_tmp_files?(options) ? "" : "&& rm -f *.tmp.*"
114
114
  "mv -f #{tmp_pdf} #{File.join('ebooks', pdf)} #{rm_tmp}"
115
115
  end
116
116
 
117
+ # Keeps tmp files when running once, including when finding overfull.
118
+ # The main purpose is to keep the *.aux files around for the ToC, xrefs,
119
+ # etc.
120
+ def keep_tmp_files?(options)
121
+ options[:once] || options[:'find-overfull'] || Softcover.test?
122
+ end
123
+
117
124
  # Copies the style file to ensure it's always fresh.
118
125
  def copy_polytexnic_sty
119
126
  softcover_sty = File.join(Softcover::Directories::STYLES,
@@ -115,7 +115,7 @@
115
115
  \newenvironment{codelisting}{\refstepcounter{codelisting}\begin{framed_shaded}\vspace{-0.5em}}%
116
116
  {\end{framed_shaded}}
117
117
  % Codelisting captions
118
- \usepackage{caption}
118
+ \usepackage[hypcap=false]{caption}
119
119
  \DeclareCaptionFormat{listing}{\hspace{-0.2em}\colorbox[gray]{.85}{\hspace{0.1em}\parbox{0.997\textwidth}{#1#2#3}}\vspace{-1.3\baselineskip}}
120
120
  \captionsetup[listing]{format=listing,labelfont=bf,skip=16pt,font={rm,normalsize}}
121
121
  \DeclareCaptionType{listing}
@@ -132,7 +132,8 @@
132
132
 
133
133
  % Additional commands
134
134
  \newcommand{\heading}[1]{\textbf{#1}}
135
- \newcommand{\kode}[1]{\textcolor{darkgreen}{\textbf{\texttt{#1}}}}
135
+ \newcommand{\kodesize}{\smaller[0.75]}
136
+ \newcommand{\kode}[1]{\textcolor{darkgreen}{\textbf{\texttt{\kodesize #1}}}}
136
137
 
137
138
  % Subtitle command
138
139
  \usepackage{titling}
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "0.8.5"
2
+ VERSION = "0.8.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: softcover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-05 00:00:00.000000000 Z
12
+ date: 2014-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic