asciidoctor-pdf 1.5.0.beta.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +277 -2
  3. data/LICENSE.adoc +1 -1
  4. data/NOTICE.adoc +1 -1
  5. data/README.adoc +486 -292
  6. data/asciidoctor-pdf.gemspec +12 -11
  7. data/bin/asciidoctor-pdf +2 -6
  8. data/bin/asciidoctor-pdf-optimize +20 -0
  9. data/data/fonts/ABOUT-mplus1mn-subset +26 -0
  10. data/data/fonts/ABOUT-mplus1p-subset +26 -0
  11. data/data/fonts/ABOUT-notoemoji-subset +3 -0
  12. data/data/fonts/ABOUT-notoserif-subset +26 -0
  13. data/data/fonts/{LICENSE-mplus-testflight-58 → LICENSE-mplus} +2 -2
  14. data/data/fonts/{LICENSE-noto-2015-06-05 → LICENSE-notoserif} +0 -0
  15. data/data/fonts/mplus1mn-bold-ascii.ttf +0 -0
  16. data/data/fonts/mplus1mn-bold-subset.ttf +0 -0
  17. data/data/fonts/mplus1mn-bold_italic-ascii.ttf +0 -0
  18. data/data/fonts/mplus1mn-bold_italic-subset.ttf +0 -0
  19. data/data/fonts/mplus1mn-italic-ascii.ttf +0 -0
  20. data/data/fonts/mplus1mn-italic-subset.ttf +0 -0
  21. data/data/fonts/mplus1mn-regular-ascii-conums.ttf +0 -0
  22. data/data/fonts/mplus1mn-regular-subset.ttf +0 -0
  23. data/data/fonts/mplus1p-regular-fallback.ttf +0 -0
  24. data/data/fonts/notoemoji-subset.ttf +0 -0
  25. data/data/fonts/notoserif-bold-subset.ttf +0 -0
  26. data/data/fonts/notoserif-bold_italic-subset.ttf +0 -0
  27. data/data/fonts/notoserif-italic-subset.ttf +0 -0
  28. data/data/fonts/notoserif-regular-subset.ttf +0 -0
  29. data/data/themes/base-theme.yml +22 -4
  30. data/data/themes/default-theme.yml +59 -29
  31. data/data/themes/default-with-fallback-font-theme.yml +4 -17
  32. data/docs/theming-guide.adoc +1647 -167
  33. data/lib/asciidoctor/pdf/converter.rb +4489 -0
  34. data/lib/{asciidoctor-pdf/asciidoctor_ext → asciidoctor/pdf/ext/asciidoctor}/abstract_block.rb +2 -0
  35. data/lib/asciidoctor/pdf/ext/asciidoctor/abstract_node.rb +7 -0
  36. data/lib/{asciidoctor-pdf/asciidoctor_ext → asciidoctor/pdf/ext/asciidoctor}/document.rb +2 -0
  37. data/lib/asciidoctor/pdf/ext/asciidoctor/image.rb +35 -0
  38. data/lib/{asciidoctor-pdf/asciidoctor_ext → asciidoctor/pdf/ext/asciidoctor}/list.rb +4 -2
  39. data/lib/{asciidoctor-pdf/asciidoctor_ext → asciidoctor/pdf/ext/asciidoctor}/list_item.rb +3 -1
  40. data/lib/asciidoctor/pdf/ext/asciidoctor/logging_shim.rb +33 -0
  41. data/lib/{asciidoctor-pdf/asciidoctor_ext → asciidoctor/pdf/ext/asciidoctor}/section.rb +9 -6
  42. data/lib/asciidoctor/pdf/ext/asciidoctor.rb +11 -0
  43. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/array.rb +6 -0
  44. data/lib/asciidoctor/pdf/ext/core/file.rb +9 -0
  45. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/hash.rb +2 -0
  46. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/numeric.rb +5 -3
  47. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/object.rb +3 -1
  48. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/quantifiable_stdout.rb +9 -1
  49. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/regexp.rb +2 -0
  50. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/string.rb +9 -13
  51. data/lib/asciidoctor/pdf/ext/core.rb +10 -0
  52. data/lib/asciidoctor/pdf/ext/pdf-core/page.rb +54 -0
  53. data/lib/asciidoctor/pdf/ext/pdf-core/pdf_object.rb +8 -0
  54. data/lib/asciidoctor/pdf/ext/pdf-core.rb +4 -0
  55. data/lib/asciidoctor/pdf/ext/prawn/coderay_encoder.rb +117 -0
  56. data/lib/asciidoctor/pdf/ext/prawn/extensions.rb +922 -0
  57. data/lib/{asciidoctor-pdf/prawn_ext → asciidoctor/pdf/ext/prawn}/font/afm.rb +14 -10
  58. data/lib/asciidoctor/pdf/ext/prawn/font_metric_cache.rb +9 -0
  59. data/lib/asciidoctor/pdf/ext/prawn/formatted_text/box.rb +66 -0
  60. data/lib/{asciidoctor-pdf/prawn_ext → asciidoctor/pdf/ext/prawn}/formatted_text/fragment.rb +16 -12
  61. data/lib/asciidoctor/pdf/ext/prawn/images.rb +54 -0
  62. data/lib/asciidoctor/pdf/ext/prawn-svg/interface.rb +14 -0
  63. data/lib/{asciidoctor-pdf/prawn-svg_ext.rb → asciidoctor/pdf/ext/prawn-svg.rb} +3 -1
  64. data/lib/asciidoctor/pdf/ext/prawn-table/cell/asciidoc.rb +76 -0
  65. data/lib/{asciidoctor-pdf/prawn-table_ext → asciidoctor/pdf/ext/prawn-table}/cell/text.rb +6 -3
  66. data/lib/{asciidoctor-pdf/prawn-table_ext → asciidoctor/pdf/ext/prawn-table}/cell.rb +10 -10
  67. data/lib/asciidoctor/pdf/ext/prawn-table.rb +6 -0
  68. data/lib/{asciidoctor-pdf/prawn-templates_ext.rb → asciidoctor/pdf/ext/prawn-templates.rb} +2 -0
  69. data/lib/asciidoctor/pdf/ext/prawn.rb +9 -0
  70. data/lib/asciidoctor/pdf/ext/pygments.rb +34 -0
  71. data/lib/asciidoctor/pdf/ext/rouge/formatters/prawn.rb +208 -0
  72. data/lib/{asciidoctor-pdf/rouge_ext → asciidoctor/pdf/ext/rouge}/themes/asciidoctor_pdf_default.rb +2 -0
  73. data/lib/asciidoctor/pdf/ext/rouge.rb +5 -0
  74. data/lib/asciidoctor/pdf/ext.rb +9 -0
  75. data/lib/asciidoctor/pdf/formatted_text/formatter.rb +43 -0
  76. data/lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb +14 -0
  77. data/lib/asciidoctor/pdf/formatted_text/inline_destination_marker.rb +21 -0
  78. data/lib/asciidoctor/pdf/formatted_text/inline_image_arranger.rb +134 -0
  79. data/lib/asciidoctor/pdf/formatted_text/inline_image_renderer.rb +51 -0
  80. data/lib/asciidoctor/pdf/formatted_text/inline_text_aligner.rb +22 -0
  81. data/lib/{asciidoctor-pdf → asciidoctor/pdf}/formatted_text/parser.rb +31 -7
  82. data/lib/{asciidoctor-pdf → asciidoctor/pdf}/formatted_text/parser.treetop +3 -4
  83. data/lib/asciidoctor/pdf/formatted_text/source_wrap.rb +43 -0
  84. data/lib/asciidoctor/pdf/formatted_text/text_background_and_border_renderer.rb +55 -0
  85. data/lib/asciidoctor/pdf/formatted_text/transform.rb +394 -0
  86. data/lib/{asciidoctor-pdf → asciidoctor/pdf}/formatted_text.rb +4 -0
  87. data/lib/asciidoctor/pdf/index_catalog.rb +133 -0
  88. data/lib/asciidoctor/pdf/measurements.rb +62 -0
  89. data/lib/asciidoctor/pdf/optimizer.rb +44 -0
  90. data/lib/asciidoctor/pdf/pdfmark.rb +41 -0
  91. data/lib/asciidoctor/pdf/roman_numeral.rb +128 -0
  92. data/lib/asciidoctor/pdf/sanitizer.rb +45 -0
  93. data/lib/asciidoctor/pdf/text_transformer.rb +116 -0
  94. data/lib/asciidoctor/pdf/theme_loader.rb +305 -0
  95. data/lib/asciidoctor/pdf/version.rb +8 -1
  96. data/lib/asciidoctor/pdf.rb +15 -1
  97. data/lib/asciidoctor-pdf/converter.rb +2 -3824
  98. data/lib/asciidoctor-pdf/version.rb +3 -6
  99. data/lib/asciidoctor-pdf.rb +3 -4
  100. metadata +130 -85
  101. data/lib/asciidoctor-pdf/asciidoctor_ext/image.rb +0 -24
  102. data/lib/asciidoctor-pdf/asciidoctor_ext/logging_shim.rb +0 -25
  103. data/lib/asciidoctor-pdf/asciidoctor_ext.rb +0 -8
  104. data/lib/asciidoctor-pdf/core_ext/ostruct.rb +0 -8
  105. data/lib/asciidoctor-pdf/core_ext.rb +0 -6
  106. data/lib/asciidoctor-pdf/formatted_text/formatter.rb +0 -40
  107. data/lib/asciidoctor-pdf/formatted_text/inline_destination_marker.rb +0 -21
  108. data/lib/asciidoctor-pdf/formatted_text/inline_image_arranger.rb +0 -160
  109. data/lib/asciidoctor-pdf/formatted_text/inline_image_renderer.rb +0 -46
  110. data/lib/asciidoctor-pdf/formatted_text/inline_text_aligner.rb +0 -20
  111. data/lib/asciidoctor-pdf/formatted_text/text_background_and_border_renderer.rb +0 -45
  112. data/lib/asciidoctor-pdf/formatted_text/transform.rb +0 -294
  113. data/lib/asciidoctor-pdf/implicit_header_processor.rb +0 -63
  114. data/lib/asciidoctor-pdf/index_catalog.rb +0 -127
  115. data/lib/asciidoctor-pdf/measurements.rb +0 -58
  116. data/lib/asciidoctor-pdf/pdf-core_ext/page.rb +0 -25
  117. data/lib/asciidoctor-pdf/pdf-core_ext/pdf_object.rb +0 -6
  118. data/lib/asciidoctor-pdf/pdf-core_ext.rb +0 -2
  119. data/lib/asciidoctor-pdf/pdfmark.rb +0 -33
  120. data/lib/asciidoctor-pdf/prawn-svg_ext/interface.rb +0 -10
  121. data/lib/asciidoctor-pdf/prawn-table_ext/cell/asciidoc.rb +0 -69
  122. data/lib/asciidoctor-pdf/prawn-table_ext.rb +0 -4
  123. data/lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb +0 -115
  124. data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +0 -904
  125. data/lib/asciidoctor-pdf/prawn_ext/images.rb +0 -51
  126. data/lib/asciidoctor-pdf/prawn_ext.rb +0 -5
  127. data/lib/asciidoctor-pdf/roman_numeral.rb +0 -126
  128. data/lib/asciidoctor-pdf/rouge_ext/formatters/prawn.rb +0 -175
  129. data/lib/asciidoctor-pdf/rouge_ext/themes/bw.rb +0 -38
  130. data/lib/asciidoctor-pdf/rouge_ext.rb +0 -4
  131. data/lib/asciidoctor-pdf/sanitizer.rb +0 -101
  132. data/lib/asciidoctor-pdf/temporary_path.rb +0 -13
  133. data/lib/asciidoctor-pdf/theme_loader.rb +0 -280
  134. data/lib/asciidoctor-pdf/ttfunk_ext.rb +0 -8
