asciidoctor-pdf 1.5.0.alpha.5 → 1.5.0.alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +7 -0
- data/bin/asciidoctor-pdf +1 -1
- data/bin/optimize-pdf +2 -1
- data/examples/chronicles.adoc +1 -1
- data/lib/asciidoctor-pdf/converter.rb +5 -6
- data/lib/asciidoctor-pdf/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dc73c6c0fd12b13fd37b6a9001b0b085b3458f7
|
4
|
+
data.tar.gz: 03a98a738a9cf9703488a10380619b1f87812654
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76147bac174cf98b029674ad882cb35dfb4df5ed9e69b33f1c3b5ab47993a77d9d7423e38d382ec4b6b834e6d3322ecccfb7b746f72a9031a424e6065bf857a2
|
7
|
+
data.tar.gz: 18e4f064a6af705f35ac64c03cf4b3c8850427314e97686ea834662d09507c55574613eb85eadb246cdb3f80bac4eb471b051b182991717a4dd970d181330e5d
|
data/README.adoc
CHANGED
@@ -228,6 +228,13 @@ The layout and styling of the PDF is driven by a YAML configuration file.
|
|
228
228
|
|
229
229
|
See the files [file]_default-theme.yml_ and [file]_asciidoctor-theme.yml_ found in the [file]_data/themes_ directory for examples.
|
230
230
|
|
231
|
+
Specify the path to an alternate theme file with the `pdf-style` attribute. For example to use the built-in _asciidoctor_ theme:
|
232
|
+
|
233
|
+
$ ./bin/asciidoctor-pdf -a pdf-style=asciidoctor examples/example.adoc
|
234
|
+
|
235
|
+
To refer to a theme at another location you can use the `pdf-stylesdir` attribute to specify the location of themes.
|
236
|
+
If the `pdf-style` value does not end in `.yml`, then the file name is calculated as `{pdf-style}-theme.yml` located in the `pdf-stylesdir` directory (which defaults to the built-in `data/themes` directory).
|
237
|
+
|
231
238
|
== Optional Scripts
|
232
239
|
|
233
240
|
{project-name} also provides a shell script that invokes GhostScript (+gs+) to optimize and compress the generated PDF with minimal impact on quality.
|
data/bin/asciidoctor-pdf
CHANGED
data/bin/optimize-pdf
CHANGED
data/examples/chronicles.adoc
CHANGED
@@ -37,7 +37,7 @@ Behold, the horror!
|
|
37
37
|
|
38
38
|
.Wolpertinger, stuffed
|
39
39
|
[.left.thumb]
|
40
|
-
image::wolpertinger.jpg[Wolpertinger,width=100%,scaledwidth=55
|
40
|
+
image::wolpertinger.jpg[Wolpertinger,width=100%,scaledwidth=55%,link=http://en.wikipedia.org/wiki/Wolpertinger]
|
41
41
|
|
42
42
|
You may not be familiar with these {wolper-uri}[ravenous beasts].
|
43
43
|
Trust us, they'll eat your shorts and suck loops from your code.
|
@@ -150,7 +150,7 @@ class Converter < ::Prawn::Document
|
|
150
150
|
pdf_opts = (build_pdf_options doc, theme)
|
151
151
|
::Prawn::Document.instance_method(:initialize).bind(self).call pdf_opts
|
152
152
|
# QUESTION should ThemeLoader register fonts?
|
153
|
-
register_fonts theme.font_catalog, (doc.attr 'scripts', 'latin')
|
153
|
+
register_fonts theme.font_catalog, (doc.attr 'scripts', 'latin'), (doc.attr 'pdf-fontsdir', ThemeLoader::FontsDir)
|
154
154
|
@theme = theme
|
155
155
|
@font_color = theme.base_font_color
|
156
156
|
init_scratch_prototype
|
@@ -1238,9 +1238,9 @@ class Converter < ::Prawn::Document
|
|
1238
1238
|
@pdfmarks.generate_file target if @pdfmarks
|
1239
1239
|
end
|
1240
1240
|
|
1241
|
-
def register_fonts font_catalog, scripts = 'latin'
|
1241
|
+
def register_fonts font_catalog, scripts = 'latin', fonts_dir
|
1242
1242
|
(font_catalog || {}).each do |key, font_styles|
|
1243
|
-
register_font key => font_styles.map {|style, path| [style.to_sym, (font_path path)]}.to_h
|
1243
|
+
register_font key => font_styles.map {|style, path| [style.to_sym, (font_path path, fonts_dir)]}.to_h
|
1244
1244
|
end
|
1245
1245
|
|
1246
1246
|
@fallback_fonts ||= []
|
@@ -1248,10 +1248,9 @@ class Converter < ::Prawn::Document
|
|
1248
1248
|
default_kerning true
|
1249
1249
|
end
|
1250
1250
|
|
1251
|
-
|
1252
|
-
def font_path font_file
|
1251
|
+
def font_path font_file, fonts_dir
|
1253
1252
|
# resolve relative to built-in font dir unless path is absolute
|
1254
|
-
::File.absolute_path font_file,
|
1253
|
+
::File.absolute_path font_file, fonts_dir
|
1255
1254
|
end
|
1256
1255
|
|
1257
1256
|
def theme_fill_and_stroke_bounds category
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.alpha.
|
4
|
+
version: 1.5.0.alpha.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Allen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -95,6 +95,20 @@ dependencies:
|
|
95
95
|
- - '='
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: 0.16.0
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: thread_safe
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - '='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.3.4
|
105
|
+
type: :runtime
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.3.4
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: treetop
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
208
|
version: 1.3.1
|
195
209
|
requirements: []
|
196
210
|
rubyforge_project:
|
197
|
-
rubygems_version: 2.
|
211
|
+
rubygems_version: 2.4.2
|
198
212
|
signing_key:
|
199
213
|
specification_version: 4
|
200
214
|
summary: Converts AsciiDoc documents to PDF using Prawn
|