softcover 1.1.13 → 1.1.14

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: 64f92090e6e884ad0ce37763100d8f93d447e529
4
- data.tar.gz: 3eacc22b0df87ea0163f10729ad372ed513089cd
3
+ metadata.gz: d92df8097c50b1bbc8d5bbf03b7789b3b935a017
4
+ data.tar.gz: 7e71d6e22e26bcc9df396045066018584c4e5c78
5
5
  SHA512:
6
- metadata.gz: efc9a7b8f4837231671256efb38177faaa78899d71041fb6472ed0aeef0df349cbd2365c236226b7ca391f16220a8e7251c46886082202d328763dfb63ea9c2f
7
- data.tar.gz: 2f78d9e38389c13a9052bfdcf6c07dc7289fbc81b9ae69eaf8a8cb19fb2a73c8669e49544c27c99a3a25c6306bdc2336c414130513f8368b5f59889a9d7adce2
6
+ metadata.gz: 228205a85111d21f5cd8a4f11bf4ea8af4acabb7dc1ab3a3ca09e56cd76408dd3fd287ea89bb9dd4e0bf45d3d26e0df7031dc9846307fb177263a86e9b13c26c
7
+ data.tar.gz: 18aa1123eb493e7b4aa9c91c64596c4cdab33c2d56576b9dd4f54a49ea3891f1bd80087783982e262d45bcfe62fb520ec30659f50c38e6028cee8b1b8f9455e4
data/Gemfile CHANGED
@@ -14,6 +14,7 @@ gemspec
14
14
 
15
15
  group :test do
16
16
  gem 'rspec', '2.14.1'
17
+ gem 'safe_yaml', '1.0.4'
17
18
  gem 'webmock', require: false
18
19
  gem 'coveralls', require: false
19
20
  gem 'rack-test'
@@ -0,0 +1,43 @@
1
+ %%
2
+ %% This is file `applekeys.sty',
3
+ %%
4
+ %% This file assumes you have Kino's keysymbols files in both .eps (the original
5
+ %% versions) for use with latex+ghostscript processing via dvips and converted
6
+ %% versions in .pdf (easily created by dropping the .eps files onto, e.g., TeXShop)
7
+ %% for pdflatex processing.
8
+ %%
9
+ %% There is nothing "religious" about the size or vertical placement of each of the
10
+ %% graphics; these just look ok to my eyes, at this time, especially with Lucida Bright.
11
+ %% You are free to change the size and placement as you see fit for personal use.
12
+ %% Just don't ascribe your choices to me.
13
+ %%
14
+ %% 2005/08/24 - Changed \newcommand to \DeclareRobustCommand to
15
+ %% allow easy use in section headings and table of contents. Note: still
16
+ %% a problem with the hyperref package.
17
+ %%
18
+ \ProvidesPackage{applekeys}
19
+ [2005/08/24 H.S.
20
+ For inclusion of apple key graphics
21
+ ]
22
+ \RequirePackage{graphicx}
23
+ \DeclareRobustCommand{\cmdkey}{\raisebox{-.035em}{\includegraphics[height=.75em]{command}}}
24
+ \DeclareRobustCommand{\optkey}{\raisebox{-.005em}{\includegraphics[height=.65em]{option}}}
25
+ \DeclareRobustCommand{\shiftkey}{\raisebox{-.04em}{\includegraphics[height=.83em]{shift}}}
26
+ \DeclareRobustCommand{\ctlkey}{\raisebox{.27em}{\includegraphics[height=.45em]{control}}}
27
+ \DeclareRobustCommand{\delkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{delete}}}
28
+ \DeclareRobustCommand{\applekey}{\raisebox{-0.01em}{\includegraphics[height=.90em]{apple}}}
29
+ \DeclareRobustCommand{\openapplekey}{\raisebox{-0.01em}%
30
+ {\includegraphics[height=.90em]{apple_outline}}}
31
+ \DeclareRobustCommand{\capslockkey}{\raisebox{-0.02em}%
32
+ {\includegraphics[height=.88em]{capslock}}}
33
+ \DeclareRobustCommand{\ejectkey}{\raisebox{0.01em}{\includegraphics[height=.7em]{eject}}}
34
+ \DeclareRobustCommand{\pencilkey}{\raisebox{-0.01em}{\includegraphics[height=.8em]{pencil}}}
35
+ \DeclareRobustCommand{\esckey}{\raisebox{-0.03em}{\includegraphics[height=.75em]{escape}}}
36
+ \DeclareRobustCommand{\tabkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{tab}}}
37
+ \DeclareRobustCommand{\revtabkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{revtab}}}
38
+ \DeclareRobustCommand{\returnkey}{\raisebox{-0.06em}{\includegraphics[height=.65em]{return}}}
39
+ \DeclareRobustCommand{\revreturnkey}{\raisebox{-0.06em}%
40
+ {\includegraphics[height=.65em]{revreturn}}}
41
+ \DeclareRobustCommand{\powerkey}{\raisebox{-0.04em}{\includegraphics[height=.83em]{power}}}
42
+ %%
43
+ %% End of file `applekeys.sty'
@@ -151,11 +151,26 @@
151
151
  \usepackage{float}
