asciidoctor-pdf 1.5.0.alpha.6 → 1.5.0.alpha.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +62 -42
  3. data/bin/asciidoctor-pdf +3 -2
  4. data/data/fonts/{LICENSE-noto-fonts-2014-01-30 → LICENSE-noto-fonts-2014-11-17} +0 -0
  5. data/data/fonts/mplus1mn-bold-ascii.ttf +0 -0
  6. data/data/fonts/mplus1mn-bolditalic-ascii.ttf +0 -0
  7. data/data/fonts/mplus1mn-italic-ascii.ttf +0 -0
  8. data/data/fonts/mplus1mn-regular-ascii-conums.ttf +0 -0
  9. data/data/fonts/notoserif-bold-latin.ttf +0 -0
  10. data/data/fonts/notoserif-bolditalic-latin.ttf +0 -0
  11. data/data/fonts/notoserif-italic-latin.ttf +0 -0
  12. data/data/fonts/notoserif-regular-latin.ttf +0 -0
  13. data/data/themes/default-theme.yml +95 -43
  14. data/docs/theming-guide.adoc +1344 -0
  15. data/lib/asciidoctor-pdf/asciidoctor_ext.rb +2 -0
  16. data/lib/asciidoctor-pdf/asciidoctor_ext/list.rb +9 -0
  17. data/lib/asciidoctor-pdf/asciidoctor_ext/list_item.rb +16 -0
  18. data/lib/asciidoctor-pdf/converter.rb +982 -294
  19. data/lib/asciidoctor-pdf/core_ext/array.rb +1 -1
  20. data/lib/asciidoctor-pdf/core_ext/ostruct.rb +2 -2
  21. data/lib/asciidoctor-pdf/pdf_core_ext.rb +2 -0
  22. data/lib/asciidoctor-pdf/pdf_core_ext/pdf_object.rb +25 -0
  23. data/lib/asciidoctor-pdf/pdfmarks.rb +9 -5
  24. data/lib/asciidoctor-pdf/prawn_ext.rb +1 -0
  25. data/lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb +8 -8
  26. data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +56 -14
  27. data/lib/asciidoctor-pdf/prawn_ext/formatted_text/transform.rb +52 -10
  28. data/lib/asciidoctor-pdf/prawn_ext/images.rb +22 -0
  29. data/lib/asciidoctor-pdf/sanitizer.rb +37 -0
  30. data/lib/asciidoctor-pdf/theme_loader.rb +130 -30
  31. data/lib/asciidoctor-pdf/version.rb +1 -1
  32. metadata +41 -23
  33. data/data/fonts/LICENSE-liberation-fonts-2.00.1 +0 -102
  34. data/data/fonts/liberationmono-bold-latin.ttf +0 -0
  35. data/data/fonts/liberationmono-bolditalic-latin.ttf +0 -0
  36. data/data/fonts/liberationmono-italic-latin.ttf +0 -0
  37. data/data/fonts/liberationmono-regular-latin.ttf +0 -0
  38. data/data/fonts/mplus1p-bold-latin.ttf +0 -0
  39. data/data/fonts/mplus1p-light-latin.ttf +0 -0
  40. data/data/fonts/mplus1p-regular-latin.ttf +0 -0
  41. data/data/themes/asciidoctor-theme.yml +0 -174
  42. data/examples/chronicles.adoc +0 -429
  43. data/examples/chronicles.pdf +0 -0
  44. data/examples/edge-cases.adoc +0 -60
  45. data/examples/example-pdf-screenshot.png +0 -0
  46. data/examples/example.adoc +0 -27
  47. data/examples/example.pdf +0 -0
  48. data/examples/sample-title-logo.jpg +0 -0
  49. data/examples/wolpertinger.jpg +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5dc73c6c0fd12b13fd37b6a9001b0b085b3458f7
4
- data.tar.gz: 03a98a738a9cf9703488a10380619b1f87812654
3
+ metadata.gz: 91cb53f52e412fd931bb3682852b067925666959
4
+ data.tar.gz: d0cd8e53ce01660fc2083acc816c817114c17ba1
5
5
  SHA512:
