asciidoctor-pdf 1.5.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.adoc +22 -0
- data/NOTICE.adoc +76 -0
- data/README.adoc +263 -0
- data/Rakefile +78 -0
- data/bin/asciidoctor-pdf +15 -0
- data/bin/optimize-pdf +63 -0
- data/data/fonts/LICENSE-liberation-fonts-2.00.1 +102 -0
- data/data/fonts/LICENSE-mplus-testflight-58 +16 -0
- data/data/fonts/LICENSE-noto-fonts-2014-01-30 +201 -0
- data/data/fonts/liberationmono-bold-latin.ttf +0 -0
- data/data/fonts/liberationmono-bolditalic-latin.ttf +0 -0
- data/data/fonts/liberationmono-italic-latin.ttf +0 -0
- data/data/fonts/liberationmono-regular-latin.ttf +0 -0
- data/data/fonts/mplus1mn-bold-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-bolditalic-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-italic-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-regular-ascii-conums.ttf +0 -0
- data/data/fonts/mplus1p-bold-latin.ttf +0 -0
- data/data/fonts/mplus1p-light-latin.ttf +0 -0
- data/data/fonts/mplus1p-regular-latin.ttf +0 -0
- data/data/fonts/mplus1p-regular-multilingual.ttf +0 -0
- data/data/fonts/notoserif-bold-latin.ttf +0 -0
- data/data/fonts/notoserif-bolditalic-latin.ttf +0 -0
- data/data/fonts/notoserif-italic-latin.ttf +0 -0
- data/data/fonts/notoserif-regular-latin.ttf +0 -0
- data/data/themes/asciidoctor-theme.yml +174 -0
- data/data/themes/default-theme.yml +182 -0
- data/examples/chronicles.adoc +429 -0
- data/examples/chronicles.pdf +0 -0
- data/examples/example-pdf-screenshot.png +0 -0
- data/examples/example.adoc +27 -0
- data/examples/example.pdf +0 -0
- data/examples/sample-title-logo.jpg +0 -0
- data/examples/wolpertinger.jpg +0 -0
- data/lib/asciidoctor-pdf.rb +3 -0
- data/lib/asciidoctor-pdf/asciidoctor_ext.rb +1 -0
- data/lib/asciidoctor-pdf/asciidoctor_ext/section.rb +26 -0
- data/lib/asciidoctor-pdf/converter.rb +1365 -0
- data/lib/asciidoctor-pdf/core_ext/array.rb +5 -0
- data/lib/asciidoctor-pdf/core_ext/ostruct.rb +9 -0
- data/lib/asciidoctor-pdf/implicit_header_processor.rb +59 -0
- data/lib/asciidoctor-pdf/pdfmarks.rb +30 -0
- data/lib/asciidoctor-pdf/prawn_ext.rb +3 -0
- data/lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb +94 -0
- data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +529 -0
- data/lib/asciidoctor-pdf/prawn_ext/formatted_text/formatter.rb +29 -0
- data/lib/asciidoctor-pdf/prawn_ext/formatted_text/parser.rb +1012 -0
- data/lib/asciidoctor-pdf/prawn_ext/formatted_text/parser.treetop +115 -0
- data/lib/asciidoctor-pdf/prawn_ext/formatted_text/transform.rb +178 -0
- data/lib/asciidoctor-pdf/roman_numeral.rb +107 -0
- data/lib/asciidoctor-pdf/theme_loader.rb +103 -0
- data/lib/asciidoctor-pdf/version.rb +5 -0
- metadata +248 -0
data/bin/asciidoctor-pdf
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require File.join File.dirname(__FILE__), '../lib/asciidoctor-pdf'
|
4
|
+
require 'asciidoctor/cli'
|
5
|
+
|
6
|
+
options = Asciidoctor::Cli::Options.new backend: 'pdf', header_footer: true
|
7
|
+
# FIXME This is a really bizarre API. Please make me simpler.
|
8
|
+
if (options.parse! ARGV) == 0
|
9
|
+
exit 0
|
10
|
+
else
|
11
|
+
invoker = Asciidoctor::Cli::Invoker.new options
|
12
|
+
GC.start
|
13
|
+
invoker.invoke!
|
14
|
+
exit invoker.code
|
15
|
+
end
|
data/bin/optimize-pdf
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Optimizes and compresses the specified PDF using Ghostscript (gs).
|
4
|
+
#
|
5
|
+
# [NOTE]
|
6
|
+
# You need at least Ghostscript 9.10 in order for page labels defined in the
|
7
|
+
# PDF to be preserved (e.g., front matter pages numbered using roman numerals).
|
8
|
+
|
9
|
+
if [ -z $1 ]; then
|
10
|
+
echo "Please supply a PDF file to optimize"
|
11
|
+
exit 1
|
12
|
+
fi
|
13
|
+
|
14
|
+
if [ -z $GS ]; then
|
15
|
+
GS=gs
|
16
|
+
fi
|
17
|
+
|
18
|
+
FILE=$1
|
19
|
+
FILE_BASENAME=${FILE%.pdf}
|
20
|
+
FILE_OPTIMIZED=$FILE_BASENAME-optimized.pdf
|
21
|
+
FILE_PDFMARKS=
|
22
|
+
if [ -f "$FILE_BASENAME.pdfmarks" ]; then
|
23
|
+
FILE_PDFMARKS="$FILE_BASENAME.pdfmarks"
|
24
|
+
fi
|
25
|
+
DOWNSAMPLE_IMAGES=true
|
26
|
+
if [ -z $IMAGE_DPI ]; then
|
27
|
+
IMAGE_DPI=150
|
28
|
+
fi
|
29
|
+
|
30
|
+
# /prepress defaults (see http://ghostscript.com/doc/current/Ps2pdf.htm)
|
31
|
+
# -d{Color,Gray,Mono}ImageDownsampleType=/Bicubic
|
32
|
+
# -dAutoFilter{Color,Gray}Images=true
|
33
|
+
# -dOptimize=true
|
34
|
+
# -dEmbedAllFonts=true
|
35
|
+
# -dSubsetFonts=true
|
36
|
+
# -dColorConversionStrategy=/LeaveColorUnchanged
|
37
|
+
# -dUCRandBGInfo=/Preserve
|
38
|
+
# -dCompressPages=true
|
39
|
+
#
|
40
|
+
# other unused settings
|
41
|
+
# -r72
|
42
|
+
#
|
43
|
+
# for info about pdfmarks, see http://milan.kupcevic.net/ghostscript-ps-pdf
|
44
|
+
#
|
45
|
+
# to convert to grayscale, add the following (though doesn't always work)
|
46
|
+
#
|
47
|
+
# -dProcessColorModel=/DeviceGray \
|
48
|
+
# -dColorConversionStrategy=/Gray \
|
49
|
+
|
50
|
+
"$GS" -q -dNOPAUSE -dBATCH -dSAFER -dNOOUTERSAVE \
|
51
|
+
-sDEVICE=pdfwrite \
|
52
|
+
-dPDFSETTINGS=/prepress \
|
53
|
+
-dCannotEmbedFontPolicy=/Warning \
|
54
|
+
-dDownsampleColorImages=$DOWNSAMPLE_IMAGES \
|
55
|
+
-dColorImageResolution=$IMAGE_DPI \
|
56
|
+
-dDownsampleGrayImages=$DOWNSAMPLE_IMAGES \
|
57
|
+
-dGrayImageResolution=$IMAGE_DPI \
|
58
|
+
-dDownsampleMonoImages=$DOWNSAMPLE_IMAGES \
|
59
|
+
-dMonoImageResolution=$IMAGE_DPI \
|
60
|
+
-sOutputFile="$FILE_OPTIMIZED" \
|
61
|
+
"$FILE" $FILE_PDFMARKS
|
62
|
+
|
63
|
+
exit 0
|
@@ -0,0 +1,102 @@
|
|
1
|
+
Digitized data copyright (c) 2010 Google Corporation
|
2
|
+
with Reserved Font Arimo, Tinos and Cousine.
|
3
|
+
Copyright (c) 2012 Red Hat, Inc.
|
4
|
+
with Reserved Font Name Liberation.
|
5
|
+
|
6
|
+
This Font Software is licensed under the SIL Open Font License,
|
7
|
+
Version 1.1.
|
8
|
+
|
9
|
+
This license is copied below, and is also available with a FAQ at:
|
10
|
+
http://scripts.sil.org/OFL
|
11
|
+
|
12
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
13
|
+
|
14
|
+
PREAMBLE The goals of the Open Font License (OFL) are to stimulate
|
15
|
+
worldwide development of collaborative font projects, to support the font
|
16
|
+
creation efforts of academic and linguistic communities, and to provide
|
17
|
+
a free and open framework in which fonts may be shared and improved in
|
18
|
+
partnership with others.
|
19
|
+
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
21
|
+
redistributed freely as long as they are not sold by themselves.
|
22
|
+
The fonts, including any derivative works, can be bundled, embedded,
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
25
|
+
however, cannot be released under any other type of license. The
|
26
|
+
requirement for fonts to remain under this license does not apply to
|
27
|
+
any document created using the fonts or their derivatives.
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
DEFINITIONS
|
32
|
+
"Font Software" refers to the set of files released by the Copyright
|
33
|
+
Holder(s) under this license and clearly marked as such.
|
34
|
+
This may include source files, build scripts and documentation.
|
35
|
+
|
36
|
+
"Reserved Font Name" refers to any names specified as such after the
|
37
|
+
copyright statement(s).
|
38
|
+
|
39
|
+
"Original Version" refers to the collection of Font Software components
|
40
|
+
as distributed by the Copyright Holder(s).
|
41
|
+
|
42
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
43
|
+
or substituting ? in part or in whole ?
|
44
|
+
any of the components of the Original Version, by changing formats or
|
45
|
+
by porting the Font Software to a new environment.
|
46
|
+
|
47
|
+
"Author" refers to any designer, engineer, programmer, technical writer
|
48
|
+
or other person who contributed to the Font Software.
|
49
|
+
|
50
|
+
|
51
|
+
PERMISSION & CONDITIONS
|
52
|
+
|
53
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
54
|
+
copy of the Font Software, to use, study, copy, merge, embed, modify,
|
55
|
+
redistribute, and sell modified and unmodified copies of the Font
|
56
|
+
Software, subject to the following conditions:
|
57
|
+
|
58
|
+
1) Neither the Font Software nor any of its individual components,in
|
59
|
+
Original or Modified Versions, may be sold by itself.
|
60
|
+
|
61
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
62
|
+
redistributed and/or sold with any software, provided that each copy
|
63
|
+
contains the above copyright notice and this license. These can be
|
64
|
+
included either as stand-alone text files, human-readable headers or
|
65
|
+
in the appropriate machine-readable metadata fields within text or
|
66
|
+
binary files as long as those fields can be easily viewed by the user.
|
67
|
+
|
68
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
69
|
+
Name(s) unless explicit written permission is granted by the
|
70
|
+
corresponding Copyright Holder. This restriction only applies to the
|
71
|
+
primary font name as presented to the users.
|
72
|
+
|
73
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
74
|
+
Software shall not be used to promote, endorse or advertise any
|
75
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
76
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
77
|
+
permission.
|
78
|
+
|
79
|
+
5) The Font Software, modified or unmodified, in part or in whole, must
|
80
|
+
be distributed entirely under this license, and must not be distributed
|
81
|
+
under any other license. The requirement for fonts to remain under
|
82
|
+
this license does not apply to any document created using the Font
|
83
|
+
Software.
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
TERMINATION
|
88
|
+
This license becomes null and void if any of the above conditions are not met.
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
DISCLAIMER
|
93
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
94
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
95
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
96
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
97
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
98
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
99
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
100
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
|
101
|
+
DEALINGS IN THE FONT SOFTWARE.
|
102
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT
|
2
|
+
|
3
|
+
-
|
4
|
+
|
5
|
+
LICENSE_E
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
These fonts are free software.
|
11
|
+
Unlimited permission is granted to use, copy, and distribute them, with
|
12
|
+
or without modification, either commercially or noncommercially.
|
13
|
+
THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY.
|
14
|
+
|
15
|
+
|
16
|
+
http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/
|
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,174 @@
|
|
1
|
+
font:
|
2
|
+
catalog:
|
3
|
+
NotoSerif:
|
4
|
+
normal: notoserif-regular-latin.ttf
|
5
|
+
bold: notoserif-bold-latin.ttf
|
6
|
+
italic: notoserif-italic-latin.ttf
|
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
|
+
Mplus1mn:
|
15
|
+
normal: mplus1mn-regular-ascii-conums.ttf
|
16
|
+
bold: mplus1mn-bold-ascii.ttf
|
17
|
+
italic: mplus1mn-italic-ascii.ttf
|
18
|
+
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: 005498
|
28
|
+
page:
|
29
|
+
background_color: FFFFFF
|
30
|
+
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]
|
33
|
+
size: Letter
|
34
|
+
base:
|
35
|
+
font_color: 222222
|
36
|
+
font_family: NotoSerif
|
37
|
+
# choose one of these font_size/line_height_length combinations
|
38
|
+
#font_size: 14
|
39
|
+
#line_height_length: 20
|
40
|
+
#font_size: 11.25
|
41
|
+
#line_height_length: 18
|
42
|
+
#font_size: 11.2
|
43
|
+
#line_height_length: 16
|
44
|
+
font_size: 10.5
|
45
|
+
#line_height_length: 15
|
46
|
+
# correct line height for NotoSerif metrics
|
47
|
+
line_height_length: 12
|
48
|
+
#font_size: 11.25
|
49
|
+
#line_height_length: 18
|
50
|
+
line_height: $base_line_height_length / $base_font_size
|
51
|
+
font_size_large: round($base_font_size * 1.25)
|
52
|
+
font_size_small: round($base_font_size * 0.85)
|
53
|
+
font_style: normal
|
54
|
+
align: justify
|
55
|
+
border_radius: 4
|
56
|
+
border_width: 0.5
|
57
|
+
border_color: DDDDDD
|
58
|
+
# FIXME vertical_rhythm is weird; we should think in terms of ems
|
59
|
+
#vertical_rhythm: $base_line_height_length * 2 / 3
|
60
|
+
# correct line height for NotoSerif metrics
|
61
|
+
vertical_rhythm: $base_line_height_length
|
62
|
+
horizontal_rhythm: $base_line_height_length
|
63
|
+
link_font_color: $brand_primary_color
|
64
|
+
heading:
|
65
|
+
font_color: BA3925
|
66
|
+
font_family: $base_font_family
|
67
|
+
font_size_h1: floor($base_font_size * 2.6)
|
68
|
+
font_size_h2: floor($base_font_size * 2.15)
|
69
|
+
font_size_h3: round($base_font_size * 1.7)
|
70
|
+
font_size_h4: $base_font_size_large
|
71
|
+
font_size_h5: $base_font_size
|
72
|
+
font_size_h6: $base_font_size_small
|
73
|
+
font_style: bold
|
74
|
+
#line_height: 1.4
|
75
|
+
# correct line height for NotoSerif metrics
|
76
|
+
line_height: 1.2
|
77
|
+
margin_top: $vertical_rhythm * 0.2
|
78
|
+
margin_bottom: $vertical_rhythm * 0.8
|
79
|
+
#prose:
|
80
|
+
# margin_top: 0
|
81
|
+
# margin_bottom: $vertical_rhythm
|
82
|
+
block:
|
83
|
+
#margin_top: 0
|
84
|
+
#margin_bottom: $vertical_rhythm
|
85
|
+
padding: [$vertical_rhythm, $vertical_rhythm * 1.25, $vertical_rhythm, $vertical_rhythm * 1.25]
|
86
|
+
# code is used for source blocks (perhaps change to source or listing?)
|
87
|
+
code:
|
88
|
+
font_color: $base_font_color
|
89
|
+
#font_family: LiberationMono
|
90
|
+
#font_size: floor($base_font_size * 0.9)
|
91
|
+
font_family: Mplus1mn
|
92
|
+
font_size: ceil($base_font_size)
|
93
|
+
#padding: [$base_font_size, $code_font_size, $base_font_size, $code_font_size]
|
94
|
+
padding: $code_font_size
|
95
|
+
line_height: 1.25
|
96
|
+
background_color: F7F7F8
|
97
|
+
border_color: FFFFFF
|
98
|
+
border_radius: $base_border_radius
|
99
|
+
border_width: 0
|
100
|
+
# literal is currently used for inline monospaced in prose and table cells
|
101
|
+
literal:
|
102
|
+
#font_family: $code_font_family
|
103
|
+
font_family: LiberationMono
|
104
|
+
font_color: 6D180B
|
105
|
+
blockquote:
|
106
|
+
font_color: 6F6F6F
|
107
|
+
font_size: $base_font_size_large
|
108
|
+
border_width: 3
|
109
|
+
border_color: $base_border_color
|
110
|
+
cite_font_size: $base_font_size_small
|
111
|
+
cite_font_color: 555555
|
112
|
+
sidebar:
|
113
|
+
border_color: D9D9D9
|
114
|
+
border_radius: $base_border_radius
|
115
|
+
border_width: $base_border_width
|
116
|
+
background_color: F2F2F2
|
117
|
+
title_font_color: 7A2518
|
118
|
+
title_font_family: $heading_font_family
|
119
|
+
title_font_size: $heading_font_size_h4
|
120
|
+
title_font_style: normal
|
121
|
+
title_align: left
|
122
|
+
example:
|
123
|
+
border_color: E6E6E6
|
124
|
+
border_radius: $base_border_radius
|
125
|
+
border_width: 0.75
|
126
|
+
background_color: transparent
|
127
|
+
admonition:
|
128
|
+
border_color: $base_border_color
|
129
|
+
border_width: $base_border_width
|
130
|
+
caption:
|
131
|
+
font_color: 7A2518
|
132
|
+
font_style: bold
|
133
|
+
align: left
|
134
|
+
margin_inside: $vertical_rhythm * 0.25
|
135
|
+
margin_outside: 0
|
136
|
+
conum:
|
137
|
+
font_family: Mplus1mn
|
138
|
+
font_color: $literal_font_color
|
139
|
+
font_size: $code_font_size
|
140
|
+
image:
|
141
|
+
align_default: left
|
142
|
+
scaled_width_default: 0.5
|
143
|
+
lead:
|
144
|
+
# QUESTION what about $base_font_size_large?
|
145
|
+
#font_size: floor($base_line_height_length * 0.8)
|
146
|
+
font_size: $base_font_size_large
|
147
|
+
line_height: 1.4
|
148
|
+
abstract:
|
149
|
+
font_size: $lead_font_size
|
150
|
+
font_color: 999999
|
151
|
+
#line_height: $lead_line_height
|
152
|
+
# HACK set line_height to 1 to workaround spacing problem after first line
|
153
|
+
line_height: 1
|
154
|
+
font_style: italic
|
155
|
+
thematic_break:
|
156
|
+
border_color: $base_border_color
|
157
|
+
margin_top: $vertical_rhythm * 0.5
|
158
|
+
margin_bottom: $vertical_rhythm * 1.5
|
159
|
+
description_list:
|
160
|
+
term_font_style: bold
|
161
|
+
description_indent: $horizontal_rhythm * 1.25
|
162
|
+
outline_list:
|
163
|
+
indent: $horizontal_rhythm * 1.25
|
164
|
+
table:
|
165
|
+
background_color: transparent
|
166
|
+
background_color_alt: F9F9F9
|
167
|
+
border_color: DDDDDD
|
168
|
+
border_width: $base_border_width
|
169
|
+
# HACK accounting for line-height
|
170
|
+
cell_padding: [3, 3, 6, 3]
|
171
|
+
footer:
|
172
|
+
font_size: $base_font_size_small
|
173
|
+
font_color: $base_font_color
|
174
|
+
border_color: DDDDDD
|