asciidoctor-pdf 2.0.0.rc.1 → 2.0.0

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
  SHA256:
3
- metadata.gz: '09fac4d8ebb3877676d74d2fa320ae0a1f06cf2920d5560e98fde953de11cc08'
4
- data.tar.gz: e91be3fb2d14f512d058d8d01a15cbd2ec9ad58eace2fce55712e17b53e105e7
3
+ metadata.gz: 027a0c91049b52843552b50087dc100ecaf0143bf2d342c2d3e5a8d37bd8fcda
4
+ data.tar.gz: 1723e9c0ab2eab7f2f25dd31e6085e31103724c27eff2e3b9a1fe818d64161af
5
5
  SHA512:
6
- metadata.gz: 9407d5a3cf6e615f0c5a8a8d178c9257b111c385d91a699c55a4dd52b3fbe7c93da964eb13621740274f5b345fc08d035c7b01a7b998bcb2345081478a0cdf0f
7
- data.tar.gz: 51ccb076ce61906d75910950a41f95c37d11575506315c9324e9016a833d85ce2fb6d867ad051f3934ec4e475f79354cf602f25261bf440b307061c9e7aada92
6
+ metadata.gz: d563c7b4def055b2732563910f0abc318d09e566423592a008535730480363a52f36f0d3bd27ed431490d3cf80bc855c8e98dc271556b8b27ea63ebd1a7b284d
7
+ data.tar.gz: 82834fe8af002bc265e09880d8ef11e25e6e9943c1bf6fb4359f655364a15b49e8b71134adbe0fb3db567759944915faabe1cf5720a558751c3fcb53266c1c3f
data/CHANGELOG.adoc CHANGED
@@ -5,6 +5,17 @@
5
5
  This document provides a high-level view of the changes to the {project-name} by release.
6
6
  For a detailed view of what has changed, refer to the {url-repo}/commits/main[commit history] on GitHub.
7
7
 
8
+ == 2.0.0 (2022-05-18) - @mojavelinux
9
+
10
+ Improvements::
11
+
12
+ * use more stable approach to recreating current bounds in scratch document
13
+ * add foundation to support multi-column layout for the body of an article (using an extended converter only)
14
+
15
+ === Details
16
+
17
+ {url-repo}/releases/tag/v2.0.0[git tag] | {url-repo}/compare/v2.0.0.rc.1\...v2.0.0[full diff]
18
+
8
19
  == 2.0.0.rc.1 (2022-05-17) - @mojavelinux
9
20
 
10
21
  Enhancements::