6
- metadata.gz: 76147bac174cf98b029674ad882cb35dfb4df5ed9e69b33f1c3b5ab47993a77d9d7423e38d382ec4b6b834e6d3322ecccfb7b746f72a9031a424e6065bf857a2
7
- data.tar.gz: 18e4f064a6af705f35ac64c03cf4b3c8850427314e97686ea834662d09507c55574613eb85eadb246cdb3f80bac4eb471b051b182991717a4dd970d181330e5d
6
+ metadata.gz: e1daccf26ee2383765fb921a184173b27331132579fd24775a353ac5f7fe639529d1155d6e0c5c38f31ff7ed52289c17ea19b9a11f39e51654dfa36685c7d570
7
+ data.tar.gz: a60d21046bb9653dc6a9c64e4f6720c4805732deb00d5c59ed8933d4369bb78f0a2b5e79194fd8b6e465a5deb9cfba35abb92e9735fd21f7169c9d1402a78562
@@ -5,37 +5,38 @@ Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://g
5
5
  :experimental:
6
6
  :idprefix:
7
7
  :idseparator: -
8
+ ifdef::env-github[:relfileprefix: /blob/master]
9
+ //:pdf-page-size: [8.25in, 11.69in]
10
+ //:pdf-page-size: A4
8
11
  // Aliases:
9
12
  :project-name: Asciidoctor PDF
10
13
  :project-handle: asciidoctor-pdf
11
14
  // URIs:
12
15
  :uri-project: https://github.com/asciidoctor/asciidoctor-pdf
13
- :uri-project-repo: https://github.com/asciidoctor/asciidoctor-pdf
16
+ :uri-project-repo: {uri-project}
14
17
  :uri-project-issues: {uri-project-repo}/issues
18
+ :uri-project-list: http://discuss.asciidoctor.org
15
19
  :uri-prawn: http://prawn.majesticseacreature.com
16
20
  :uri-rvm: http://rvm.io
17
21
  :uri-asciidoctor: http://asciidoctor.org
18
- :repo-base-uri: {uri-project-repo}/blob/master/
19
- ifdef::env-github[:repo-base-uri: link:]
20
- :uri-notice: {repo-base-uri}NOTICE.adoc
21
- :uri-license: {repo-base-uri}LICENSE.adoc
22
- :uri-worklog: {repo-base-uri}WORKLOG.adoc
22
+
23
+ :original-outfilesuffix: {outfilesuffix}
24
+ :outfilesuffix: .adoc
23
25
 
24
26
  _Lo and behold_, a native PDF converter for AsciiDoc built with {uri-asciidoctor}[Asciidoctor] and {uri-prawn}[Prawn]! +
25
- _No more DocBook toolchain._ +
26
27
  _No more middleman._ +
27
- It's just AsciiDoc straight to PDF!
28
+ _No more DocBook toolchain._ +
29
+ It's AsciiDoc straight to PDF!
28
30
 
29
- .Project status
31
+ [caption='Status']
30
32
  CAUTION: {project-name} is currently _alpha_ software.
31
- Use accordingly.
32
- Though the bulk of AsciiDoc content is converter, there's still work needed to fill in gaps where conversion is incomplete, incorrect or not implemented.
33
- Once it's ready, the project will be moved into the Asciidoctor organization on GitHub.
33
+ While it handles most of the AsciiDoc content, there's still work needed to fill in gaps where conversion is incomplete, incorrect or not implemented.
34
+ See the milestone v1.5.0 in the {uri-project-issues}[issue tracker] for details.
34
35
 
35
36
  == Prawn, the majestic PDF generator
36
37
 
37
- {uri-project}[{project-name}] is made possible by the amazing Prawn RubyGem.
38
- _What a gem it is!_
38
+ {uri-project}[{project-name}] is made possible by an amazing Ruby Gem named Prawn.
39
+ And what a Gem it is!
39
40
 
40
41
  {uri-prawn}[Prawn] is a nimble PDF writer for Ruby.
41
42
  More important, it's a hackable platform that offers both high level APIs for the most common needs and low level APIs for bending the document model to accomodate special circumstances.
@@ -43,7 +44,7 @@ More important, it's a hackable platform that offers both high level APIs for th
43
44
  With Prawn, you can write text, draw lines and shapes and place images _anywhere_ on the page and add as much color as you like.
44
45
  In addition, it brings a fluent API and aggressive code re-use to the printable document space.
45
46
 
46
- To give you a picture, here's an example that shows how to use Prawn to create a basic PDF document.
47
+ Here's an example that demonstrates how to use Prawn to create a basic PDF document.
47
48
 
48
49
  .Create a basic PDF document using Prawn