@@ -29,28 +29,29 @@ Gem::Specification.new do |s|
29
29
  files = Dir['**/*']
30
30
  end
31
31
  s.files = files.grep %r/^(?:(?:data|lib)\/.+|docs\/theming-guide\.adoc|(?:CHANGELOG|LICENSE|NOTICE|README)\.adoc|\.yardopts|#{s.name}\.gemspec)$/
32
- # FIXME optimize-pdf is currently a shell script, so listing it here won't work
33
- #s.executables = (files.grep %r/^bin\//).map {|f| File.basename f }
34
- s.executables = ['asciidoctor-pdf']
32
+ s.executables = (files.grep %r/^bin\//).map {|f| File.basename f }
35
33
  s.require_paths = ['lib']
36
34
  #s.test_files = files.grep %r/^(?:test|spec|feature)\/.*$/
37
35
 
38
36
  s.add_runtime_dependency 'asciidoctor', '>= 1.5.3', '< 3.0.0'
39
37
  s.add_runtime_dependency 'prawn', '~> 2.2.0'
38
+ # NOTE ttfunk 1.6 generates TT instructions ghostscript cannot process, so lock the version of ttfunk
39
+ s.add_runtime_dependency 'ttfunk', ['~> 1.5.0'], ['>= 1.5.1']
40
+ # NOTE must use prawn-table from master branch (defined in Gemfile) for full functionality
40
41
  s.add_runtime_dependency 'prawn-table', '~> 0.2.0'
41
42
  s.add_runtime_dependency 'prawn-templates', '~> 0.1.0'
42
- s.add_runtime_dependency 'prawn-svg', '~> 0.29.0'
43
- s.add_runtime_dependency 'prawn-icon', '~> 2.3.0'
43
+ s.add_runtime_dependency 'prawn-svg', '~> 0.30.0'
44
+ s.add_runtime_dependency 'prawn-icon', '~> 2.5.0'
44
45
  s.add_runtime_dependency 'safe_yaml', '~> 1.0.0'
45
46
  s.add_runtime_dependency 'thread_safe', '~> 0.3.0'
46
47
  s.add_runtime_dependency 'concurrent-ruby', '~> 1.1.0'
47
- # For our usage, treetop 1.6 is slower than treetop 1.5
48
- s.add_runtime_dependency 'treetop', '~> 1.5.0'
48
+ s.add_runtime_dependency 'treetop', '~> 1.6.0'
49
49
 
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'
53
- s.add_development_dependency 'rspec', '~> 3.8.0'
50
+ s.add_development_dependency 'rake', '~> 13.0.0'
51
+ s.add_development_dependency 'rspec', '~> 3.9.0'
54
52
  s.add_development_dependency 'pdf-inspector', '~> 1.3.0'
53
+ # Asciidoctor PDF supports Rouge >= 2 (verified in CI build using 2.0.0)
54
+ s.add_development_dependency 'rouge', '~> 3.0'
55
+ s.add_development_dependency 'coderay', '~> 1.1.0'
55
56
  s.add_development_dependency 'chunky_png', '~> 1.3.0'
56
57
  end
data/bin/asciidoctor-pdf CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  if File.file?(asciidoctor_pdf = (File.expand_path '../../lib/asciidoctor/pdf.rb', __FILE__))
4
5
  require asciidoctor_pdf
@@ -12,12 +13,7 @@ options = Asciidoctor::Cli::Options.new backend: 'pdf', header_footer: true
12
13
  # FIXME provide an API in Asciidoctor for sub-components to print version information
13
14
  unless ARGV != ['-v'] && (ARGV & ['-V', '--version']).empty?
14
15
  $stdout.write %(Asciidoctor PDF #{Asciidoctor::PDF::VERSION} using )
15
- # NOTE the print_version method was added in Asciidoctor 1.5.2
16
- if options.respond_to? :print_version
17
- options.print_version
18
- else
19
- puts %(Asciidoctor #{::Asciidoctor::VERSION} [http://asciidoctor.org])
20
- end
16
+ options.print_version
21
17
  exit 0
22
18
  end
23
19
 
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ optimizer = File.absolute_path '../lib/asciidoctor/pdf/optimizer.rb', __dir__
5
+ if File.exist? optimizer
6
+ require optimizer
7
+ else
8
+ require 'asciidoctor/pdf/optimizer'
9
+ end
10
+
11
+ args = ARGV.dup
12
+
13
+ unless (filename = args.pop)
14
+ warn 'asciidoctor-pdf-optimize: Please specify a PDF file to optimize.'
15
+ exit 1
16
+ end
17
+
18
+ quality = args[0] == '--quality' ? args[1].to_s : ''
19
+
20
+ (Asciidoctor::PDF::Optimizer.new quality).generate_file filename
@@ -0,0 +1,26 @@
1
+ M+ fonts are generated from the M+ outline fonts TESTFLIGHT 63a retrieved from http://mplus-fonts.osdn.jp/mplus-outline-fonts/download/index-en.html.
2
+
3
+ The following changes were made using fontforge to produce mplus1mn-*-ascii.ttf fonts:
4
+
5
+ * Subsetted to include (ascii variant):
6
+ ** Non-visible Characters (U+00a0)
7
+ ** Basic Latin (U+0020–U+007e)
8
+ ** Enclosed Numbers (U+2460–U+2473, U+2776–U+277f, U+24eb–U+24f4) (M+ 1mn Regular only)
9
+ ** Box Drawing Symbols (U+2500–U+257f)
10
+ ** .notdef glyph
11
+ * Subsetted to include (subset variant):
12
+ ** Non-visible Characters (U+00a0)
13
+ ** Basic Latin (U+0020–U+007e)
14
+ ** Latin-1 Supplement (U+00a0–U+00fd)
15
+ ** Latin Extended-A (U+0100–U+017f)
16
+ ** Greek Alphabet (U+0391–U+03c9)
17
+ ** Cyrillic (U+0400–U+04ff)
18
+ ** Assorted Symbols (U+20ac)
19
+ ** Enclosed Numbers (U+2460–U+2473, U+2776–U+277f, U+24eb–U+24f4) (mplus1mn-regular only)
20
+ ** Box Drawing Symbols (U+2500–U+257f)
21
+ ** .notdef glyph
22
+ * Added BOM (U+feff) and line feed (U+000a) characters (from blank)
23
+ * Generated old-style kern table (neither Apple or OpenType) (required to make kerning work in Prawn) (flags: 0x90)
24
+ * Removed Truetype instructions (information not used by Prawn) (flags: 0x08)
25
+ * Generated with PS Glyph Names option enabled (didn't use 0x04 flag)
26
+ * Generate flags used, in total: 0x90 + 0x08
@@ -0,0 +1,26 @@
1
+ M+ fonts are generated from the M+ outline fonts TESTFLIGHT 63a retrieved from http://mplus-fonts.osdn.jp/mplus-outline-fonts/download/index-en.html.
2
+
3
+ The following changes were made using fontforge to produce mplus1p-regular-fallback.ttf font:
4
+
5
+ * Subsetted to include:
6
+ ** Non-visible Characters (U+00a0)
7
+ ** Basic Latin (U+0020–U+007e)
8
+ ** Latin-1 Supplement (U+00a0–U+00fd)
9
+ ** Latin Extended-A (U+0100–U+017f)
10
+ ** Latin Extended-B (U+0180–U+024f)
11
+ ** IPA (U+0259, U+02b0–U+02ff)
12
+ ** Greek (U+0370–U+03ff)
13
+ ** Cyrillic (U+0400–U+04ff)
14
+ ** Vietnamese (U+01a0–U01b0, U+1ea0–U1ef9)
15
+ ** CJK (U+4e00–U+9fff, U+3000–U+303f) (mostly Japanese, limited selection based on what M+ supports)
16
+ ** Mathematical Operators (U+2200–U+22ff)
17
+ ** General Punctuation (U+2000–U203a)
18
+ ** Geometric Shapes (U+25a0–U25ff)
19
+ ** Assorted Symbols (U+20ac, U+2122, U+21d0–U+21d5, U+2190–U+2195, U+2610–U+2611, U+2713)
20
+ ** .notdef glyph
21
+ * Added BOM (U+feff), hair space (U+200a), zero-width space (U+200b) and line feed (U+000a) characters (from blank)
22
+ * Manually added non-breaking hyphen (U+2011) from hyphen (U+002d)
23
+ * Generated old-style kern table (neither Apple or OpenType) (required to make kerning work in Prawn) (flags: 0x90)
24
+ * Removed Truetype instructions (information not used by Prawn) (flags: 0x08)
25
+ * Generated with PS Glyph Names option enabled (didn't use 0x04 flag)
26
+ * Generate flags used, in total: 0x90 + 0x08
@@ -0,0 +1,3 @@
1
+ Noto Emoji font is generated from the google-noto-emoji-fonts (commit 16151a2312a1f8a7d79e91789d3cfe24559d61f7).
2
+
3
+ Some glyphs have been removed that conflict with the other built-in fonts to produce the notoemoji-subset.ttf font.
@@ -0,0 +1,26 @@
1
+ Noto Serif fonts are generated from the google-noto-serif-fonts-20161022 Fedora RPM package (commit 86b2e553c3e3e4d6614dadd1fa0a7a6dafd74552).
2
+
3
+ The following changes were made using fontforge to produce the notoserif-*-subset.ttf fonts:
4
+
5
+ * Mapped single arrows <- (U+2190) and -> (U+2192) to double arrows <= (U+21d0) and => (U+21d2)
6
+ * Manually added non-breaking hyphen (U+2011) from hyphen (U+002d)
7
+ * Moved arrows (U+21d0, U+21d2, U+2190, U+2192) up in line to align with middle of X
8
+ * Subsetted to include:
9
+ ** Non-visible Characters (U+feff, U+00a0)
10
+ ** Basic Latin (U+0020–U+007e)
11
+ ** Latin-1 Supplement (U+00a0–U+00fd)
12
+ ** Latin Extended-A (U+0100–U+017f)
13
+ ** Greek (U+0370–U+03ff)
14
+ ** Cyrillic (U+0400–U+04ff)
15
+ ** Vietnamese (U+01a0–U01b0, U+1ea0–U1ef9)
16
+ ** Mathematical Operators (U+2200–U+22ff)
17
+ ** General Punctuation (U+2000–U203a)
18
+ ** Geometric Shapes (U+25a0–U25ff)
19
+ ** Assorted Symbols (U+20ac, U+2122, U+21d0, U+21d2, U+2190, U+2192)
20
+ ** .notdef glyph
21
+ * Imported ballot boxes from Font Awesome (U+2610, U+2611) (Noto Serif Regular only)
22
+ * Added line feed character (U+000a)
23
+ * Generated old-style kern table (neither Apple or OpenType) (required to make kerning work in Prawn) (flags: 0x90)
24
+ * Removed Truetype instructions (information not used by Prawn)
25
+ * Generated with PS Glyph Names option enabled (didn't use 0x04 flag)
26
+ * Generate flags used, in total: 0x90 + 0x08
@@ -1,4 +1,4 @@
1
- M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT
1
+ M+ FONTS Copyright (C) 2002-2019 M+ FONTS PROJECT
2
2
 
3
3
  -
4
4
 
@@ -13,4 +13,4 @@ or without modification, either commercially or noncommercially.
13
13
  THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY.
14
14
 
15
15
 
16
- http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/
16
+ http://mplus-fonts.osdn.jp
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -3,6 +3,7 @@
3
3
  vertical_spacing: 12
4
4
  page_background_color: 'FFFFFF'
5
5
  page_layout: portrait
6
+ page_initial_zoom: FitH
6
7
  # 36 is equivalent to 0.5in
7
8
  page_margin: 36
8
9
  page_margin_inner: 48
@@ -15,15 +16,23 @@ base_font_color: '000000'
15
16
  base_font_family: Helvetica
16
17
  base_font_size: 12
17
18
  # QUESTION should we rename to min_font_size?
18
- base_font_size_min: 9
19
+ base_font_size_min: 6
19
20
  base_font_style: normal
20
21
  base_line_height: 1.15
21
- base_line_height_length: 13.8
22
22
  base_border_color: 'EEEEEE'
23
23
  base_border_width: 0.5
24
+ role_line-through_text_decoration: line-through
25
+ role_underline_text_decoration: underline
26
+ role_big_font_size: 14
27
+ role_small_font_size: 10
28
+ role_subtitle_font_size: 0.8em
24
29
  button_content: '[%s]'
25
30
  button_font_family: Courier
26
31
  button_font_style: bold
32
+ key_font_family: Courier
33
+ key_font_style: italic
34
+ mark_background_color: ffff00
35
+ mark_border_offset: 1
27
36
  link_font_color: '0000EE'
28
37
  literal_font_family: Courier
29
38
  heading_font_style: bold
@@ -36,6 +45,7 @@ heading_h6_font_size: 10
36
45
  heading_line_height: 1.15
37
46
  heading_margin_top: 4
38
47
  heading_margin_bottom: 12
48
+ heading_min_height_after: 20
39
49
  title_page_align: center
40
50
  title_page_line_height: 1.15
41
51
  title_page_logo_top: 10%
@@ -65,15 +75,19 @@ admonition_padding: [0, 12, 0, 12]
65
75
  admonition_label_font_style: bold
66
76
  admonition_label_text_transform: uppercase
67
77
  blockquote_border_color: 'EEEEEE'
68
- blockquote_border_width: 4
78
+ blockquote_border_left_width: 4
69
79
  blockquote_padding: [6, 12, -6, 14]
80
+ verse_border_color: 'EEEEEE'
81
+ verse_border_left_width: 4
82
+ verse_padding: [6, 12, -6, 14]
70
83
  code_font_family: Courier
71
- code_font_size: 10.5
84
+ code_font_size: 10.8
72
85
  code_line_height: 1.2
73
86
  code_padding: 9
74
87
  code_border_color: 'EEEEEE'
75
88
  code_border_width: 0.5
76
89
  conum_line_height: 1.15
90
+ conum_glyphs: circled
77
91
  example_background_color: 'FFFFFF'
78
92
  example_border_color: 'EEEEEE'
79
93
  example_border_width: 0.5
@@ -101,3 +115,7 @@ thematic_break_border_style: solid
101
115
  thematic_break_border_width: 0.5
102
116
  toc_indent: 15
103
117
  toc_line_height: 1.4
118
+ footnotes_font_size: 9
119
+ footnotes_item_space: 3
120
+ footer_recto_right_content: '{page-number}'
121
+ footer_verso_left_content: '{page-number}'
@@ -8,13 +8,14 @@ font:
8
8
  bold_italic: notoserif-bold_italic-subset.ttf
9
9
  # M+ 1mn supports ASCII and the circled numbers used for conums
10
10
  M+ 1mn:
11
- normal: mplus1mn-regular-ascii-conums.ttf
12
- bold: mplus1mn-bold-ascii.ttf
13
- italic: mplus1mn-italic-ascii.ttf
14
- bold_italic: mplus1mn-bold_italic-ascii.ttf
11
+ normal: mplus1mn-regular-subset.ttf
12
+ bold: mplus1mn-bold-subset.ttf
13
+ italic: mplus1mn-italic-subset.ttf
14
+ bold_italic: mplus1mn-bold_italic-subset.ttf
15
15
  page:
16
- background_color: ffffff
16
+ background_color: FFFFFF
17
17
  layout: portrait
18
+ initial_zoom: FitH
18
19
  margin: [0.5in, 0.67in, 0.67in, 0.67in]
19
20
  # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress
20
21
  margin_inner: 0.75in
@@ -48,9 +49,21 @@ base:
48
49
  font_size_small: round($base_font_size * 0.85)
49
50
  font_size_min: $base_font_size * 0.75
50
51
  font_style: normal
51
- border_color: eeeeee
52
+ border_color: EEEEEE
52
53
  border_radius: 4
53
54
  border_width: 0.5
55
+ role:
56
+ line-through:
57
+ text_decoration: line-through
58
+ underline:
59
+ text_decoration: underline
60
+ big:
61
+ font_size: $base_font_size_large
62
+ small:
63
+ font_size: $base_font_size_small
64
+ subtitle:
65
+ font_size: 0.8em
66
+ font_color: 999999
54
67
  # FIXME vertical_rhythm is weird; we should think in terms of ems
55
68
  #vertical_rhythm: $base_line_height_length * 2 / 3
56
69
  # correct line height for Noto Serif metrics (comes with built-in line height)
@@ -58,22 +71,31 @@ vertical_rhythm: $base_line_height_length
58
71
  horizontal_rhythm: $base_line_height_length
59
72
  # QUESTION should vertical_spacing be block_spacing instead?
60
73
  vertical_spacing: $vertical_rhythm
61
- button:
62
- content: "[\u2009%s\u2009]"
63
- font_style: bold
64
74
  link:
65
- font_color: 428bca
75
+ font_color: 428BCA
66
76
  # literal is currently used for inline monospaced in prose and table cells
67
77
  literal:
68
- font_color: b12146
78
+ font_color: B12146
69
79
  font_family: M+ 1mn
80
+ button:
81
+ content: "[\u2009%s\u2009]"
82
+ font_style: bold
83
+ key:
84
+ background_color: F5F5F5
85
+ border_color: CCCCCC
86
+ border_offset: 2
87
+ border_radius: 2
88
+ border_width: 0.5
89
+ font_family: $literal_font_family
90
+ separator: "\u202f+\u202f"
91
+ mark:
92
+ background_color: FFFF00
93
+ border_offset: 1
70
94
  menu:
71
95
  caret_content: " <font size=\"1.15em\"><color rgb=\"b12146\">\u203a</color></font> "
72
96
  heading:
73
97
  align: left
74
- #font_color: 181818
75
98
  font_color: $base_font_color
76
- font_family: $base_font_family
77
99
  font_style: bold
78
100
  # h1 is used for part titles (book doctype) or the doctitle (article doctype)
79
101
  h1_font_size: floor($base_font_size * 2.6)
@@ -88,6 +110,7 @@ heading:
88
110
  line_height: 1
89
111
  margin_top: $vertical_rhythm * 0.4
90
112
  margin_bottom: $vertical_rhythm * 0.9
113
+ min_height_after: $base_line_height_length * 1.5
91
114
  title_page:
92
115
  align: right
93
116
  logo:
@@ -122,7 +145,7 @@ lead:
122
145
  font_size: $base_font_size_large
123
146
  line_height: 1.4
124
147
  abstract:
125
- font_color: 5c6266
148
+ font_color: 5C6266
126
149
  font_size: $lead_font_size
127
150
  line_height: $lead_line_height
128
151
  font_style: italic
@@ -130,7 +153,6 @@ abstract:
130
153
  title:
131
154
  align: center
132
155
  font_color: $heading_font_color
133
- font_family: $heading_font_family
134
156
  font_size: $heading_h4_font_size
135
157
  font_style: $heading_font_style
136
158
  admonition:
@@ -146,14 +168,22 @@ admonition:
146
168
  text_transform: uppercase
147
169
  font_style: bold
148
170
  blockquote:
149
- font_color: $base_font_color
150
171
  font_size: $base_font_size_large
151
172
  border_color: $base_border_color
152
- border_width: 5
173
+ border_width: 0
174
+ border_left_width: 5
153
175
  # FIXME disable negative padding bottom once margin collapsing is implemented
154
- padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_width / 2]
176
+ padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_left_width / 2]
155
177
  cite_font_size: $base_font_size_small
156
178
  cite_font_color: 999999
179
+ verse:
180
+ font_size: $blockquote_font_size
181
+ border_color: $blockquote_border_color
182
+ border_width: $blockquote_border_width
183
+ border_left_width: $blockquote_border_left_width
184
+ padding: $blockquote_padding
185
+ cite_font_size: $blockquote_cite_font_size
186
+ cite_font_color: $blockquote_cite_font_color
157
187
  # code is used for source blocks (perhaps change to source or listing?)
158
188
  code:
159
189
  font_color: $base_font_color
@@ -163,8 +193,8 @@ code:
163
193
  line_height: 1.25
164
194
  # line_gap is an experimental property to control how a background color is applied to an inline block element
165
195
  line_gap: 3.8
166
- background_color: f5f5f5
167
- border_color: cccccc
196
+ background_color: F5F5F5
197
+ border_color: CCCCCC
168
198
  border_radius: $base_border_radius
169
199
  border_width: 0.75
170
200
  conum:
@@ -172,11 +202,12 @@ conum:
172
202
  font_color: $literal_font_color
173
203
  font_size: $base_font_size
174
204
  line_height: 4 / 3
205
+ glyphs: circled
175
206
  example:
176
207
  border_color: $base_border_color
177
208
  border_radius: $base_border_radius
178
209
  border_width: 0.75
179
- background_color: ffffff
210
+ background_color: $page-background-color
180
211
  # FIXME reenable padding bottom once margin collapsing is implemented
181
212
  padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm]
182
213
  image:
@@ -185,8 +216,8 @@ prose:
185
216
  margin_top: $block_margin_top
186
217
  margin_bottom: $block_margin_bottom
187
218
  sidebar:
188
- background_color: eeeeee
189
- border_color: e1e1e1
219
+ background_color: EEEEEE
220
+ border_color: E1E1E1
190
221
  border_radius: $base_border_radius
191
222
  border_width: $base_border_width
192
223
  # FIXME reenable padding bottom once margin collapsing is implemented
@@ -194,7 +225,6 @@ sidebar:
194
225
  title:
195
226
  align: center
196
227
  font_color: $heading_font_color
197
- font_family: $heading_font_family
198
228
  font_size: $heading_h4_font_size
199
229
  font_style: $heading_font_style
200
230
  thematic_break:
@@ -214,22 +244,22 @@ outline_list:
214
244
  item_spacing: $vertical_rhythm / 2
215
245
  table:
216
246
  background_color: $page_background_color
217
- border_color: dddddd
247
+ border_color: DDDDDD
218
248
  border_width: $base_border_width
219
249
  cell_padding: 3
220
250
  head:
221
251
  font_style: bold
222
252
  border_bottom_width: $base_border_width * 2.5
223
253
  body:
224
- stripe_background_color: f9f9f9
254
+ stripe_background_color: F9F9F9
225
255
  foot:
226
- background_color: f0f0f0
256
+ background_color: F0F0F0
227
257
  toc:
228
258
  indent: $horizontal_rhythm
229
259
  line_height: 1.4
230
260
  dot_leader:
231
261
  #content: ". "
232
- font_color: a9a9a9
262
+ font_color: A9A9A9
233
263
  #levels: 2 3
234
264
  footnotes:
235
265
  font_size: round($base_font_size * 0.75)
@@ -241,7 +271,7 @@ header:
241
271
  footer:
242
272
  font_size: $base_font_size_small
243
273
  # NOTE if background_color is set, background and border will span width of page
244
- border_color: dddddd
274
+ border_color: DDDDDD
245
275
  border_width: 0.25
246
276
  height: $base_line_height_length * 2.5
247
277
  line_height: 1
@@ -1,22 +1,9 @@
1
1
  extends: default
2
2
  font:
3
3
  catalog:
4
- Noto Serif:
5
- normal: notoserif-regular-subset.ttf
6
- bold: notoserif-bold-subset.ttf
7
- italic: notoserif-italic-subset.ttf
8
- bold_italic: notoserif-bold_italic-subset.ttf
9
- M+ 1mn:
10
- normal: mplus1mn-regular-ascii-conums.ttf
11
- bold: mplus1mn-bold-ascii.ttf
12
- italic: mplus1mn-italic-ascii.ttf
13
- bold_italic: mplus1mn-bold_italic-ascii.ttf
4
+ merge: true
14
5
  # M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols
15
6
  # It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font
16
- M+ 1p Fallback:
17
- normal: mplus1p-regular-fallback.ttf
18
- bold: mplus1p-regular-fallback.ttf
19
- italic: mplus1p-regular-fallback.ttf
20
- bold_italic: mplus1p-regular-fallback.ttf
21
- fallbacks:
22
- - M+ 1p Fallback
7
+ M+ 1p Fallback: mplus1p-regular-fallback.ttf
8
+ Noto Emoji: notoemoji-subset.ttf
9
+ fallbacks: [M+ 1p Fallback, Noto Emoji]