@@ -95,6 +106,7 @@ Enhancements::
95
106
  * use `base-border-color` as default border color; control appearance of border using `border-width` value alone (#2134)
96
107
  * remove border colors in base theme so all border colors can be controlled using `base-border-color` when extending theme
97
108
  * enable running footer when using base theme
109
+ * allow built-in optimizer to set PDF compliance flag (PDF/A and PDF/X) using value of `optimize` attribute (#125)
98
110
 
99
111
  Bug Fixes::
100
112
 
data/README.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor PDF: A native PDF converter for AsciiDoc
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
- v2.0.0.rc.1, 2022-05-17
3
+ v2.0.0, 2022-05-18
4
4
  // Settings:
5
5
  :experimental:
6
6
  :idprefix:
@@ -24,7 +24,7 @@ endif::[]
24
24
  :project-handle: asciidoctor-pdf
25
25
  // Variables:
26
26
  :release-line: 2.0.x
27
- :release-version: 2.0.0.rc.1
27
+ :release-version: 2.0.0
28
28
  // URLs:
29
29
  :url-gem: https://rubygems.org/gems/asciidoctor-pdf
30
30
  :url-project: https://github.com/asciidoctor/asciidoctor-pdf
@@ -4256,7 +4256,7 @@ module Asciidoctor
4256
4256
  b_shift, b_gap_color = (b_width ||= 0.5) * 0.5, @page_bg_color
4257
4257
  end
4258
4258
  ink_caption node_with_caption, category: category if node_with_caption
4259
- extent.from.page += 1 unless extent.from.page == page_number # sanity check
4259
+ extent.from.page += 1 unless extent.from.page == page_number || ColumnBox === bounds # sanity check
4260
4260
  float do
4261
4261
  extent.each_page do |first_page, last_page|
4262
4262
  advance_page unless first_page
@@ -13,6 +13,8 @@ module Asciidoctor
13
13
  include ::Asciidoctor::PDF::Sanitizer
14
14
  include ::Asciidoctor::PDF::TextTransformer
15
15
 
16
+ ColumnBox = ::Prawn::Document::ColumnBox
17
+
16
18
  FontAwesomeIconSets = %w(fab far fas)
17
19
  IconSets = %w(fab far fas fi pf).to_set
18
20
  IconSetPrefixes = IconSets.map {|it| it + '-' }
@@ -543,6 +545,18 @@ module Asciidoctor
543
545
 
544
546
  # Cursor
545
547
 
548
+ # Override the built-in float method to add support for restoring the current column of a ColumnBox
549
+ #
550
+ def float
551
+ original_page_number = page_number
552
+ original_y = y
553
+ original_column = bounds.instance_variable_get :@current_column if ColumnBox === bounds
554
+ yield
555
+ go_to_page original_page_number unless page_number == original_page_number
556
+ self.y = original_y
557
+ bounds.instance_variable_set :@current_column, original_column if original_column
558
+ end
559
+
546
560
  # Short-circuits the call to the built-in move_up operation
547
561
  # when n is 0.
548
562
  #
@@ -1118,10 +1132,14 @@ module Asciidoctor
1118
1132
  # Returns an Extent or ScratchExtent object that describes the bounds of the content block.
1119
1133
  def dry_run keep_together: nil, pages_advanced: 0, single_page: nil, onto: nil, &block
1120
1134
  (scratch_pdf = scratch).start_new_page
1121
- scratch_bounds = scratch_pdf.bounds
1122
- restore_bounds = [:@total_left_padding, :@total_right_padding, :@width, :@x].each_with_object({}) do |name, accum|
1123
- accum[name] = scratch_bounds.instance_variable_get name
1124
- scratch_bounds.instance_variable_set name, (bounds.instance_variable_get name)
1135
+ saved_bounds = scratch_pdf.bounds
1136
+ scratch_pdf.bounds = bounds.dup.tap do |bounds_copy|
1137
+ bounds_copy.instance_variable_set :@document, scratch_pdf
1138
+ bounds_copy.instance_variable_set :@parent, saved_bounds
1139
+ if ColumnBox === bounds_copy
1140
+ bounds_copy.instance_variable_set :@width, bounds_copy.bare_column_width
1141
+ bounds_copy.instance_variable_set :@current_column, (bounds_copy.instance_variable_set :@columns, 1) - 1
1142
+ end
1125
1143
  end
1126
1144
  scratch_pdf.move_cursor_to cursor unless (scratch_start_at_top = keep_together || pages_advanced > 0 || at_page_top?)
1127
1145
  scratch_start_cursor = scratch_pdf.cursor
@@ -1163,7 +1181,7 @@ module Asciidoctor
1163
1181
  extent = ScratchExtent.new scratch_start_page, scratch_start_cursor, scratch_end_page, scratch_end_cursor
1164
1182
  onto ? extent.position_onto(*onto) : extent
1165
1183
  ensure
1166
- restore_bounds.each {|name, val| scratch_bounds.instance_variable_set name, val }
1184
+ scratch_pdf.bounds = saved_bounds
1167
1185
  end
1168
1186
  end
1169
1187
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module PDF
5
- VERSION = '2.0.0.rc.1'
5
+ VERSION = '2.0.0'
6
6
  end
7
7
  end
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: 2.0.0.rc.1
4
+ version: 2.0.0
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: 2022-05-17 00:00:00.000000000 Z
12
+ date: 2022-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: asciidoctor
@@ -325,9 +325,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
325
325
  version: '0'
326
326
  required_rubygems_version: !ruby/object:Gem::Requirement
327
327
  requirements:
328
- - - ">"
328
+ - - ">="
329
329
  - !ruby/object:Gem::Version
330
- version: 1.3.1
330
+ version: '0'
331
331
  requirements: []
332
332
  rubygems_version: 3.3.7
333
333
  signing_key: