scriveno 2.0.5
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/LICENSE +21 -0
- package/README.md +222 -0
- package/agents/continuity-checker.md +85 -0
- package/agents/drafter.md +248 -0
- package/agents/plan-checker.md +209 -0
- package/agents/researcher.md +114 -0
- package/agents/translator.md +204 -0
- package/agents/voice-checker.md +154 -0
- package/bin/install.js +1620 -0
- package/commands/scr/add-note.md +51 -0
- package/commands/scr/add-unit.md +101 -0
- package/commands/scr/art-direction.md +225 -0
- package/commands/scr/autopilot-publish.md +210 -0
- package/commands/scr/autopilot-translate.md +237 -0
- package/commands/scr/autopilot.md +200 -0
- package/commands/scr/back-matter.md +630 -0
- package/commands/scr/back-translate.md +197 -0
- package/commands/scr/beta-reader.md +97 -0
- package/commands/scr/blurb.md +149 -0
- package/commands/scr/book-proposal.md +210 -0
- package/commands/scr/build-ebook.md +448 -0
- package/commands/scr/build-poetry-submission.md +202 -0
- package/commands/scr/build-print.md +598 -0
- package/commands/scr/build-smashwords.md +171 -0
- package/commands/scr/build-world.md +158 -0
- package/commands/scr/cast-list.md +104 -0
- package/commands/scr/chapter-header.md +158 -0
- package/commands/scr/character-arc.md +108 -0
- package/commands/scr/character-ref.md +160 -0
- package/commands/scr/character-sheet.md +143 -0
- package/commands/scr/character-touch.md +157 -0
- package/commands/scr/character-voice-sample.md +111 -0
- package/commands/scr/check-notes.md +50 -0
- package/commands/scr/cleanup.md +159 -0
- package/commands/scr/compare.md +112 -0
- package/commands/scr/complete-draft.md +49 -0
- package/commands/scr/continuity-check.md +129 -0
- package/commands/scr/copy-edit.md +118 -0
- package/commands/scr/cover-art.md +382 -0
- package/commands/scr/cultural-adaptation.md +177 -0
- package/commands/scr/demo.md +93 -0
- package/commands/scr/dialogue-audit.md +143 -0
- package/commands/scr/discuss.md +118 -0
- package/commands/scr/discussion-questions.md +129 -0
- package/commands/scr/do.md +68 -0
- package/commands/scr/draft.md +97 -0
- package/commands/scr/editor-review.md +466 -0
- package/commands/scr/export.md +942 -0
- package/commands/scr/fast.md +65 -0
- package/commands/scr/front-matter.md +696 -0
- package/commands/scr/health.md +113 -0
- package/commands/scr/help.md +121 -0
- package/commands/scr/history.md +92 -0
- package/commands/scr/illustrate-scene.md +211 -0
- package/commands/scr/import.md +95 -0
- package/commands/scr/insert-unit.md +108 -0
- package/commands/scr/line-edit.md +146 -0
- package/commands/scr/manager.md +77 -0
- package/commands/scr/manuscript-stats.md +139 -0
- package/commands/scr/map-illustration.md +213 -0
- package/commands/scr/map-manuscript.md +134 -0
- package/commands/scr/merge-units.md +136 -0
- package/commands/scr/multi-publish.md +344 -0
- package/commands/scr/new-character.md +167 -0
- package/commands/scr/new-revision.md +50 -0
- package/commands/scr/new-work.md +148 -0
- package/commands/scr/next.md +125 -0
- package/commands/scr/originality-check.md +170 -0
- package/commands/scr/outline.md +131 -0
- package/commands/scr/pacing-analysis.md +170 -0
- package/commands/scr/panel-layout.md +225 -0
- package/commands/scr/pause-work.md +88 -0
- package/commands/scr/plan.md +112 -0
- package/commands/scr/plant-seed.md +57 -0
- package/commands/scr/plot-graph.md +199 -0
- package/commands/scr/polish.md +141 -0
- package/commands/scr/profile-writer.md +154 -0
- package/commands/scr/progress.md +51 -0
- package/commands/scr/publish.md +455 -0
- package/commands/scr/query-letter.md +183 -0
- package/commands/scr/quick-write.md +82 -0
- package/commands/scr/relationship-map.md +129 -0
- package/commands/scr/remove-unit.md +120 -0
- package/commands/scr/reorder-units.md +126 -0
- package/commands/scr/resume-work.md +97 -0
- package/commands/scr/sacred/annotation-layer.md +105 -0
- package/commands/scr/sacred/chronology.md +121 -0
- package/commands/scr/sacred/concordance.md +88 -0
- package/commands/scr/sacred/cross-reference.md +97 -0
- package/commands/scr/sacred/doctrinal-check.md +129 -0
- package/commands/scr/sacred/genealogy.md +107 -0
- package/commands/scr/sacred/source-tracking.md +101 -0
- package/commands/scr/sacred/verse-numbering.md +103 -0
- package/commands/scr/sacred-numbering-format.md +103 -0
- package/commands/scr/save.md +109 -0
- package/commands/scr/scan.md +291 -0
- package/commands/scr/sensitivity-review.md +169 -0
- package/commands/scr/series-bible.md +127 -0
- package/commands/scr/session-report.md +80 -0
- package/commands/scr/settings.md +58 -0
- package/commands/scr/split-unit.md +123 -0
- package/commands/scr/spread-layout.md +187 -0
- package/commands/scr/storyboard.md +262 -0
- package/commands/scr/subject-touch.md +168 -0
- package/commands/scr/submit.md +50 -0
- package/commands/scr/subplot-map.md +147 -0
- package/commands/scr/sync.md +116 -0
- package/commands/scr/synopsis.md +137 -0
- package/commands/scr/theme-tracker.md +128 -0
- package/commands/scr/thread.md +83 -0
- package/commands/scr/timeline.md +141 -0
- package/commands/scr/track.md +564 -0
- package/commands/scr/translate.md +260 -0
- package/commands/scr/translation-glossary.md +298 -0
- package/commands/scr/translation-memory.md +310 -0
- package/commands/scr/troubleshoot.md +59 -0
- package/commands/scr/undo.md +106 -0
- package/commands/scr/validate.md +133 -0
- package/commands/scr/versions.md +94 -0
- package/commands/scr/voice-check.md +133 -0
- package/commands/scr/voice-test.md +68 -0
- package/data/CONSTRAINTS.json +1606 -0
- package/data/demo/.manuscript/BRIEF.md +37 -0
- package/data/demo/.manuscript/CHARACTERS.md +90 -0
- package/data/demo/.manuscript/OUTLINE.md +46 -0
- package/data/demo/.manuscript/PLOT-GRAPH.md +75 -0
- package/data/demo/.manuscript/STATE.md +44 -0
- package/data/demo/.manuscript/STYLE-GUIDE.md +119 -0
- package/data/demo/.manuscript/THEMES.md +51 -0
- package/data/demo/.manuscript/WORK.md +51 -0
- package/data/demo/.manuscript/config.json +59 -0
- package/data/demo/.manuscript/drafts/body/1-the-letter-DRAFT.md +51 -0
- package/data/demo/.manuscript/drafts/body/2-the-workshop-DRAFT.md +51 -0
- package/data/demo/.manuscript/drafts/body/3-the-pier-DRAFT.md +45 -0
- package/data/demo/.manuscript/drafts/body/4-the-clock-DRAFT.md +59 -0
- package/data/demo/.manuscript/plans/5-the-reunion-PLAN.md +52 -0
- package/data/demo/.manuscript/reviews/2-the-workshop-REVIEW.md +61 -0
- package/data/export-templates/scriveno-academic.latex +184 -0
- package/data/export-templates/scriveno-acm.latex +67 -0
- package/data/export-templates/scriveno-apa7.latex +83 -0
- package/data/export-templates/scriveno-book.typst +175 -0
- package/data/export-templates/scriveno-chapbook.typst +121 -0
- package/data/export-templates/scriveno-elsevier.latex +76 -0
- package/data/export-templates/scriveno-epub.css +386 -0
- package/data/export-templates/scriveno-fixed-layout-epub.css +76 -0
- package/data/export-templates/scriveno-fixed-layout.opf +23 -0
- package/data/export-templates/scriveno-ieee.latex +77 -0
- package/data/export-templates/scriveno-lncs.latex +79 -0
- package/data/export-templates/scriveno-picturebook.typst +113 -0
- package/data/export-templates/scriveno-poetry-submission-styles.md +45 -0
- package/data/export-templates/scriveno-poetry-submission.docx +0 -0
- package/data/export-templates/scriveno-smashwords-styles.md +45 -0
- package/data/export-templates/scriveno-smashwords.docx +0 -0
- package/data/export-templates/scriveno-stageplay.typst +129 -0
- package/data/proof/creative-context/README.md +79 -0
- package/data/proof/voice-dna/GUIDED-SAMPLE.md +19 -0
- package/data/proof/voice-dna/README.md +45 -0
- package/data/proof/voice-dna/STYLE-GUIDE-EXCERPT.md +43 -0
- package/data/proof/voice-dna/UNGUIDED-SAMPLE.md +11 -0
- package/data/proof/watchmaker-flow/README.md +78 -0
- package/docs/architecture.md +425 -0
- package/docs/command-reference.md +2384 -0
- package/docs/configuration.md +228 -0
- package/docs/context-protocol.md +81 -0
- package/docs/contributing.md +430 -0
- package/docs/creative-context.md +158 -0
- package/docs/development.md +152 -0
- package/docs/drafter-quality.md +127 -0
- package/docs/getting-started.md +198 -0
- package/docs/history-protocol.md +96 -0
- package/docs/proof-artifacts.md +56 -0
- package/docs/publishing.md +296 -0
- package/docs/release-notes.md +457 -0
- package/docs/runtime-support.md +77 -0
- package/docs/sacred-texts.md +296 -0
- package/docs/shipped-assets.md +129 -0
- package/docs/testing.md +156 -0
- package/docs/translation.md +343 -0
- package/docs/voice-dna.md +297 -0
- package/docs/work-types.md +339 -0
- package/lib/architectural-profiles.js +134 -0
- package/package.json +54 -0
- package/templates/BRIEF.md +51 -0
- package/templates/CHARACTERS.md +64 -0
- package/templates/CONTEXT.md +56 -0
- package/templates/OUTLINE.md +36 -0
- package/templates/RECORD.md +68 -0
- package/templates/STATE.md +50 -0
- package/templates/STYLE-GUIDE.md +121 -0
- package/templates/THEMES.md +36 -0
- package/templates/WORK.md +67 -0
- package/templates/WORLD.md +62 -0
- package/templates/WRITING-RULES.md +156 -0
- package/templates/academic/ARGUMENT-MAP.md +40 -0
- package/templates/academic/CONCEPTS.md +34 -0
- package/templates/academic/CONTEXT.md +29 -0
- package/templates/academic/PROPOSAL.md +37 -0
- package/templates/academic/QUESTIONS.md +24 -0
- package/templates/config.json +72 -0
- package/templates/pitfalls/comic.md +54 -0
- package/templates/pitfalls/commentary.md +62 -0
- package/templates/pitfalls/memoir.md +48 -0
- package/templates/pitfalls/novel.md +53 -0
- package/templates/pitfalls/poetry_collection.md +63 -0
- package/templates/pitfalls/research_paper.md +66 -0
- package/templates/pitfalls/runbook.md +64 -0
- package/templates/pitfalls/screenplay.md +54 -0
- package/templates/platforms/README.md +16 -0
- package/templates/platforms/apple/manifest.yaml +20 -0
- package/templates/platforms/bn/manifest.yaml +20 -0
- package/templates/platforms/d2d/manifest.yaml +20 -0
- package/templates/platforms/google/manifest.yaml +20 -0
- package/templates/platforms/ingram/manifest.yaml +44 -0
- package/templates/platforms/kdp/manifest.yaml +42 -0
- package/templates/platforms/kobo/manifest.yaml +20 -0
- package/templates/platforms/smashwords/manifest.yaml +26 -0
- package/templates/sacred/COSMOLOGY.md +88 -0
- package/templates/sacred/DOCTRINES.md +45 -0
- package/templates/sacred/FIGURES.md +69 -0
- package/templates/sacred/FRAMEWORK.md +98 -0
- package/templates/sacred/LINEAGES.md +52 -0
- package/templates/sacred/README.md +20 -0
- package/templates/sacred/THEOLOGICAL-ARC.md +69 -0
- package/templates/sacred/catholic/manifest.yaml +93 -0
- package/templates/sacred/islamic-hafs/manifest.yaml +134 -0
- package/templates/sacred/islamic-warsh/manifest.yaml +134 -0
- package/templates/sacred/jewish/manifest.yaml +56 -0
- package/templates/sacred/orthodox/manifest.yaml +98 -0
- package/templates/sacred/pali/manifest.yaml +20 -0
- package/templates/sacred/protestant/manifest.yaml +86 -0
- package/templates/sacred/sanskrit/manifest.yaml +20 -0
- package/templates/sacred/tewahedo/manifest.yaml +106 -0
- package/templates/sacred/tibetan/manifest.yaml +20 -0
- package/templates/technical/AUDIENCE.md +26 -0
- package/templates/technical/DEPENDENCIES.md +19 -0
- package/templates/technical/DOC-BRIEF.md +45 -0
- package/templates/technical/PROCEDURES.md +37 -0
- package/templates/technical/REFERENCES.md +36 -0
- package/templates/technical/SYSTEM.md +25 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// Scriveno Book Interior Template for Pandoc --template flag
|
|
2
|
+
// Usage: pandoc ... --pdf-engine=typst --template=data/export-templates/scriveno-book.typst
|
|
3
|
+
//
|
|
4
|
+
// Accepts Pandoc variables for page dimensions, margins, and text direction.
|
|
5
|
+
// Designed for print-ready PDF output compatible with KDP and IngramSpark.
|
|
6
|
+
|
|
7
|
+
// Page dimensions (Pandoc -V variables with defaults)
|
|
8
|
+
#let page-width = $if(paperwidth)$$paperwidth$$else$6in$endif$
|
|
9
|
+
#let page-height = $if(paperheight)$$paperheight$$else$9in$endif$
|
|
10
|
+
#let margin-inside = $if(margin-inside)$$margin-inside$$else$0.75in$endif$
|
|
11
|
+
#let margin-outside = $if(margin-outside)$$margin-outside$$else$0.5in$endif$
|
|
12
|
+
#let margin-top = $if(margin-top)$$margin-top$$else$0.75in$endif$
|
|
13
|
+
#let margin-bottom = $if(margin-bottom)$$margin-bottom$$else$0.75in$endif$
|
|
14
|
+
|
|
15
|
+
// Text direction: parameterized for RTL compatibility (Phase 7)
|
|
16
|
+
#let text-dir = $if(text-direction)$$text-direction$$else$ltr$endif$
|
|
17
|
+
|
|
18
|
+
// Language code for CJK detection
|
|
19
|
+
#let lang-code = $if(language)$"$language$"$else$"en"$endif$
|
|
20
|
+
|
|
21
|
+
// CJK detection helper
|
|
22
|
+
#let is-cjk = lang-code in ("zh", "ja", "ko")
|
|
23
|
+
#let is-rtl = text-dir == rtl
|
|
24
|
+
|
|
25
|
+
// Font configuration
|
|
26
|
+
#let body-font = $if(mainfont)$"$mainfont$"$else$"Libertinus Serif"$endif$
|
|
27
|
+
|
|
28
|
+
// CJK font fallback: when language is zh/ja/ko, prefer Noto Sans CJK
|
|
29
|
+
#let cjk-font = if lang-code == "zh" { "Noto Sans CJK SC" } else if lang-code == "ja" { "Noto Sans CJK JP" } else if lang-code == "ko" { "Noto Sans CJK KR" } else { body-font }
|
|
30
|
+
#let body-font-size = $if(fontsize)$$fontsize$$else$11pt$endif$
|
|
31
|
+
#let body-line-spacing = $if(linestretch)$$linestretch$$else$1.4$endif$
|
|
32
|
+
|
|
33
|
+
// Metadata
|
|
34
|
+
#let book-title = $if(title)$"$title$"$else$"Untitled"$endif$
|
|
35
|
+
#let book-author = $if(author)$"$for(author)$$it.name$$sep$, $endfor$"$else$""$endif$
|
|
36
|
+
|
|
37
|
+
#set document(
|
|
38
|
+
title: book-title,
|
|
39
|
+
author: book-author,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
#set page(
|
|
43
|
+
width: page-width,
|
|
44
|
+
height: page-height,
|
|
45
|
+
margin: (
|
|
46
|
+
inside: margin-inside,
|
|
47
|
+
outside: margin-outside,
|
|
48
|
+
top: margin-top,
|
|
49
|
+
bottom: margin-bottom,
|
|
50
|
+
),
|
|
51
|
+
// Running headers: book title on verso, current chapter title on recto.
|
|
52
|
+
// Suppress on page 1 and on chapter-opener pages (the chapter title is
|
|
53
|
+
// already displayed prominently by the level-1 heading show rule).
|
|
54
|
+
// Flip alignment for RTL (inside margin becomes the right margin).
|
|
55
|
+
header: context {
|
|
56
|
+
let page-num = counter(page).get().first()
|
|
57
|
+
if page-num <= 1 { return }
|
|
58
|
+
|
|
59
|
+
// Suppress the running head on any page that contains a level-1 heading
|
|
60
|
+
// (the chapter-opener page). Without this the chapter title appears both
|
|
61
|
+
// in the big centered heading and the running head on the same page.
|
|
62
|
+
let openers-on-this-page = query(heading.where(level: 1)).filter(
|
|
63
|
+
h => h.location().page() == here().page()
|
|
64
|
+
)
|
|
65
|
+
if openers-on-this-page.len() > 0 { return }
|
|
66
|
+
|
|
67
|
+
if calc.odd(page-num) {
|
|
68
|
+
// Recto page: current chapter title.
|
|
69
|
+
// Look up the most recent level-1 heading at or before this point.
|
|
70
|
+
let prior-chapters = query(heading.where(level: 1).before(here()))
|
|
71
|
+
if prior-chapters.len() == 0 { return }
|
|
72
|
+
let chapter-title = prior-chapters.last().body
|
|
73
|
+
let recto-align = if is-rtl { left } else { right }
|
|
74
|
+
align(recto-align, emph(text(size: 9pt, fill: rgb("#555555"), chapter-title)))
|
|
75
|
+
} else {
|
|
76
|
+
// Verso page: book title.
|
|
77
|
+
let verso-align = if is-rtl { right } else { left }
|
|
78
|
+
align(verso-align, emph(text(size: 9pt, fill: rgb("#555555"), book-title)))
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
// Page numbering: centered bottom
|
|
82
|
+
footer: context {
|
|
83
|
+
let page-num = counter(page).get().first()
|
|
84
|
+
if page-num > 1 {
|
|
85
|
+
align(center, text(size: 9pt, str(page-num)))
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
// Text settings
|
|
91
|
+
#set text(
|
|
92
|
+
font: if is-cjk { cjk-font } else { body-font },
|
|
93
|
+
size: body-font-size,
|
|
94
|
+
dir: text-dir,
|
|
95
|
+
lang: lang-code,
|
|
96
|
+
// Fallback fonts for systems without primary font
|
|
97
|
+
fallback: true,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
// Paragraph settings: CJK needs wider line spacing for readability
|
|
101
|
+
#set par(
|
|
102
|
+
leading: if is-cjk { body-line-spacing * 0.85em } else { body-line-spacing * 0.65em },
|
|
103
|
+
first-line-indent: if is-cjk { 2em } else { 1.5em },
|
|
104
|
+
justify: true,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
// Widow/orphan control: minimum 2 lines
|
|
108
|
+
#set block(
|
|
109
|
+
breakable: true,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
// Chapter headings: new page, centered, large font, extra spacing
|
|
113
|
+
#show heading.where(level: 1): it => {
|
|
114
|
+
pagebreak(weak: true)
|
|
115
|
+
v(2em)
|
|
116
|
+
align(center)[
|
|
117
|
+
#text(size: 20pt, weight: "bold")[#it.body]
|
|
118
|
+
]
|
|
119
|
+
v(1.5em)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#show heading.where(level: 2): it => {
|
|
123
|
+
v(1.2em)
|
|
124
|
+
text(size: 14pt, weight: "bold")[#it.body]
|
|
125
|
+
v(0.8em)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
#show heading.where(level: 3): it => {
|
|
129
|
+
v(0.8em)
|
|
130
|
+
text(size: 12pt, weight: "bold")[#it.body]
|
|
131
|
+
v(0.5em)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Blockquotes: indented
|
|
135
|
+
#set quote(block: true)
|
|
136
|
+
#show quote: it => {
|
|
137
|
+
pad(left: 2em, right: 1em)[
|
|
138
|
+
#set text(style: "italic")
|
|
139
|
+
#it.body
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Links: no color change in print
|
|
144
|
+
#show link: it => it
|
|
145
|
+
|
|
146
|
+
// Title page
|
|
147
|
+
$if(title)$
|
|
148
|
+
#align(center + horizon)[
|
|
149
|
+
#text(size: 24pt, weight: "bold")[#book-title]
|
|
150
|
+
$if(subtitle)$
|
|
151
|
+
#v(0.5em)
|
|
152
|
+
#text(size: 16pt, style: "italic")[$subtitle$]
|
|
153
|
+
$endif$
|
|
154
|
+
#v(2em)
|
|
155
|
+
#text(size: 14pt)[#book-author]
|
|
156
|
+
$if(publisher)$
|
|
157
|
+
#v(3em)
|
|
158
|
+
#text(size: 11pt)[$publisher$]
|
|
159
|
+
$endif$
|
|
160
|
+
]
|
|
161
|
+
#pagebreak()
|
|
162
|
+
$endif$
|
|
163
|
+
|
|
164
|
+
// Table of Contents
|
|
165
|
+
$if(toc)$
|
|
166
|
+
#outline(
|
|
167
|
+
title: "Contents",
|
|
168
|
+
depth: $if(toc-depth)$$toc-depth$$else$2$endif$,
|
|
169
|
+
indent: 1.5em,
|
|
170
|
+
)
|
|
171
|
+
#pagebreak()
|
|
172
|
+
$endif$
|
|
173
|
+
|
|
174
|
+
// Body content
|
|
175
|
+
$body$
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// Scriveno Chapbook Template -- 5.5x8.5 saddle-stitch
|
|
2
|
+
//
|
|
3
|
+
// SADDLE-STITCH CONSTRAINT: Page count must be a multiple of 4.
|
|
4
|
+
// If your poem count produces a non-multiple-of-4 page total,
|
|
5
|
+
// add blank filler pages (mod 4) at the back before printing.
|
|
6
|
+
// Formula: padding_pages = (4 - (total_pages mod 4)) mod 4
|
|
7
|
+
//
|
|
8
|
+
// Usage: pandoc ... --pdf-engine=typst --template=data/export-templates/scriveno-chapbook.typst
|
|
9
|
+
|
|
10
|
+
// Page dimensions (Pandoc -V variables with defaults)
|
|
11
|
+
#let page-width = $if(paperwidth)$$paperwidth$$else$5.5in$endif$
|
|
12
|
+
#let page-height = $if(paperheight)$$paperheight$$else$8.5in$endif$
|
|
13
|
+
#let margin-top = $if(margin-top)$$margin-top$$else$0.875in$endif$
|
|
14
|
+
#let margin-bottom = $if(margin-bottom)$$margin-bottom$$else$0.875in$endif$
|
|
15
|
+
#let margin-inside = $if(margin-inside)$$margin-inside$$else$0.75in$endif$
|
|
16
|
+
#let margin-outside = $if(margin-outside)$$margin-outside$$else$0.625in$endif$
|
|
17
|
+
|
|
18
|
+
// Text direction
|
|
19
|
+
#let text-dir = $if(text-direction)$$text-direction$$else$ltr$endif$
|
|
20
|
+
|
|
21
|
+
// Font configuration -- chapbooks default to a clean readable serif
|
|
22
|
+
#let body-font = $if(mainfont)$"$mainfont$"$else$"Libertinus Serif"$endif$
|
|
23
|
+
#let body-font-size = $if(fontsize)$$fontsize$$else$11pt$endif$
|
|
24
|
+
|
|
25
|
+
// Metadata
|
|
26
|
+
#let book-title = $if(title)$"$title$"$else$"Untitled Chapbook"$endif$
|
|
27
|
+
#let book-author = $if(author)$"$for(author)$$it.name$$sep$, $endfor$"$else$""$endif$
|
|
28
|
+
|
|
29
|
+
#set document(
|
|
30
|
+
title: book-title,
|
|
31
|
+
author: book-author,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
// Page setup -- no running header (chapbooks typically use only page numbers)
|
|
35
|
+
#set page(
|
|
36
|
+
width: page-width,
|
|
37
|
+
height: page-height,
|
|
38
|
+
margin: (
|
|
39
|
+
inside: margin-inside,
|
|
40
|
+
outside: margin-outside,
|
|
41
|
+
top: margin-top,
|
|
42
|
+
bottom: margin-bottom,
|
|
43
|
+
),
|
|
44
|
+
footer: context {
|
|
45
|
+
let page-num = counter(page).get().first()
|
|
46
|
+
if page-num > 1 {
|
|
47
|
+
align(center, text(size: 9pt, str(page-num)))
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
// Text settings: 11pt serif, 1.4 leading
|
|
53
|
+
// No first-line indent for poetry -- poems use stanza breaks (blank lines)
|
|
54
|
+
#set text(font: body-font, size: body-font-size, dir: text-dir)
|
|
55
|
+
#set par(leading: 1.4 * 0.65em, first-line-indent: 0em, justify: false)
|
|
56
|
+
|
|
57
|
+
// Collection title (H1): title page only, centered
|
|
58
|
+
#show heading.where(level: 1): it => {
|
|
59
|
+
pagebreak(weak: true)
|
|
60
|
+
v(3em)
|
|
61
|
+
align(center)[#text(size: 18pt, weight: "bold")[#it.body]]
|
|
62
|
+
v(2em)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Poem title (H2): centered, moderate spacing, starts new page
|
|
66
|
+
#show heading.where(level: 2): it => {
|
|
67
|
+
pagebreak(weak: true)
|
|
68
|
+
v(1.5em)
|
|
69
|
+
align(center)[#text(size: 13pt, weight: "bold")[#it.body]]
|
|
70
|
+
v(1em)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Section (H3): centered, smaller
|
|
74
|
+
#show heading.where(level: 3): it => {
|
|
75
|
+
v(1em)
|
|
76
|
+
align(center)[#text(size: 11pt, weight: "bold")[#it.body]]
|
|
77
|
+
v(0.8em)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Blockquotes: indented
|
|
81
|
+
#set quote(block: true)
|
|
82
|
+
#show quote: it => {
|
|
83
|
+
pad(left: 2em, right: 1em)[
|
|
84
|
+
#set text(style: "italic")
|
|
85
|
+
#it.body
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Links: no color change in print
|
|
90
|
+
#show link: it => it
|
|
91
|
+
|
|
92
|
+
// Title page
|
|
93
|
+
$if(title)$
|
|
94
|
+
#align(center + horizon)[
|
|
95
|
+
#text(size: 22pt, weight: "bold")[#book-title]
|
|
96
|
+
$if(subtitle)$
|
|
97
|
+
#v(0.5em)
|
|
98
|
+
#text(size: 14pt, style: "italic")[$subtitle$]
|
|
99
|
+
$endif$
|
|
100
|
+
#v(2em)
|
|
101
|
+
#text(size: 13pt)[#book-author]
|
|
102
|
+
$if(publisher)$
|
|
103
|
+
#v(3em)
|
|
104
|
+
#text(size: 10pt)[$publisher$]
|
|
105
|
+
$endif$
|
|
106
|
+
]
|
|
107
|
+
#pagebreak()
|
|
108
|
+
$endif$
|
|
109
|
+
|
|
110
|
+
// Table of Contents (optional for chapbooks)
|
|
111
|
+
$if(toc)$
|
|
112
|
+
#outline(
|
|
113
|
+
title: "Contents",
|
|
114
|
+
depth: $if(toc-depth)$$toc-depth$$else$2$endif$,
|
|
115
|
+
indent: 1em,
|
|
116
|
+
)
|
|
117
|
+
#pagebreak()
|
|
118
|
+
$endif$
|
|
119
|
+
|
|
120
|
+
// Body content
|
|
121
|
+
$body$
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
% Scriveno Elsevier LaTeX Template for Pandoc --template flag
|
|
2
|
+
% Requires elsarticle.cls (install: tlmgr install elsarticle)
|
|
3
|
+
% Usage: pandoc ... --template=data/export-templates/scriveno-elsevier.latex
|
|
4
|
+
%
|
|
5
|
+
% Default class options: [preprint,12pt] for preprint; [final] for final submission.
|
|
6
|
+
% Pass via Pandoc: --metadata classoption=preprint
|
|
7
|
+
|
|
8
|
+
\documentclass[$if(classoption)$$for(classoption)$$classoption$$sep$,$endfor$$endif$]{elsarticle}
|
|
9
|
+
|
|
10
|
+
% Encoding -- safe with elsarticle when using pdflatex
|
|
11
|
+
\usepackage[T1]{fontenc}
|
|
12
|
+
\usepackage[utf8]{inputenc}
|
|
13
|
+
|
|
14
|
+
% Math support
|
|
15
|
+
\usepackage{amsmath,amssymb}
|
|
16
|
+
|
|
17
|
+
% Graphics
|
|
18
|
+
\usepackage{graphicx}
|
|
19
|
+
\makeatletter
|
|
20
|
+
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
|
|
21
|
+
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
|
|
22
|
+
\makeatother
|
|
23
|
+
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
|
|
24
|
+
|
|
25
|
+
% Pandoc required: code highlighting
|
|
26
|
+
$if(highlighting-macros)$
|
|
27
|
+
$highlighting-macros$
|
|
28
|
+
$endif$
|
|
29
|
+
|
|
30
|
+
% Pandoc required: tight lists
|
|
31
|
+
\providecommand{\tightlist}{%
|
|
32
|
+
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
|
33
|
+
|
|
34
|
+
% Pandoc required: CSL references (citeproc compatibility)
|
|
35
|
+
$if(csl-refs)$
|
|
36
|
+
\newlength{\cslhangindent}
|
|
37
|
+
\setlength{\cslhangindent}{1.5em}
|
|
38
|
+
\newlength{\csllabelwidth}
|
|
39
|
+
\setlength{\csllabelwidth}{3em}
|
|
40
|
+
\newenvironment{CSLReferences}[2]%
|
|
41
|
+
{\setlength{\parindent}{0pt}%
|
|
42
|
+
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces}%
|
|
43
|
+
{\par}
|
|
44
|
+
\newcommand{\CSLBlock}[1]{\hfill\break#1\hfill\break}
|
|
45
|
+
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}}
|
|
46
|
+
\newcommand{\CSLRightInline}[1]{\parbox[t]{\dimexpr\linewidth-\csllabelwidth\relax}{\strut#1\strut}}
|
|
47
|
+
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
|
|
48
|
+
$endif$
|
|
49
|
+
|
|
50
|
+
% Document metadata
|
|
51
|
+
\title{$if(title)$$title$$else$Untitled$endif$}
|
|
52
|
+
\author{$if(author)$$for(author)$$if(it.name)$$it.name$$else$$it$$endif$$sep$ \and $endfor$$else$~$endif$}
|
|
53
|
+
$if(author)$$for(author)$$if(it.affiliation)$
|
|
54
|
+
\address{$it.affiliation$}
|
|
55
|
+
$endif$$endfor$$endif$
|
|
56
|
+
\date{$if(date)$$date$$else$\today$endif$}
|
|
57
|
+
|
|
58
|
+
\begin{document}
|
|
59
|
+
|
|
60
|
+
\maketitle
|
|
61
|
+
|
|
62
|
+
$if(abstract)$
|
|
63
|
+
\begin{abstract}
|
|
64
|
+
\noindent $abstract$
|
|
65
|
+
\end{abstract}
|
|
66
|
+
$endif$
|
|
67
|
+
|
|
68
|
+
$if(keywords)$
|
|
69
|
+
\noindent\textbf{Keywords:} $keywords$
|
|
70
|
+
$endif$
|
|
71
|
+
|
|
72
|
+
$body$
|
|
73
|
+
|
|
74
|
+
% Bibliography: use elsarticle-num (numeric) or elsarticle-harv (author-year) bib style
|
|
75
|
+
|
|
76
|
+
\end{document}
|