49
50
  [source,ruby]
@@ -56,13 +57,14 @@ end
56
57
  ----
57
58
 
58
59
  It's that easy.
59
- And it's just the beginning.
60
+ And that's just the beginning.
61
+ Skip ahead to <<Getting started>> to start putting it use.
60
62
 
61
- Simply put, *Prawn is the killer library for PDF generation* we've needed to close this critical gap in Asciidoctor.
63
+ *Prawn is the killer library for PDF generation* we've needed to close this critical gap in Asciidoctor.
62
64
  It absolutely takes the pain out of creating printable documents.
63
65
  Picking up from there, {project-name} takes the pain out of creating printable documents _from AsciiDoc_.
64
66
 
65
- == Notable Features
67
+ == Notable features
66
68
 
67
69
  * Direct AsciiDoc to PDF conversion
68
70
  * Configuration-driven style and layout
@@ -74,15 +76,15 @@ Picking up from there, {project-name} takes the pain out of creating printable d
74
76
  * Orphan section titles avoided
75
77
  * Table border settings honored
76
78
 
77
- === Missing Features
79
+ === Missing features
78
80
 
79
- See {uri-worklog}[WORKLOG].
81
+ See <<WORKLOG.adoc#,WORKLOG>>.
80
82
 
81
83
  == Prerequisites
82
84
 
83
85
  All that's needed is Ruby 1.9.3 or better (2.1.2 recommended) and a few RubyGems, which we explain how to install in the next section.
84
86
 
85
- To check you have Ruby available, use the +ruby+ command to query the version installed:
87
+ To check you have Ruby available, use the `ruby` command to query the version installed:
86
88
 
87
89
  $ ruby --version
88
90
 
@@ -92,7 +94,7 @@ If you're using {uri-rvm}[RVM], we recommend creating a new gemset to work with
92
94
 
93
95
  We like RVM because it keeps the dependencies required by various projects isolated.
94
96
 
95
- == Getting Started
97
+ == Getting started
96
98
 
97
99
  The {project-name} project is published in pre-release on RubyGems.org.
98
100
  You can either install the pre-release version using the following command:
@@ -104,7 +106,7 @@ To be safe, go ahead and install both gems:
104
106
 
105
107
  $ gem install coderay pygments.rb
106
108
 
107
- Assuming all the required gems install properly, verify you can run the +asciidoctor-pdf+ script:
109
+ Assuming all the required gems install properly, verify you can run the `asciidoctor-pdf` script:
108
110
 
109
111
  $ asciidoctor-pdf -v
110
112
 
@@ -122,7 +124,7 @@ You can retrieve the {project-name} project in one of two ways:
122
124
 
123
125
  ==== Option 1: Fetch using git clone
124
126
 
125
- If you want to clone the git repository, simply copy the {uri-project-repo}[GitHub repository URL] and pass it to +git clone+ command:
127
+ If you want to clone the git repository, simply copy the {uri-project-repo}[GitHub repository URL] and pass it to `git clone` command:
126
128
 
127
129
  $ git clone https://github.com/asciidoctor/asciidoctor-pdf
128
130
 
@@ -135,34 +137,42 @@ Next, change to the project directory:
135
137
  If you want to download a zip archive, click the btn:[Download Zip] button on the right-hand side of the repository page on GitHub.
136
138
  Once the download finishes, extract the archive, open a console and change to that directory.
137
139
 
138
- TIP: Instead of working out of the {project-handle} directory, you can simply add the absolute path of the [path]_bin_ directory to your +PATH+ environment variable.
140
+ TIP: Instead of working out of the {project-handle} directory, you can simply add the absolute path of the [path]_bin_ directory to your `PATH` environment variable.
139
141
 
140
142
  We'll leverage the project configuration to install the necessary dependencies.
141
143
 
142
- === Install the Dependencies
144
+ === Install the dependencies
143
145
 
144
146
  The dependencies needed to use {project-name} are defined in the [file]_Gemfile_ at the root of the project.
145
147
  We can use Bundler to install the dependencies for us.
146
148
 
147
- To check you have Bundler available, use the +bundle+ command to query the version installed:
149
+ To check you have Bundler available, use the `bundle` command to query the version installed:
148
150
 
149
151
  $ bundle --version
150
152
 
151
- If it's not installed, use the +gem+ command to install it.
153
+ If it's not installed, use the `gem` command to install it.
152
154
 
