@neo4j-antora/pdf-generator 0.1.1 → 0.1.2
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/package.json +1 -1
- package/pdf-theme/print.css +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-antora/pdf-generator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Generates a PDF export from an Antora docset, styled to match the real Neo4j docs site, via @antora/assembler + @antora/pdf-extension and asciidoctor-web-pdf",
|
|
5
5
|
"main": "extension.js",
|
|
6
6
|
"files": [
|
package/pdf-theme/print.css
CHANGED
|
@@ -232,6 +232,16 @@ tr { break-inside: avoid; }
|
|
|
232
232
|
/* admonitions */
|
|
233
233
|
.admonitionblock { break-inside: avoid-page; margin: 1em 0; }
|
|
234
234
|
.admonitionblock table { width: 100%; border: none; }
|
|
235
|
+
/* Asciidoctor renders an admonition as a table (icon cell + content cell). Laid out as a
|
|
236
|
+
real table, a content table (or anything else with a footnote) inside it is a table
|
|
237
|
+
nested in a table, and Vivliostyle then never finishes paginating a floated footnote in
|
|
238
|
+
there - the build waits out the 180 s rendering timeout and produces no PDF at all.
|
|
239
|
+
Only the content cell is shown (the icon cell is hidden below), so lay the admonition
|
|
240
|
+
out as plain blocks instead. */
|
|
241
|
+
.admonitionblock > table,
|
|
242
|
+
.admonitionblock > table > tbody,
|
|
243
|
+
.admonitionblock > table > tbody > tr,
|
|
244
|
+
.admonitionblock td.content { display: block; }
|
|
235
245
|
.admonitionblock td.icon { display: none; }
|
|
236
246
|
.admonitionblock td.content {
|
|
237
247
|
border-left: 3pt solid var(--brand-border-strong);
|
|
@@ -284,6 +294,16 @@ span.footnote {
|
|
|
284
294
|
float: footnote;
|
|
285
295
|
}
|
|
286
296
|
|
|
297
|
+
/* A footnote inside a table that is itself inside a table cell (an `a|` cell holding a
|
|
298
|
+
table) cannot be floated either: Vivliostyle never finishes paginating it, and the build
|
|
299
|
+
times out with no PDF. Leave such a footnote in place instead - its text then appears
|
|
300
|
+
in the cell rather than as a numbered note at the foot of the page, which is a poorer
|
|
301
|
+
result but a PDF. Admonition tables are not affected (they are laid out as blocks
|
|
302
|
+
above and their footnotes float normally). */
|
|
303
|
+
table.tableblock table span.footnote {
|
|
304
|
+
float: none;
|
|
305
|
+
}
|
|
306
|
+
|
|
287
307
|
[data-footnote-call]::after {
|
|
288
308
|
content: "[" counter(footnote) "]";
|
|
289
309
|
}
|