asciidoctor-pdf 1.6.1 → 1.6.2

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: 38535fd62633525b00cea5277158ac23dbbd1bf515ee577ff867d7a498149b19
4
- data.tar.gz: 24b2f3f50bb62f71416ce783fdd173e7574680ca445e4cd724f265086b2e8978
3
+ metadata.gz: 8acb8483d431db066ec50cd65e6da2d59055c5140c4b41d3500ee9b83a85dcd2
4
+ data.tar.gz: 523bc1fea41b743c4eccece4b1b8dabb09c278fa20e71cb647d2d7add8c691f3
5
5
  SHA512:
6
- metadata.gz: cb5e3a7117b597b3cc2f31ee013adbbf2415d6fa36893b5375e6a2aabffcdff456c72ecce0800a1cff43a637259c1c94321338fc626bb936c38841ce87909015
7
- data.tar.gz: 7a18ab5e3d91cd6c9e1a99d2bd6885beaf329a249144e82a37fbfecbd784aae3758760c9695a82ef44304c951892d76113aad6737c11f720f888a552f00e18ab
6
+ metadata.gz: 04e279e44bfb426474e8ceff464ed41e37b9eaa570bf6824781b938cf6936d203e5ba58d2f533dfc7c558f0d25569cd3cb3ce198d22a72a2f3363f3852b0271f
7
+ data.tar.gz: c859b5eabc90ffcd082866201bd11106cfb6f78ba476f9467e42ec6a873286bb5ac4232f7d8c552b959ba5232069def91580daed60fdf825ff60268236bec151
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 {uri-repo}/commits/v1.6.x[commit history] on GitHub.
7
7
 