152
152
 
153
153
  % Define some commonly used Unicode characters.
154
+ \usepackage{latex_styles/applekeys}
154
155
  \usepackage{newunicodechar}
156
+ \newunicodechar{⌘}{\cmdkey}
157
+ \newunicodechar{⌥}{\optkey}
158
+ \newunicodechar{⌃}{\ctlkey}
159
+ \newunicodechar{⇧}{\shiftkey}
160
+ \newunicodechar{→}{\ensuremath{\rightarrow}}
161
+ \newunicodechar{←}{\ensuremath{\leftarrow}}
162
+ \newunicodechar{↑}{\ensuremath{\uparrow}}
163
+ \newunicodechar{↓}{\ensuremath{\downarrow}}
164
+ \newunicodechar{⇥}{\tabkey}
165
+ \newunicodechar{↵}{\returnkey}
166
+ \newunicodechar{⌫}{\delkey}
167
+ \newunicodechar{␣}{\textvisiblespace}
155
168
  \newunicodechar{—}{---}
156
169
  \newunicodechar{–}{--}
157
170
  \newunicodechar{™}{\texttrademark}
171
+ \newunicodechar{©}{\copyright}
158
172
  \newunicodechar{®}{\textregistered}
173
+ \newunicodechar{…}{\ldots}
159
174
 
160
175
  \usepackage{latex_styles/language_customization}
161
176
 
@@ -147,7 +147,6 @@ class Softcover::BookManifest < OpenStruct
147
147
  chapter_title = content[chapter_title_regex, 1]
148
148
  if article? && @origin == :markdown
149
149
  if chapter_title.nil?
150
- # *** test
151
150
  # Articles are "chapters" with the title of the full document.
152
151
  chapter_title = title
153
152
  else
