asciidoctor-pdf 1.5.0.alpha.18 → 1.5.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +45 -0
- data/NOTICE.adoc +14 -11
- data/README.adoc +76 -25
- data/asciidoctor-pdf.gemspec +2 -0
- data/data/themes/base-theme.yml +4 -0
- data/data/themes/default-theme.yml +17 -34
- data/data/themes/default-with-fallback-font-theme.yml +22 -0
- data/docs/theming-guide.adoc +957 -892
- data/lib/asciidoctor-pdf/asciidoctor_ext/image.rb +4 -4
- data/lib/asciidoctor-pdf/converter.rb +483 -357
- data/lib/asciidoctor-pdf/core_ext.rb +1 -0
- data/lib/asciidoctor-pdf/core_ext/hash.rb +5 -0
- data/lib/asciidoctor-pdf/formatted_text.rb +1 -0
- data/lib/asciidoctor-pdf/formatted_text/inline_image_arranger.rb +3 -1
- data/lib/asciidoctor-pdf/formatted_text/parser.rb +24 -12
- data/lib/asciidoctor-pdf/formatted_text/parser.treetop +1 -1
- data/lib/asciidoctor-pdf/formatted_text/text_background_and_border_renderer.rb +45 -0
- data/lib/asciidoctor-pdf/formatted_text/transform.rb +44 -21
- data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +9 -11
- data/lib/asciidoctor-pdf/prawn_ext/images.rb +18 -7
- data/lib/asciidoctor-pdf/theme_loader.rb +94 -76
- data/lib/asciidoctor-pdf/version.rb +1 -1
- metadata +26 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 032a48f8d8cda0a29e3e7c3249cb2c74aaccc0f910adcb4607ef30733b70b948
|
4
|
+
data.tar.gz: 1e995ab8292dedab7deef06867f5da0ca41570be9abe88e6be81af999fe4965b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 945a1f3e02ee7c08e7a08f5566dc9bf79aac394674f44665285cf40f7fbaf1bd16c2b2d491b37ad467a5e718c23fa311e245b46f4d46de3f1fe54badf83a69e9
|
7
|
+
data.tar.gz: e3d6c083f0b4ecf716a2264127f523f4a8febfa0a2915838c31f67a4d2cf5201b2178d15a5e6b057528bad4d7b5f685cbc69a8dcaa44538359d2a27532ab8a4c
|
data/CHANGELOG.adoc
CHANGED
@@ -5,6 +5,50 @@
|
|
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/master[commit history] on GitHub.
|
7
7
|
|
8
|
+
== 1.5.0.beta.1 (2019-07-08) - @mojavelinux
|
9
|
+
|
10
|
+
* rename pdf-style and pdf-stylesdir attributes to pdf-theme and pdf-themesdir, respectively (while still honoring the old names for compatibility) (#1127)
|
11
|
+
* don't load fallback font by default; move fallback font to default-with-fallback-font theme
|
12
|
+
* apply cell padding to table cells in the head row (#1098)
|
13
|
+
* allow the theme to control the padding of table cells in the head row using the table_head_cell_padding key (#1098)
|
14
|
+
* fix position of table caption for reduced-width tables when caption align is center (#1138)
|
15
|
+
* adjust width of table caption to match width of table unless table_caption_max_width is none in theme (#1138)
|
16
|
+
* fix position of text in running header (#1087)
|
17
|
+
* ignore start attribute on ordered list if marker is disabled
|
18
|
+
* allow start value to be negative for ordered lists that use arabic or roman numbering (#498)
|
19
|
+
* don't convert values in theme which are not color keys to a string (#1089)
|
20
|
+
* apply page layout specified on page break even when break falls page boundary (#1091)
|
21
|
+
* scale SVG background image to fit page in the same way raster image is scaled (#765)
|
22
|
+
* allow page background size to be controlled using image macro attributes (#1117)
|
23
|
+
* allow page background image position to be controlled using position attribute on image macro (#1124)
|
24
|
+
* add support for fit=cover for cover page, page background, and running content images (#1136)
|
25
|
+
* change default background image position to center (#1124)
|
26
|
+
* allow cover image position to be controlled using position attribute on image macro (#1134)
|
27
|
+
* change default cover image position to center (#1134)
|
28
|
+
* set enable_file_requests_with_root and enable_web_requests options for all SVGs (#683)
|
29
|
+
* automatically set pdf-stylesdir if pdf-style ends with .yml and pdf-stylesdir is not specified (#1126)
|
30
|
+
* replace hyphens with underscores in top-level theme keys
|
31
|
+
* allow hyphens to be used in variable references in theme (#1122)
|
32
|
+
* allow theme to control background and border of inline code (literal) (#306)
|
33
|
+
* allow theme to control background and border of inline button (#451)
|
34
|
+
* resolve null color value in theme to nil (aka not set)
|
35
|
+
* add support for cgi-style options on source language when syntax highlighting with Rouge (#1102)
|
36
|
+
* apply custom theme to chronicles example to customize running content and demonstrate how to extend default theme
|
37
|
+
* drop remapping of legacy running content keys in theme data
|
38
|
+
* resize running content to fit page layout (#1036)
|
39
|
+
* exclude border width from running content area (#1109)
|
40
|
+
* support text-transform property in running content (#702)
|
41
|
+
* make depth of section titles assigned to section-title attribute in running content configurable (#1141)
|
42
|
+
* support width attribute on image in running content if no other dimension attribute is specified
|
43
|
+
* apply correct scale-down logic to image in running content
|
44
|
+
* allow image format to be specified using format attribute (cover page image, page background image, running content image) (#1132)
|
45
|
+
* allow theme to set bottom border properties (color, style, and width) of table head row (#770)
|
46
|
+
* allow column rule and spacing to be specified for running content when multiple columns are specified (#1093)
|
47
|
+
* never load base theme when loading default theme; otherwise load base theme if extends isn't specified, but only if theme data hasn't been initialized
|
48
|
+
* shorten text-alignment attribute to text-align
|
49
|
+
* set PDF version to 1.4 by default (#302)
|
50
|
+
* allow PDF version to be set using pdf-version document attribute (#302)
|
51
|
+
|
8
52
|
== 1.5.0.alpha.18 (2019-06-01) - @mojavelinux
|
9
53
|
|
10
54
|
* restore compatibility with Asciidoctor back to 1.5.3 and add verification to test matrix (#1038)
|
@@ -45,6 +89,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
|
|
45
89
|
* add support for nbsp named entity (i.e., `+ `); replace occurances of nbsp named entity with a single space in outline
|
46
90
|
* upgrade to FontAwesome 5; introduce the fas, far, and fab icon sets, now preferred over fa; drop support for octicons (#891) (@jessedoyle)
|
47
91
|
* place footnotes at end of chapters in books or end of document otherwise (#85) (@bcourtine)
|
92
|
+
* fix rendering of footnotes directly adjacent to text in a normal table cell (#927)
|
48
93
|
* place toc directly after document title when doctype is not book (#233) (@ogmios-voice)
|
49
94
|
* add page layout control to page break (#490) (@resort-diaper)
|
50
95
|
* allow additional style properties to be set per heading level (#176) (@billybooth)
|
data/NOTICE.adoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
= Asciidoctor PDF
|
2
2
|
OpenDevise Inc.; Asciidoctor Project
|
3
3
|
|
4
|
-
Copyright (C) 2014-
|
4
|
+
Copyright (C) 2014-2019 OpenDevise Inc. and the Asciidoctor Project.
|
5
5
|
|
6
6
|
Please visit the Asciidoctor project site for more information:
|
7
7
|
|
@@ -26,7 +26,7 @@ M+ OUTLINE FONTS (M+ TESTFLIGHT 058)::
|
|
26
26
|
|
27
27
|
- http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/index-en.html
|
28
28
|
|
29
|
-
Noto Serif Font (
|
29
|
+
Noto Serif Font (v2015-06-05)::
|
30
30
|
Noto is font family developed by the Google Internationalization Team that aims to support all the world's languages.
|
31
31
|
The Noto Serif font is used for headings and body copy and is bundled in the PDF file.
|
32
32
|
The Noto fonts are licensed under the Apache 2.0 License.
|
@@ -36,7 +36,7 @@ Noto Serif Font (v2014-01-30)::
|
|
36
36
|
|
37
37
|
- https://code.google.com/p/noto/
|
38
38
|
|
39
|
-
Font Awesome Icon Font (
|
39
|
+
Font Awesome Icon Font (v5.4)::
|
40
40
|
Font Awesome (@fontawesome), the iconic font designed for Bootstrap by David Gandy (@davegandy), is used for the admonition icons and other icons in author's content and bundled in the PDF file.
|
41
41
|
Font Awesome is fully open source and GPL compatible.
|
42
42
|
The font is licensed under the SIL Open Font 1.1 License (OFL).
|
@@ -46,14 +46,6 @@ Font Awesome Icon Font (v4.0.3)::
|
|
46
46
|
|
47
47
|
- http://fontawesome.io
|
48
48
|
|
49
|
-
Liberation Fonts (v2.00.1)::
|
50
|
-
The Liberation(tm) Fonts 2.00.1, which are used by default, are licensed under the SIL Open Font License, Version 1.1.
|
51
|
-
You may obtain a copy of the license at:
|
52
|
-
|
53
|
-
http://scripts.sil.org/OFL
|
54
|
-
|
55
|
-
- https://fedorahosted.org/liberation-fonts
|
56
|
-
|
57
49
|
RomanNumeral class::
|
58
50
|
The RomanNumeral class, which is used for numbering of ordered lists, is borrowed from the roman-numerals RubyGem and modified for the purpose of this application.
|
59
51
|
The original RomanNumerals class was written by Andrew Vos and is licensed under the MIT License.
|
@@ -74,3 +66,14 @@ Bootstrap (v3.0.3)::
|
|
74
66
|
The default theme is inspired by Bootstrap 3.0.3.
|
75
67
|
|
76
68
|
- http://getbootstrap.com
|
69
|
+
|
70
|
+
spec/fixtures/cover.jpg::
|
71
|
+
Attribution: Dominicus Johannes Bergsma; License: Creative Commons Attribution-Share Alike 3.0 Unported
|
72
|
+
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
|
73
|
+
|
74
|
+
- https://commons.wikimedia.org/wiki/File:Dahlia_%27Bishop_of_Auckland.JPG
|
75
|
+
|
76
|
+
spec/fixtures/tux.png::
|
77
|
+
Attribution: Larry Ewing, Simon Budig, Garrett LeSage; License: Creative Commons CC0 1.0 Universal Public Domain Dedication
|
78
|
+
|
79
|
+
- https://commons.wikimedia.org/wiki/File:Tux.svg
|
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.5.0.
|
3
|
+
v1.5.0.beta.1, 2019-07-08
|
4
4
|
// Settings:
|
5
5
|
:experimental:
|
6
6
|
:idprefix:
|
@@ -24,7 +24,7 @@ endif::[]
|
|
24
24
|
:project-name: Asciidoctor PDF
|
25
25
|
:project-handle: asciidoctor-pdf
|
26
26
|
// Variables:
|
27
|
-
:release-version: 1.5.0.
|
27
|
+
:release-version: 1.5.0.beta.1
|
28
28
|
// URIs:
|
29
29
|
:uri-asciidoctor: http://asciidoctor.org
|
30
30
|
:uri-gem: http://rubygems.org/gems/asciidoctor-pdf
|
@@ -100,7 +100,7 @@ endif::[]
|
|
100
100
|
== Highlights
|
101
101
|
|
102
102
|
* Direct AsciiDoc to PDF conversion
|
103
|
-
* <<docs/theming-guide#,Configuration-driven style and layout>>
|
103
|
+
* <<docs/theming-guide#,Configuration-driven theme (style and layout)>>
|
104
104
|
* SVG support
|
105
105
|
* PDF document outline (i.e., bookmarks)
|
106
106
|
* Table of contents page(s)
|
@@ -392,12 +392,11 @@ In this case, the image is scaled down to fit on a single page.
|
|
392
392
|
If you want a block image to align to the boundaries of the page (not the content margin), specify the `align-to-page` option (e.g., `opts="align-to-page"`).
|
393
393
|
This is most useful when using vw units because you can make the image cover the entire width of the page.
|
394
394
|
|
395
|
-
Images in running content also support the `fit` attribute.
|
395
|
+
Images in running content and page background images also support the `fit` attribute (when specified using the image macro).
|
396
396
|
If the value of this attribute is `contain`, the image size is increased or decreased to fill the available space while preserving its aspect ratio.
|
397
397
|
If the value of this attribute is `scaled-down`, the image size is first resolved in the normal way, then scaled down further to fit within the available space, if necessary.
|
398
398
|
|
399
|
-
|
400
|
-
Any explicit sizing is ignored for those images.
|
399
|
+
If sizing information is not specified for a page background image, the image is automatically scaled to fit the bounds of the page (i.e., `fit=contain`).
|
401
400
|
|
402
401
|
=== Using the pdfwidth Attribute
|
403
402
|
|
@@ -490,7 +489,7 @@ To perform this work, Asciidoctor delegates to the underlying libraries.
|
|
490
489
|
{uri-prawn-svg}[prawn-svg] brings support for SVG images.
|
491
490
|
Without any additional libraries, those are the only supported image file formats.
|
492
491
|
|
493
|
-
If you need support for additional image formats, such as GIF, TIFF, or interlaced PNG--and you don't want to convert those images to a supported format--you must install the {uri-prawn-gmagick}[prawn-gmagick] Ruby gem.
|
492
|
+
If you need support for additional image formats, such as GIF, TIFF, or interlaced PNG--and you don't want to convert those images to a supported format--you must install the {uri-prawn-gmagick}[prawn-gmagick] (>= 0.0.9) Ruby gem.
|
494
493
|
prawn-gmagick is an extension for Prawn based on {uri-graphicsmagick}[GraphicsMagick] that adds support for all the image formats recognized by that library.
|
495
494
|
prawn-gmagick has the added benefit of significantly reducing the time it takes to generate a PDF containing a lot of images.
|
496
495
|
|
@@ -503,23 +502,25 @@ In addition to support for more additional image file formats, this gem also spe
|
|
503
502
|
|
504
503
|
== STEM Support
|
505
504
|
|
506
|
-
Unlike the built-in HTML converter, Asciidoctor PDF does not provide native support for STEM blocks and inline macros.
|
507
|
-
That's because Asciidoctor core doesn't
|
508
|
-
|
509
|
-
|
505
|
+
Unlike the built-in HTML converter, Asciidoctor PDF does not provide native support for STEM blocks and inline macros (i.e., asciimath and latexmath).
|
506
|
+
That's because Asciidoctor core doesn't process the STEM content itself.
|
507
|
+
It just passes it through to the converter.
|
508
|
+
In the HTML output, Asciidoctor relies on the JavaScript-based MathJax library to parse and render the equations in the browser when the page is loaded.
|
509
|
+
The HTML converter simply wraps the equations in special markup so MathJax can find them.
|
510
510
|
|
511
511
|
In order to insert a rendered equation into the PDF, the toolchain has to parse the equations and convert them to a format the PDF writer (Prawn) can understand.
|
512
512
|
That typically means converting to an image.
|
513
513
|
|
514
|
-
The recommended solution is an extension named Asciidoctor Mathematical, which we'll cover
|
515
|
-
|
516
|
-
|
514
|
+
The recommended solution is an extension named Asciidoctor Mathematical, which we'll cover in this document.
|
515
|
+
|
516
|
+
Another solution, which is still under development, uses Mathoid to convert STEM equations to images.
|
517
|
+
Mathoid is a library that invokes MathJax using a headless browser, so it supports both asciimath and latexmath equations.
|
517
518
|
That prototype can be found in the https://github.com/asciidoctor/asciidoctor-extensions-lab#extension-catalog[Asciidoctor extensions lab].
|
518
519
|
|
519
520
|
=== Asciidoctor Mathematical
|
520
521
|
|
521
|
-
{uri-asciidoctor-mathematical}[Asciidoctor Mathematical] is an extension for Asciidoctor that provides alternate processing of STEM blocks and inline macros.
|
522
|
-
After the document has been parsed, the extension locates all the
|
522
|
+
{uri-asciidoctor-mathematical}[Asciidoctor Mathematical] is an extension for Asciidoctor that provides alternate processing of STEM blocks and inline macros (currently only latexmath).
|
523
|
+
After the document has been parsed, the extension locates all the latexmath blocks and inline macros, converts the equations to images using Mathematical, then replaces them with image nodes.
|
523
524
|
Conversion then proceeds as normal.
|
524
525
|
|
525
526
|
Asciidoctor Mathematical is a Ruby gem that uses native extensions.
|
@@ -627,6 +628,20 @@ Therefore, to print a range of pages as they are labeled in the document, you ne
|
|
627
628
|
For example, if you only want to print the first 5 pages labeled with a page number (e.g., 1-5), and there are 2 pages before the page labeled as page 1, you need to add 2 to both numbers in the range, giving you a physical page range of 3-7.
|
628
629
|
That's the range you need to enter into the print dialog.
|
629
630
|
|
631
|
+
== Title Page
|
632
|
+
|
633
|
+
Unlike other converters, the PDF converter introduces a dedicated title page at the start of the document.
|
634
|
+
The title page contains the doctitle, author, date, and revision info.
|
635
|
+
If a front cover image is specified, the title page comes after the front cover.
|
636
|
+
The title page can be styled using the theme and/or reserved page attributes.
|
637
|
+
|
638
|
+
The title page is enabled if either of these conditions are met:
|
639
|
+
|
640
|
+
* The document has the `book` doctype.
|
641
|
+
* The `title-page` attribute is set (with an empty value) in the document header.
|
642
|
+
|
643
|
+
When the title page is enabled, the table of contents (aka TOC) also gets is own page (or pages, if necessary).
|
644
|
+
|
630
645
|
== Table of Contents
|
631
646
|
|
632
647
|
The table of contents (TOC) is not included by default.
|
@@ -661,28 +676,56 @@ The only restriction is that no index terms may be defined below this section.
|
|
661
676
|
NOTE: Although the catalog is generated automatically, you have to mark the index terms manually.
|
662
677
|
However, you could use an extension, such as a TreeProcessor, to automatically mark index terms.
|
663
678
|
|
664
|
-
==
|
679
|
+
== Optimizing the Generated PDF
|
680
|
+
|
681
|
+
=== optimize-pdf
|
665
682
|
|
666
|
-
{project-name} also provides a shell script that
|
683
|
+
{project-name} also provides a shell script that uses GhostScript (`gs`) to optimize and compress the generated PDF (with minimal impact on quality).
|
667
684
|
You must have Ghostscript installed to use it.
|
668
685
|
|
669
686
|
Here's an example usage:
|
670
687
|
|
671
688
|
$ ./bin/optimize-pdf basic-example.pdf
|
672
689
|
|
673
|
-
The command will generate the file [.path]
|
690
|
+
The command will generate the file [.path]_basic-example-optimized.pdf_ in the same directory.
|
674
691
|
|
675
692
|
WARNING: The `optimize-pdf` script currently requires a Bash shell (Linux, OSX, etc).
|
676
693
|
We plan to rewrite the script in Ruby so it works across platforms (see https://github.com/asciidoctor/asciidoctor-pdf/issues/1[issue #1])
|
677
694
|
|
678
|
-
IMPORTANT: The `optimize-pdf` script relies on Ghostscript >= 9.10.
|
679
|
-
Otherwise, it may actually make the PDF larger.
|
680
|
-
Also, you should only consider using it if the file size of the original PDF is > 5MB.
|
681
|
-
|
682
695
|
If a file is found with the extension `.pdfmark` and the same rootname as the input file, it is used to add metadata to the generated PDF document.
|
683
696
|
This file is necessary to preserve the document metadata since Ghostscript will otherwise drop it.
|
684
697
|
That's why {project-name} always creates this file in addition to the PDF.
|
685
698
|
|
699
|
+
IMPORTANT: The `optimize-pdf` script relies on Ghostscript >= 9.10.
|
700
|
+
Otherwise, it may actually make the PDF larger.
|
701
|
+
You should probably only consider using it if the file size of the original PDF is > 5MB.
|
702
|
+
|
703
|
+
=== hexapdf
|
704
|
+
|
705
|
+
Another option to optimize the PDF is https://hexapdf.gettalong.org/[hexapdf] (gem: hexapdf, command: hexapdf).
|
706
|
+
Before introducing it, though, it's important to point out that its license is AGPL.
|
707
|
+
If that's okay with you, read on to learn how to use it.
|
708
|
+
|
709
|
+
First, install the hexapdf gem using the following command:
|
710
|
+
|
711
|
+
$ gem install hexapdf
|
712
|
+
|
713
|
+
You can then use it to optimize your PDF as follows:
|
714
|
+
|
715
|
+
$ hexapdf optimize --compress-pages --force basic-example.pdf basic-example-optimized.pdf
|
716
|
+
|
717
|
+
This command does not manipulate the images in any way.
|
718
|
+
It merely compresses the objects in the PDF and prunes any unreachable references.
|
719
|
+
But given how much waste Prawn leaves behind, this turns out to reduce the file size significantly.
|
720
|
+
|
721
|
+
To see more options, run:
|
722
|
+
|
723
|
+
$ hexapdf help optimize
|
724
|
+
|
725
|
+
For example, to make the source of the PDF a bit more readable, set the stream-related options to `preserve`.
|
726
|
+
|
727
|
+
hexapdf also allows you to add password protection to your PDF, if that's something you're interested in doing.
|
728
|
+
|
686
729
|
ifndef::env-site[]
|
687
730
|
== Contributing
|
688
731
|
|
@@ -761,6 +804,10 @@ To disable the visual integration tests, pass the `` option:
|
|
761
804
|
|
762
805
|
$ bundle exec rspec -t ~integration
|
763
806
|
|
807
|
+
If a visual integration test fails, you can instruct the test suite to keep the files in the [.path]_spec/output_ directory by setting the `DEBUG` environment variable:
|
808
|
+
|
809
|
+
$ DEBUG=true bundle exec rspec -t integration
|
810
|
+
|
764
811
|
If you want to see the name of each test as it is run, add the `-fd` option:
|
765
812
|
|
766
813
|
$ bundle exec rspec -fd
|
@@ -774,11 +821,15 @@ Running tests using `rspec` directly gives you the advantage of being able to sp
|
|
774
821
|
To run a single test, you can filter by the name of the test.
|
775
822
|
For example, to run all tests that pertain to failures, use:
|
776
823
|
|
777
|
-
$ bundle exec rspec -e fail
|
824
|
+
$ bundle exec rspec -e fail
|
825
|
+
|
826
|
+
To run all tests that have `wip` in the name, use:
|
827
|
+
|
828
|
+
$ bundle exec rspec -e wip
|
778
829
|
|
779
830
|
You can also run all tests in a given file by passing the file's path to rspec:
|
780
831
|
|
781
|
-
$ bundle exec rspec
|
832
|
+
$ bundle exec rspec spec/toc_spec.rb
|
782
833
|
|
783
834
|
For a full list of options that rspec provides, run `rspec -h`.
|
784
835
|
|
data/asciidoctor-pdf.gemspec
CHANGED
@@ -48,6 +48,8 @@ Gem::Specification.new do |s|
|
|
48
48
|
s.add_runtime_dependency 'treetop', '~> 1.5.0'
|
49
49
|
|
50
50
|
s.add_development_dependency 'rake', '~> 12.3.0'
|
51
|
+
# Asciidoctor PDF supports Rouge >= 2; Rouge 3.4.1 emits a superfluous warning in verbose mode
|
52
|
+
s.add_development_dependency 'rouge', '~> 3.4.0', '!= 3.4.1'
|
51
53
|
s.add_development_dependency 'rspec', '~> 3.8.0'
|
52
54
|
s.add_development_dependency 'pdf-inspector', '~> 1.3.0'
|
53
55
|
s.add_development_dependency 'chunky_png', '~> 1.3.0'
|
data/data/themes/base-theme.yml
CHANGED
@@ -21,6 +21,9 @@ base_line_height: 1.15
|
|
21
21
|
base_line_height_length: 13.8
|
22
22
|
base_border_color: 'EEEEEE'
|
23
23
|
base_border_width: 0.5
|
24
|
+
button_content: '[%s]'
|
25
|
+
button_font_family: Courier
|
26
|
+
button_font_style: bold
|
24
27
|
link_font_color: '0000EE'
|
25
28
|
literal_font_family: Courier
|
26
29
|
heading_font_style: bold
|
@@ -91,6 +94,7 @@ table_border_style: solid
|
|
91
94
|
table_border_width: 0.5
|
92
95
|
table_cell_padding: 2
|
93
96
|
table_head_font_style: bold
|
97
|
+
table_head_border_bottom_width: 1.25
|
94
98
|
table_body_stripe_background_color: 'EEEEEE'
|
95
99
|
thematic_break_border_color: 'EEEEEE'
|
96
100
|
thematic_break_border_style: solid
|
@@ -12,15 +12,6 @@ font:
|
|
12
12
|
bold: mplus1mn-bold-ascii.ttf
|
13
13
|
italic: mplus1mn-italic-ascii.ttf
|
14
14
|
bold_italic: mplus1mn-bold_italic-ascii.ttf
|
15
|
-
# M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols
|
16
|
-
# It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font
|
17
|
-
M+ 1p Fallback:
|
18
|
-
normal: mplus1p-regular-fallback.ttf
|
19
|
-
bold: mplus1p-regular-fallback.ttf
|
20
|
-
italic: mplus1p-regular-fallback.ttf
|
21
|
-
bold_italic: mplus1p-regular-fallback.ttf
|
22
|
-
fallbacks:
|
23
|
-
- M+ 1p Fallback
|
24
15
|
page:
|
25
16
|
background_color: ffffff
|
26
17
|
layout: portrait
|
@@ -67,13 +58,17 @@ vertical_rhythm: $base_line_height_length
|
|
67
58
|
horizontal_rhythm: $base_line_height_length
|
68
59
|
# QUESTION should vertical_spacing be block_spacing instead?
|
69
60
|
vertical_spacing: $vertical_rhythm
|
61
|
+
button:
|
62
|
+
content: "[\u2009%s\u2009]"
|
63
|
+
font_style: bold
|
70
64
|
link:
|
71
65
|
font_color: 428bca
|
72
66
|
# literal is currently used for inline monospaced in prose and table cells
|
73
67
|
literal:
|
74
68
|
font_color: b12146
|
75
69
|
font_family: M+ 1mn
|
76
|
-
|
70
|
+
menu:
|
71
|
+
caret_content: " <font size=\"1.15em\"><color rgb=\"b12146\">\u203a</color></font> "
|
77
72
|
heading:
|
78
73
|
align: left
|
79
74
|
#font_color: 181818
|
@@ -173,7 +168,7 @@ code:
|
|
173
168
|
border_radius: $base_border_radius
|
174
169
|
border_width: 0.75
|
175
170
|
conum:
|
176
|
-
font_family:
|
171
|
+
font_family: $literal_font_family
|
177
172
|
font_color: $literal_font_color
|
178
173
|
font_size: $base_font_size
|
179
174
|
line_height: 4 / 3
|
@@ -219,15 +214,16 @@ outline_list:
|
|
219
214
|
item_spacing: $vertical_rhythm / 2
|
220
215
|
table:
|
221
216
|
background_color: $page_background_color
|
222
|
-
#head_background_color: <hex value>
|
223
|
-
#head_font_color: $base_font_color
|
224
|
-
head_font_style: bold
|
225
|
-
#body_background_color: <hex value>
|
226
|
-
body_stripe_background_color: f9f9f9
|
227
|
-
foot_background_color: f0f0f0
|
228
217
|
border_color: dddddd
|
229
218
|
border_width: $base_border_width
|
230
219
|
cell_padding: 3
|
220
|
+
head:
|
221
|
+
font_style: bold
|
222
|
+
border_bottom_width: $base_border_width * 2.5
|
223
|
+
body:
|
224
|
+
stripe_background_color: f9f9f9
|
225
|
+
foot:
|
226
|
+
background_color: f0f0f0
|
231
227
|
toc:
|
232
228
|
indent: $horizontal_rhythm
|
233
229
|
line_height: 1.4
|
@@ -238,7 +234,10 @@ toc:
|
|
238
234
|
footnotes:
|
239
235
|
font_size: round($base_font_size * 0.75)
|
240
236
|
item_spacing: $outline_list_item_spacing / 2
|
241
|
-
|
237
|
+
header:
|
238
|
+
font_size: $base_font_size_small
|
239
|
+
line_height: 1
|
240
|
+
vertical_align: middle
|
242
241
|
footer:
|
243
242
|
font_size: $base_font_size_small
|
244
243
|
# NOTE if background_color is set, background and border will span width of page
|
@@ -248,27 +247,11 @@ footer:
|
|
248
247
|
line_height: 1
|
249
248
|
padding: [$base_line_height_length / 2, 1, 0, 1]
|
250
249
|
vertical_align: top
|
251
|
-
#image_vertical_align: <alignment> or <number>
|
252
|
-
# additional attributes for content:
|
253
|
-
# * {page-count}
|
254
|
-
# * {page-number}
|
255
|
-
# * {document-title}
|
256
|
-
# * {document-subtitle}
|
257
|
-
# * {chapter-title}
|
258
|
-
# * {section-title}
|
259
|
-
# * {section-or-chapter-title}
|
260
250
|
recto:
|
261
251
|
#columns: "<50% =0% >50%"
|
262
252
|
right:
|
263
253
|
content: '{page-number}'
|
264
|
-
#content: '{section-or-chapter-title} | {page-number}'
|
265
|
-
#content: '{document-title} | {page-number}'
|
266
|
-
#center:
|
267
|
-
# content: '{page-number}'
|
268
254
|
verso:
|
269
255
|
#columns: $footer_recto_columns
|
270
256
|
left:
|
271
257
|
content: $footer_recto_right_content
|
272
|
-
#content: '{page-number} | {chapter-title}'
|
273
|
-
#center:
|
274
|
-
# content: '{page-number}'
|