8
+ == 1.6.2 (2021-12-31) - @mojavelinux
9
+
10
+ Enhancements::
11
+
12
+ * show URL of link for any media type when show-link-uri is set (#951)
13
+ * do not show URL of link when media type is screen or prepress when show-link-uri is unset (#951)
14
+
15
+ Bug Fixes::
16
+
17
+ * update patches for `PDF::Core.real` and `PDF::Core.real_params` to prevent scientific notation ending up in PDF (#1983) (@rillbert)
18
+
8
19
  == 1.6.1 (2021-09-04) - @mojavelinux
9
20
 
10
21
  Enhancements::
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
- v1.6.1, 2021-09-04
3
+ v1.6.2, 2021-12-31
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: 1.6.x
27
- :release-version: 1.6.1
27
+ :release-version: 1.6.2
28
28
  // URIs:
29
29
  :url-asciidoctor: http://asciidoctor.org
30
30
  :url-gem: http://rubygems.org/gems/asciidoctor-pdf
@@ -634,7 +634,7 @@ For example:
634
634
  [source,yaml]
635
635
  ----
636
636
  title-page:
637
- logo-image: image:logo.png[width=250,align=center]
637
+ logo-image: image:logo.png[pdfwidth=2.5in,align=center]
638
638
  ----
639
639
 
640
640
  === Quoted String
@@ -752,9 +752,9 @@ A sans-serif font that provides a very complete set of Unicode glyphs.
752
752
  Cannot be styled as italic, bold or bold_italic.
753
753
  Used as the fallback font in the `default-with-fallback-font` theme.
754
754
 
755
- TIP: The default themes in 1.5.x do not include the `GEM_FONTS_DIR` prefix in the path of the bundled font files.
756
- Therefore, if you want to specify the location of custom fonts using the `pdf-fontsdir` attribute, yet still be able to use the bundled fonts, you need to refer to the bundled fonts using the `GEM_FONTS_DIR` token.
757
- To do so, you can either a) redeclare the bundle fonts in your theme and prefix the path with the segment `GEM_FONTS_DIR` (e.g., `GEM_FONTS_DIR/mplus1p-regular-fallback.ttf`, or b) include `GEM_FONT_DIR` in the value of the `pdf-fontsdir` attribute separated by the location of your custom fonts using a semi-colon (e.g., `"path/to/your/fonts;GEM_FONTS_DIR"`).
755
+ TIP: The default themes in Asciidoctor PDF < 2 do not include the `GEM_FONTS_DIR` prefix in the path of the bundled font files.
756
+ Therefore, if you want to specify the location of custom fonts using the `pdf-fontsdir` attribute, yet still be able to use the bundled fonts, you need to qualify the path of the bundled fonts using the `GEM_FONTS_DIR` token.
757
+ To do so, you can either a) redeclare the bundle fonts in your theme and prefix the path with the segment `GEM_FONTS_DIR` (e.g., `GEM_FONTS_DIR/mplus1p-regular-fallback.ttf`, or b) include `GEM_FONTS_DIR` in the value of the `pdf-fontsdir` attribute separated by the location of your custom fonts using a semi-colon (e.g., `"path/to/your/fonts;GEM_FONTS_DIR"`).
758
758
 
759
759
  === Custom Fonts
760
760
 
@@ -4835,17 +4835,19 @@ header:
4835
4835
  image-vertical-align: 2 {conum-guard-yaml} <1>
4836
4836
  recto:
4837
4837
  center:
4838
- content: image:footer-logo.png[width=80]
4838
+ content: image:footer-logo.png[pdfwidth=15pt]
4839
4839
  verso:
4840
4840
  center:
4841
4841
  content: $header-recto-center-content
4842
4842
  ----
4843
4843
  <1> You can use the `image-vertical-align` key to slightly nudge the image up or down.
4844
4844
 
4845
- CAUTION: By default, the image must fit in the allotted space for the running header or footer.
4846
- Otherwise, you will run into layout issues.
4847
- Adjust the width attribute accordingly using the `pdfwidth` attribute.
4848
- Alternatively, you can set the `fit` attribute to `scale-down` (e.g., `fit=scale-down`) to reduce the image size to fit in the available space or `contain` (i.e., `fit=contain`) to scale the image (up or down) to fit the available space.
4845
+ CAUTION: The image must fit in the allotted space for the running header or footer.
4846
+ Otherwise, you'll run into layout issues or the image may not display.
4847
+ You can adjust the width of the image to a fixed value using the `pdfwidth` attribute.
4848
+ Alternatively, you can use the `fit` attribute to set the size of the image dynamically based on the available space.
4849
+ Set the `fit` attribute to `scale-down` (e.g., `fit=scale-down`) to reduce the image size to fit in the available space or `contain` (i.e., `fit=contain`) to scale the image (up or down) to fit the available space.
4850
+ You should not rely on the `width` attribute to set the image width when converting to PDF.
4849
4851
 
4850
4852
  == Applying Your Theme
4851
4853
 
@@ -2357,7 +2357,7 @@ module Asciidoctor
2357
2357
  # QUESTION should we insert breakable chars into URI when building fragment instead?
2358
2358
  %(<a href="#{target}"#{attrs.join}>#{breakable_uri text}</a>)
2359
2359
  # NOTE @media may not be initialized if method is called before convert phase
2360
- elsif @media != 'screen' || (doc.attr? 'show-link-uri')
2360
+ elsif (doc.attr? 'show-link-uri') || !(@media == 'screen' || (doc.attribute_locked? 'show-link-uri') || ((doc.instance_variable_get :@attributes_modified).include? 'show-link-uri'))
2361
2361
  # QUESTION should we insert breakable chars into URI when building fragment instead?
2362
2362
  # TODO: allow style of printed link to be controlled by theme
2363
2363
  %(<a href="#{target}"#{attrs.join}>#{text}</a> [<font size="0.85em">#{breakable_uri bare_target}</font>&#93;)
@@ -3,13 +3,15 @@
3
3
  module PDF::Core
4
4
  class << self
5
5
  alias _initial_real real
6
- def real num
7
- num.to_f.round 4
6
+
7
+ # NOTE Makes v1.6.x work with the modified precision settings (0.5f) in Prawn 2.4 while preserving existing behavior
8
+ def real num, precision = 4
9
+ ("%.#{precision}f" % num).sub(/((?<!\.)0)+\z/, '')
8
10
  end
9
11
 
10
12
  alias _initial_real_params real_params
11
13
  def real_params array
12
- return array.map {|it| it.to_f.round 5 }.join ' ' if (caller_locations 1, 1)[0].base_label == 'transformation_matrix'
14
+ return array.map {|e| real e, 5 }.join(' ') if (caller_locations 1, 1)[0].base_label == 'transformation_matrix'
13
15
  _initial_real_params array
14
16
  end
15
17
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module PDF
5
- VERSION = '1.6.1'
5
+ VERSION = '1.6.2'
6
6
  end
7
7
  Pdf = PDF unless const_defined? :Pdf, false
8
8
  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: 1.6.1
4
+ version: 1.6.2
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: 2021-09-04 00:00:00.000000000 Z
12
+ date: 2021-12-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: asciidoctor
@@ -350,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
350
  - !ruby/object:Gem::Version
351
351
  version: '0'
352
352
  requirements: []
353
- rubygems_version: 3.2.22
353
+ rubygems_version: 3.2.32
354
354
  signing_key:
355
355
  specification_version: 4
356
356
  summary: Converts AsciiDoc documents to PDF using Asciidoctor and Prawn