@@ -185,6 +184,7 @@ class Softcover::BookManifest < OpenStruct
185
184
  files = [File.join(Softcover::Directories::CONFIG, 'marketing.yml'),
186
185
  path('images/cover-web.png'),
187
186
  path('latex_styles/custom_pdf.sty'),
187
+ path('latex_styles/applekeys.sty'),
188
188
  path('config/preamble.tex'),
189
189
  path('config/lang.yml'),
190
190
  path('epub/OEBPS/styles/custom_epub.css'),
@@ -0,0 +1,43 @@
1
+ %%
2
+ %% This is file `applekeys.sty',
3
+ %%
4
+ %% This file assumes you have Kino's keysymbols files in both .eps (the original
5
+ %% versions) for use with latex+ghostscript processing via dvips and converted
6
+ %% versions in .pdf (easily created by dropping the .eps files onto, e.g., TeXShop)
7
+ %% for pdflatex processing.
8
+ %%
9
+ %% There is nothing "religious" about the size or vertical placement of each of the
10
+ %% graphics; these just look ok to my eyes, at this time, especially with Lucida Bright.
11
+ %% You are free to change the size and placement as you see fit for personal use.
12
+ %% Just don't ascribe your choices to me.
13
+ %%
14
+ %% 2005/08/24 - Changed \newcommand to \DeclareRobustCommand to
15
+ %% allow easy use in section headings and table of contents. Note: still
16
+ %% a problem with the hyperref package.
17
+ %%
18
+ \ProvidesPackage{applekeys}
19
+ [2005/08/24 H.S.
20
+ For inclusion of apple key graphics
21
+ ]
22
+ \RequirePackage{graphicx}
23
+ \DeclareRobustCommand{\cmdkey}{\raisebox{-.035em}{\includegraphics[height=.75em]{command}}}
24
+ \DeclareRobustCommand{\optkey}{\raisebox{-.005em}{\includegraphics[height=.65em]{option}}}
25
+ \DeclareRobustCommand{\shiftkey}{\raisebox{-.04em}{\includegraphics[height=.83em]{shift}}}
26
+ \DeclareRobustCommand{\ctlkey}{\raisebox{.27em}{\includegraphics[height=.45em]{control}}}
27
+ \DeclareRobustCommand{\delkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{delete}}}
28
+ \DeclareRobustCommand{\applekey}{\raisebox{-0.01em}{\includegraphics[height=.90em]{apple}}}
29
+ \DeclareRobustCommand{\openapplekey}{\raisebox{-0.01em}%
30
+ {\includegraphics[height=.90em]{apple_outline}}}
31
+ \DeclareRobustCommand{\capslockkey}{\raisebox{-0.02em}%
32
+ {\includegraphics[height=.88em]{capslock}}}
33
+ \DeclareRobustCommand{\ejectkey}{\raisebox{0.01em}{\includegraphics[height=.7em]{eject}}}
34
+ \DeclareRobustCommand{\pencilkey}{\raisebox{-0.01em}{\includegraphics[height=.8em]{pencil}}}
35
+ \DeclareRobustCommand{\esckey}{\raisebox{-0.03em}{\includegraphics[height=.75em]{escape}}}
36
+ \DeclareRobustCommand{\tabkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{tab}}}
37
+ \DeclareRobustCommand{\revtabkey}{\raisebox{-0.02em}{\includegraphics[height=.75em]{revtab}}}
38
+ \DeclareRobustCommand{\returnkey}{\raisebox{-0.06em}{\includegraphics[height=.65em]{return}}}
39
+ \DeclareRobustCommand{\revreturnkey}{\raisebox{-0.06em}%
40
+ {\includegraphics[height=.65em]{revreturn}}}
41
+ \DeclareRobustCommand{\powerkey}{\raisebox{-0.04em}{\includegraphics[height=.83em]{power}}}
42
+ %%
43
+ %% End of file `applekeys.sty'
@@ -151,9 +151,26 @@
151
151
  \usepackage{float}
152
152
 
153
153
  % Define some commonly used Unicode characters.
154
+ \usepackage{latex_styles/applekeys}
154
155
  \usepackage{newunicodechar}
156
+ \newunicodechar{⌘}{\cmdkey}
157
+ \newunicodechar{⌥}{\optkey}
158
+ \newunicodechar{⌃}{\ctlkey}
159
+ \newunicodechar{⇧}{\shiftkey}
160
+ \newunicodechar{→}{\ensuremath{\rightarrow}}
161
+ \newunicodechar{←}{\ensuremath{\leftarrow}}
162
+ \newunicodechar{↑}{\ensuremath{\uparrow}}
163
+ \newunicodechar{↓}{\ensuremath{\downarrow}}
164
+ \newunicodechar{⇥}{\tabkey}
165
+ \newunicodechar{↵}{\returnkey}
166
+ \newunicodechar{⌫}{\delkey}
167
+ \newunicodechar{␣}{\textvisiblespace}
155
168
  \newunicodechar{—}{---}
156
169
  \newunicodechar{–}{--}
170
+ \newunicodechar{™}{\texttrademark}
171
+ \newunicodechar{©}{\copyright}
172
+ \newunicodechar{®}{\textregistered}
173
+ \newunicodechar{…}{\ldots}
157
174
 
158
175
  \usepackage{latex_styles/language_customization}
159
176
 
@@ -115,6 +115,8 @@ module Softcover
115
115
  polytex.gsub!(/(^\s*\\include{(.*?)})/) do
116
116
  File.read($2 + '.tex') + "\n"
117
117
  end
118
+ # Insert a newline, needed to avoid formatting weirdness in articles.
119
+ polytex.gsub!(/\\maketitle/, "\\maketitle\n") if article?
118
120
  Polytexnic::Pipeline.new(polytex,
119
121
  custom_commands: Softcover.custom_styles,
120
122
  language_labels: language_labels,
@@ -13,12 +13,12 @@ module Softcover
13
13
  options[:chapter_number].inspect.inspect
14
14
  end
15
15
  elsif options[:chapter_number].nil?
16
- false
16
+ '#{chapter_number}'
17
17
  else # chapter_number is false, i.e., it's a single page
18
18
  false
19
19
  end
20
20
  fn = if chapter_number
21
- "formatNumber: function (n) { return #{chapter_number} + '.adfadsfa ' + n }"
21
+ "formatNumber: function (n) { return #{chapter_number} + '.' + n }"
22
22
  else
23
23
  ""
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.1.13"
2
+ VERSION = "1.1.14"
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: 1.1.13
4
+ version: 1.1.14
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: 2015-07-17 00:00:00.000000000 Z
12
+ date: 2015-09-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic
@@ -972,6 +972,7 @@ files:
972
972
  - lib/softcover/article_template/images/figures/.gitkeep
973
973
  - lib/softcover/article_template/images/testimonial_1.png
974
974
  - lib/softcover/article_template/latex_gitignore
975
+ - lib/softcover/article_template/latex_styles/applekeys.sty
975
976
  - lib/softcover/article_template/latex_styles/custom.sty
976
977
  - lib/softcover/article_template/latex_styles/custom_pdf.sty
977
978
  - lib/softcover/article_template/latex_styles/framed.sty
@@ -1552,6 +1553,7 @@ files:
1552
1553
  - lib/softcover/book_template/images/figures/.gitkeep
1553
1554
  - lib/softcover/book_template/images/testimonial_1.png
1554
1555
  - lib/softcover/book_template/latex_gitignore
1556
+ - lib/softcover/book_template/latex_styles/applekeys.sty
1555
1557
  - lib/softcover/book_template/latex_styles/custom.sty
1556
1558
  - lib/softcover/book_template/latex_styles/custom_pdf.sty
1557
1559
  - lib/softcover/book_template/latex_styles/framed.sty
@@ -1644,7 +1646,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1644
1646
  version: '0'
1645
1647
  requirements: []
1646
1648
  rubyforge_project:
1647
- rubygems_version: 2.2.2
1649
+ rubygems_version: 2.4.5
1648
1650
  signing_key:
1649
1651
  specification_version: 4
1650
1652
  summary: A typesetting system for technical authors