153
155
  $ gem install bundler
154
156
 
155
- Then use the +bundle+ command to install the project dependencies:
157
+ Then use the `bundle` command to install the project dependencies:
156
158
 
157
159
  $ bundle
158
160
 
159
- Assuming all the required gems install properly, verify you can run the +asciidoctor-pdf+ script using Ruby:
161
+ NOTE: You need to call `bundle` from the project directory so that it can find the [file]_Gemfile_.
162
+
163
+ Assuming all the required gems install properly, verify you can run the `asciidoctor-pdf` script using Ruby:
160
164
 
161
165
  $ ruby ./bin/asciidoctor-pdf -v
162
166
 
163
167
  If you see the version of Asciidoctor PDF printed, you're ready to use {project-name}!
164
168
 
165
- Let's grab an AsciiDoc document to distill.
169
+ If you get an error message--and you're not using a Ruby manager like RVM--you may need to invoke the script through `bundle exec`:
170
+
171
+ $ bundle exec ./bin/asciidoctor-pdf -v
172
+
173
+ If this works, be sure to use `bundle exec` whenever invoking the `./bin/asciidoctor-pdf` script.
174
+
175
+ Next, let's grab an AsciiDoc document to distill.
166
176
 
167
177
  === Example AsciiDoc document
168
178
 
@@ -204,7 +214,7 @@ It's time to convert the AsciiDoc document directly to PDF.
204
214
 
205
215
  === Convert AsciiDoc to PDF
206
216
 
207
- Converting to PDF is a simple as running the +./bin/asciidoctor-pdf+ script using Ruby and passing our AsciiDoc document as the first argument.
217
+ Converting to PDF is a simple as running the `./bin/asciidoctor-pdf` script using Ruby and passing our AsciiDoc document as the first argument.
208
218
 
209
219
  $ ruby ./bin/asciidoctor-pdf example.adoc
210
220
 
@@ -225,19 +235,21 @@ The pain of the DocBook toolchain should be melting away about now.
225
235
  == Themes
226
236
 
227
237
  The layout and styling of the PDF is driven by a YAML configuration file.
238
+ To learn how the theming system works and how to create and apply custom themes, refer to the <<docs/theming-guide.adoc#,Asciidoctor PDF Theme Guide>>.
228
239
 
229
- See the files [file]_default-theme.yml_ and [file]_asciidoctor-theme.yml_ found in the [file]_data/themes_ directory for examples.
240
+ You can use the built-in theme files, [file]_default-theme.yml_ and [file]_asciidoctor-theme.yml_, found in the [file]_data/themes_ directory, as examples.
230
241
 
231
- Specify the path to an alternate theme file with the `pdf-style` attribute. For example to use the built-in _asciidoctor_ theme:
242
+ Specify the path to an alternate theme file with the `pdf-style` attribute.
243
+ For example to use the built-in _asciidoctor_ theme:
232
244
 
233
245
  $ ./bin/asciidoctor-pdf -a pdf-style=asciidoctor examples/example.adoc
234
246
 
235
247
  To refer to a theme at another location you can use the `pdf-stylesdir` attribute to specify the location of themes.
236
248
  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
249
 
238
- == Optional Scripts
250
+ == Optional scripts
239
251
 
240
- {project-name} also provides a shell script that invokes GhostScript (+gs+) to optimize and compress the generated PDF with minimal impact on quality.
252
+ {project-name} also provides a shell script that invokes GhostScript (`gs`) to optimize and compress the generated PDF with minimal impact on quality.
241
253
  You must have Ghostscript installed to use it.
242
254
 
243
255
  Here's an example usage:
@@ -246,14 +258,14 @@ Here's an example usage:
246
258
 
247
259
  The command will generate the file [file]_example-optimized.pdf_ in the current directory.
248
260
 
