@threepenny/md2pdf 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -8
- package/bin/md2pdf.js +60 -16
- package/lib/address-links.js +38 -0
- package/lib/attributions.js +69 -0
- package/lib/fit.js +50 -9
- package/lib/italic-lines.js +27 -0
- package/lib/render.js +6 -0
- package/lib/styles.js +2 -0
- package/package.json +1 -1
- package/styles/academic.css +14 -0
- package/styles/classic.css +15 -0
- package/styles/fiendish.css +671 -0
- package/styles/fonts/andika/Andika-Bold.woff2 +0 -0
- package/styles/fonts/andika/Andika-BoldItalic.woff2 +0 -0
- package/styles/fonts/andika/Andika-Italic.woff2 +0 -0
- package/styles/fonts/andika/Andika-Regular.woff2 +0 -0
- package/styles/fonts/andika/OFL.txt +94 -93
- package/styles/fonts/bodoni-moda/OFL.txt +93 -0
- package/styles/fonts/bodoni-moda/bodoni-moda-latin-900-normal.woff2 +0 -0
- package/styles/fonts/cinzel/OFL.txt +93 -0
- package/styles/fonts/cinzel/cinzel-latin-400-normal.woff2 +0 -0
- package/styles/fonts/cinzel/cinzel-latin-700-normal.woff2 +0 -0
- package/styles/fonts/courier-prime/OFL.txt +93 -0
- package/styles/fonts/courier-prime/courier-prime-latin-400-italic.woff2 +0 -0
- package/styles/fonts/courier-prime/courier-prime-latin-400-normal.woff2 +0 -0
- package/styles/fonts/courier-prime/courier-prime-latin-700-normal.woff2 +0 -0
- package/styles/fonts/libre-caslon-text/OFL.txt +93 -0
- package/styles/fonts/libre-caslon-text/libre-caslon-text-latin-400-italic.woff2 +0 -0
- package/styles/fonts/libre-caslon-text/libre-caslon-text-latin-400-normal.woff2 +0 -0
- package/styles/fonts/libre-caslon-text/libre-caslon-text-latin-700-normal.woff2 +0 -0
- package/styles/fonts/old-standard-tt/OFL.txt +93 -0
- package/styles/fonts/old-standard-tt/old-standard-tt-latin-400-italic.woff2 +0 -0
- package/styles/fonts/old-standard-tt/old-standard-tt-latin-400-normal.woff2 +0 -0
- package/styles/fonts/old-standard-tt/old-standard-tt-latin-700-normal.woff2 +0 -0
- package/styles/gothic.css +15 -0
- package/styles/newspaper.css +899 -0
- package/styles/print/fiendish.css +92 -0
- package/styles/print/newspaper.css +95 -0
- package/styles/sandwake.css +14 -0
- package/styles/worksheet.css +10 -8
- package/styles/fonts/andika/andika-latin-400-italic.woff2 +0 -0
- package/styles/fonts/andika/andika-latin-400-normal.woff2 +0 -0
- package/styles/fonts/andika/andika-latin-700-italic.woff2 +0 -0
- package/styles/fonts/andika/andika-latin-700-normal.woff2 +0 -0
package/styles/classic.css
CHANGED
|
@@ -106,6 +106,8 @@
|
|
|
106
106
|
color: var(--md2pdf-text);
|
|
107
107
|
/* A long web address wraps at the margin instead of making Chrome shrink the page to fit it. */
|
|
108
108
|
overflow-wrap: break-word;
|
|
109
|
+
/* Whether a long address may break anywhere, set beside each text-align: only in justified text. */
|
|
110
|
+
--md2pdf-address-break: normal;
|
|
109
111
|
font-variant-numeric: oldstyle-nums proportional-nums;
|
|
110
112
|
font-kerning: normal;
|
|
111
113
|
-webkit-print-color-adjust: exact;
|
|
@@ -115,6 +117,7 @@
|
|
|
115
117
|
.markdown-body p,
|
|
116
118
|
.markdown-body li {
|
|
117
119
|
text-align: justify;
|
|
120
|
+
--md2pdf-address-break: break-all;
|
|
118
121
|
hyphens: auto;
|
|
119
122
|
orphans: 3;
|
|
120
123
|
widows: 3;
|
|
@@ -142,6 +145,7 @@
|
|
|
142
145
|
.markdown-body h1 {
|
|
143
146
|
font-size: calc(24 / 11 * var(--md2pdf-font-size));
|
|
144
147
|
text-align: center;
|
|
148
|
+
--md2pdf-address-break: normal;
|
|
145
149
|
letter-spacing: 0.01em;
|
|
146
150
|
margin: 0 0 calc(1.4em * var(--md2pdf-space));
|
|
147
151
|
/* The rule is a block inside the heading; without this a page can break between them. */
|
|
@@ -186,10 +190,16 @@
|
|
|
186
190
|
.markdown-body a {
|
|
187
191
|
color: var(--md2pdf-accent);
|
|
188
192
|
text-decoration: none;
|
|
193
|
+
hyphens: manual;
|
|
189
194
|
}
|
|
190
195
|
.markdown-body a.header-anchor {
|
|
191
196
|
display: none;
|
|
192
197
|
}
|
|
198
|
+
/* A long address in justified text may break anywhere, without a hyphen, so it starts on the line where it
|
|
199
|
+
falls rather than dropping whole and leaving wide gaps in the line before (#150). */
|
|
200
|
+
.markdown-body a.markdown-address {
|
|
201
|
+
word-break: var(--md2pdf-address-break);
|
|
202
|
+
}
|
|
193
203
|
|
|
194
204
|
/* Lists */
|
|
195
205
|
|
|
@@ -238,6 +248,7 @@
|
|
|
238
248
|
}
|
|
239
249
|
.markdown-body blockquote p {
|
|
240
250
|
text-align: left;
|
|
251
|
+
--md2pdf-address-break: normal;
|
|
241
252
|
}
|
|
242
253
|
|
|
243
254
|
/* Callouts (GitHub alerts and Obsidian callouts): a ruled box on paper, its title in small caps. */
|
|
@@ -272,6 +283,7 @@
|
|
|
272
283
|
font-weight: 600;
|
|
273
284
|
letter-spacing: 0.04em;
|
|
274
285
|
text-align: left;
|
|
286
|
+
--md2pdf-address-break: normal;
|
|
275
287
|
hyphens: manual;
|
|
276
288
|
}
|
|
277
289
|
.markdown-body .markdown-alert-title .octicon {
|
|
@@ -290,6 +302,7 @@
|
|
|
290
302
|
.markdown-body code,
|
|
291
303
|
.markdown-body kbd {
|
|
292
304
|
font-family: var(--md2pdf-code-font);
|
|
305
|
+
hyphens: manual;
|
|
293
306
|
font-size: 0.82em;
|
|
294
307
|
font-variant-numeric: normal;
|
|
295
308
|
}
|
|
@@ -395,6 +408,8 @@
|
|
|
395
408
|
.markdown-body td {
|
|
396
409
|
padding: 0.35em 0.9em;
|
|
397
410
|
text-align: left;
|
|
411
|
+
--md2pdf-address-break: normal;
|
|
412
|
+
hyphens: manual;
|
|
398
413
|
}
|
|
399
414
|
.markdown-body th {
|
|
400
415
|
font-weight: normal;
|