249
- WARNING: The +optimize-pdf+ script currently requires a Bash shell (Linux, OSX, etc).
261
+ WARNING: The `optimize-pdf` script currently requires a Bash shell (Linux, OSX, etc).
250
262
  We plan to rewrite the script in Ruby so it works across platforms (see https://github.com/asciidoctor/asciidoctor-pdf/issues/1[issue #1])
251
263
 
252
- IMPORTANT: The +optimize-pdf+ script relies on Ghostscript >= 9.10.
264
+ IMPORTANT: The `optimize-pdf` script relies on Ghostscript >= 9.10.
253
265
  Otherwise, it may actually make the PDF larger.
254
266
  Also, you should only consider using it if the file size of the original PDF is > 5MB.
255
267
 
256
- If a file is found with the extension +.pdfmarks+ and the same rootname as the input file, it is used to add metadata to the generated PDF document.
268
+ If a file is found with the extension `.pdfmarks` and the same rootname as the input file, it is used to add metadata to the generated PDF document.
257
269
  This file is necessary to preserve the document metadata since Ghostscript will otherwise drop it.
258
270
  That's why Asciidoctor PDF always creates this file in addition to the PDF.
259
271
 
@@ -263,7 +275,12 @@ In the spirit of free software, _everyone_ is encouraged to help improve this pr
263
275
 
264
276
  To contribute code, simply fork the project on GitHub, hack away and send a pull request with your proposed changes.
265
277
 
266
- Feel free to use the {uri-project-issues}[issue tracker] or http://discuss.asciidoctor.org[Asciidoctor mailing list] to provide feedback or suggestions in other ways.
278
+ Feel free to use the {uri-project-issues}[issue tracker] or {uri-project-list}[Asciidoctor mailing list] to provide feedback or suggestions in other ways.
279
+
280
+ [[resources,Links]]
281
+ == Resources
282
+
283
+ * https://groups.google.com/forum/#!msg/prawn-ruby/MbMsCx862iY/6ImCsvLGfVcJ[Discussion about image quality in PDFs]
267
284
 
268
285
  == Authors
269
286
 
@@ -274,5 +291,8 @@ Feel free to use the {uri-project-issues}[issue tracker] or http://discuss.ascii
274
291
  Copyright (C) 2014 OpenDevise Inc. and the Asciidoctor Project.
275
292
  Free use of this software is granted under the terms of the MIT License.
276
293
 
277
- For the full text of the license, see the {uri-license}[LICENSE] file.
278
- Refer to the {uri-notice}[NOTICE] file for information about third-party Open Source software in use.
294
+ For the full text of the license, see the <<LICENSE.adoc#,LICENSE>> file.
295
+ Refer to the <<NOTICE.adoc#,NOTICE>> file for information about third-party Open Source software in use.
296
+
297
+ // FIXME Asciidoctor should be using outfilesuffix defined in header
298
+ :outfilesuffix: {original-outfilesuffix}
@@ -5,8 +5,9 @@ require 'asciidoctor/cli'
5
5
 
6
6
  options = Asciidoctor::Cli::Options.new backend: 'pdf', header_footer: true
7
7
  # FIXME This is a really bizarre API. Please make me simpler.
8
- if (options.parse! ARGV) == 0
9
- exit 0
8
+ result = options.parse! ARGV
9
+ if Integer === result
10
+ exit result
10
11
  else
11
12
  invoker = Asciidoctor::Cli::Invoker.new options
12
13
  GC.start
@@ -5,34 +5,36 @@ font:
5
5
  bold: notoserif-bold-latin.ttf
6
6
  italic: notoserif-italic-latin.ttf
7
7
  bold_italic: notoserif-bolditalic-latin.ttf
8
- # NOTE currently, callout numbers don't work with LiberationMono
9
- #LiberationMono:
10
- # normal: liberationmono-regular-latin.ttf
11
- # bold: liberationmono-bold-latin.ttf
12
- # italic: liberationmono-italic-latin.ttf
13
- # bold_italic: liberationmono-bolditalic-latin.ttf
14
8
  Mplus1mn:
15
9
  normal: mplus1mn-regular-ascii-conums.ttf
16
10
  bold: mplus1mn-bold-ascii.ttf
17
11
  italic: mplus1mn-italic-ascii.ttf
18
12
  bold_italic: mplus1mn-bolditalic-ascii.ttf
19
- #Mplus1pMultilingual:
20
- # normal: mplus1p-regular-multilingual.ttf
21
- #FontAwesome:
22
- # normal: fontawesome-regular.ttf
23
- # FIXME using fallbacks breaks use of custom font styles (fixed in Prawn 1.2.1!)
24
- #fallbacks:
25
- # - Mplus1pMultilingual
26
- brand:
27
- primary_color: 428bca
13
+ Mplus1pMultilingual:
14
+ normal: mplus1p-regular-multilingual.ttf
15
+ bold: mplus1p-regular-multilingual.ttf
16
+ italic: mplus1p-regular-multilingual.ttf
17
+ bold_italic: mplus1p-regular-multilingual.ttf
18
+ fallbacks:
19
+ # NOTE M+ 1p doesn't support all CJK characters, but it at least has some coverage
20
+ # NOTE M+ 1p provides the arrows for ->, <-, => and <=
21
+ - Mplus1pMultilingual
28
22
  page:
29
23
  background_color: ffffff
30
24
  layout: portrait
31
- # multiply inches by 72 to get pt values
32
- margin: [0.5 * 72, 0.67 * 72, 0.67 * 72, 0.67 * 72]
25
+ # NOTE multiply inches by 72 to get pt values
26
+ #margin: [0.5 * 72, 0.67 * 72, 0.67 * 72, 0.67 * 72]
27
+ margin: [0.5in, 0.67in, 0.67in, 0.67in]
28
+ # size can be a named size (e.g., A4) or custom dimensions (e.g., [8.25in, 11.69in])
33
29
  size: Letter
34
30
  base:
31
+ # color as hex string (leading # is optional)
35
32
  font_color: 333333
33
+ # color as RGB array
34
+ #font_color: [51, 51, 51]
35
+ # color as CMYK array (approximated)
36
+ #font_color: [0, 0, 0, 0.92]
37
+ #font_color: [0, 0, 0, 92%]
36
38
  font_family: NotoSerif
37
39
  # choose one of these font_size/line_height_length combinations
38
40
  #font_size: 14
@@ -60,24 +62,43 @@ base:
60
62
  # correct line height for NotoSerif metrics
61
63
  vertical_rhythm: $base_line_height_length
62
64
  horizontal_rhythm: $base_line_height_length
63
- link_font_color: $brand_primary_color
65
+ link:
66
+ font_color: 428bca
67
+ # literal is currently used for inline monospaced in prose and table cells
68
+ literal:
69
+ font_color: b12146
70
+ font_family: Mplus1mn
64
71
  heading:
72
+ #font_color: 181818
65
73
  font_color: $base_font_color
66
74
  font_family: $base_font_family
67
- # h1 is used for document title
68
- font_size_h1: floor($base_font_size * 2.6)
69
- # h2 is used for chapter title
70
- font_size_h2: floor($base_font_size * 2.15)
71
- font_size_h3: round($base_font_size * 1.7)
72
- font_size_h4: $base_font_size_large
73
- font_size_h5: $base_font_size
74
- font_size_h6: $base_font_size_small
75
+ # h1 is used for part titles
76
+ h1_font_size: floor($base_font_size * 2.6)
77
+ # h2 is used for chapter titles
78
+ h2_font_size: floor($base_font_size * 2.15)
79
+ h3_font_size: round($base_font_size * 1.7)
80
+ h4_font_size: $base_font_size_large
81
+ h5_font_size: $base_font_size
82
+ h6_font_size: $base_font_size_small
75
83
  font_style: bold
76
84
  #line_height: 1.4
77
85
  # correct line height for NotoSerif metrics
78
86
  line_height: 1.2
79
87
  margin_top: $vertical_rhythm * 0.2
80
88
  margin_bottom: $vertical_rhythm * 0.8
89
+ title_page:
90
+ align: right
91
+ title_top: 55%
92
+ title_font_size: $heading_h1_font_size
93
+ title_font_color: 999999
94
+ title_line_height: 0.9
95
+ subtitle_font_size: $heading_h3_font_size
96
+ subtitle_font_style: bold_italic
97
+ subtitle_line_height: 1
98
+ authors_margin_top: $base_font_size * 1.25
99
+ authors_font_size: $base_font_size_large
100
+ authors_font_color: 181818
101
+ revision_margin_top: $base_font_size * 1.25
81
102
  #prose:
82
103
  # margin_top: 0
83
104
  # margin_bottom: $vertical_rhythm
@@ -86,6 +107,12 @@ block:
86
107
  #margin_bottom: $vertical_rhythm
87
108
  padding: [$vertical_rhythm, $vertical_rhythm * 1.25, $vertical_rhythm, $vertical_rhythm * 1.25]
88
109
  # code is used for source blocks (perhaps change to source or listing?)
110
+ caption:
111
+ font_style: italic
112
+ align: left
113
+ # FIXME perhaps set line_height instead of / in addition to margins?
114
+ margin_inside: $vertical_rhythm * 0.25
115
+ margin_outside: 0
89
116
  code:
90
117
  font_color: $base_font_color
91
118
  #font_family: LiberationMono
@@ -95,7 +122,7 @@ code:
95
122
  # LiberationMono carries extra gap below line
96
123
  #padding: [10, 10, 7.5, 10]
97
124
  #line_height: 1.45
98
- font_family: Mplus1mn
125
+ font_family: $literal_font_family
99
126
  font_size: ceil($base_font_size)
100
127
  #padding: [$base_font_size, $code_font_size, $base_font_size, $code_font_size]
101
128
  padding: $code_font_size
@@ -104,11 +131,6 @@ code:
104
131
  border_color: cccccc
105
132
  border_radius: $base_border_radius
106
133
  border_width: 0.75
107
- # literal is currently used for inline monospaced in prose and table cells
108
- literal:
109
- #font_color: c7254e
110
- font_color: b12146
111
- font_family: $code_font_family
112
134
  blockquote:
113
135
  font_color: $base_font_color
114
136
  font_size: $base_font_size_large
@@ -123,7 +145,7 @@ sidebar:
123
145
  background_color: eeeeee
124
146
  title_font_color: $heading_font_color
125
147
  title_font_family: $heading_font_family
126
- title_font_size: $heading_font_size_h4
148
+ title_font_size: $heading_h4_font_size
127
149
  title_font_style: $heading_font_style
128
150
  title_align: center
129
151
  example:
@@ -134,16 +156,11 @@ example:
134
156
  admonition:
135
157
  border_color: $base_border_color
136
158
  border_width: $base_border_width
137
- caption:
138
- font_style: italic
139
- align: left
140
- # FIXME perhaps set line_height instead of / in addition to margins?
141
- margin_inside: $vertical_rhythm * 0.25
142
- margin_outside: 0
143
159
  conum:
144
160
  font_family: Mplus1mn
145
161
  font_color: $literal_font_color
146
- font_size: $code_font_size
162
+ font_size: $base_font_size
163
+ line_height: 4 / 3
147
164
  image:
148
165
  align_default: left
149
166
  scaled_width_default: 0.5
@@ -168,15 +185,50 @@ description_list:
168
185
  term_font_style: italic
169
186
  description_indent: $horizontal_rhythm * 1.25
170
187
  outline_list:
171
- indent: $horizontal_rhythm * 1.25
188
+ indent: $horizontal_rhythm * 1.5
189
+ # NOTE item_spacing applies to list items that do not have complex content
190
+ item_spacing: $vertical_rhythm / 2
172
191
  table:
173
- background_color: transparent
174
- background_color_alt: f9f9f9
192
+ background_color: ffffff
193
+ #head_background_color: <hex value>
194
+ #head_font_color: $base_font_color
195
+ even_row_background_color: f9f9f9
196
+ #odd_row_background_color: <hex value>
197
+ foot_background_color: f0f0f0
175
198
  border_color: dddddd
176
199
  border_width: $base_border_width
177
200
  # HACK accounting for line-height
178
201
  cell_padding: [3, 3, 6, 3]
202
+ toc:
203
+ indent: $horizontal_rhythm
204
+ dot_leader_color: dddddd
205
+ #dot_leader_content: ". "
206
+ line_height: 1.4
207
+ # NOTE In addition to footer, header is also supported
179
208
  footer:
180
209
  font_size: $base_font_size_small
181
210
  font_color: $base_font_color
211
+ # NOTE if background_color is set, background and border will span width of page
182
212
  border_color: dddddd
213
+ border_width: 0.25
214
+ height: $base_line_height_length * 2.5
215
+ padding: [$base_line_height_length / 2, 1, 0, 1]
216
+ valign: top
217
+ #image_valign: <alignment> or <number>
218
+ # additional attributes for content:
219
+ # * {page-count}
220
+ # * {page-number}
221
+ # * {document-title}
222
+ # * {document-subtitle}
223
+ # * {chapter-title}
224
+ # * {section-title}
225
+ # * {section-or-chapter-title}
226
+ recto_content:
227
+ #right: '{section-or-chapter-title} | {page-number}'
228
+ #right: '{document-title} | {page-number}'
229
+ right: '{page-number}'
230
+ #center: '{page-number}'
231
+ verso_content:
232
+ #left: '{page-number} | {chapter-title}'
233
+ left: '{page-number}'
234
+ #center: '{page-number}'