feat: implement universal wrapper for proper export format variable passing
- Add universal Pandoc wrapper template to handle variable substitution - Fix export_format variable not reaching Typst templates via -V flag - Implement single-page/multi-page format selection functionality - Update all templates to use conditional height parameter with spread operator - Add pluginDir to PandocOptions for proper wrapper path resolution Technical changes: - Create templates/universal-wrapper.pandoc.typ for Pandoc template system - Modify buildPandocArgs to use --template instead of -V template= - Update page layout logic in all templates using ..if export_format == "single-page" - Replace duplicate conditional set page() blocks with single streamlined approach - Fix type checking issues (string -> str) for consistency Templates updated: - default.typ: Clean minimal style with conditional height - article.typ: Magazine-style layout with conditional height - report.typ: Professional business format with conditional height - modern.typ: Renamed from single-page.typ for better naming consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
6 files changed
+90
-20
No files matched your search
@@ -102,9 +102,11 @@
|
||||
margin
|
||||
}
|
||||
|
||||
// Set page layout with conditional height based on export format
|
||||
set page(
|
||||
paper: paper,
|
||||
margin: page-margin,
|
||||
..if export_format == "single-page" { (height: auto,) } else { (:) },
|
||||
numbering: pagenumbering,
|
||||
header: context {
|
||||
let page-num = counter(page).get().first()
|
||||
@@ -136,7 +138,7 @@
|
||||
|
||||
// Business document font
|
||||
// Use UI-configured font if available, otherwise use template default
|
||||
let body-font = if font != none and type(font) == "string" {
|
||||
let body-font = if font != none and type(font) == str {
|
||||
(font, "Concourse OT", "Helvetica Neue", "Arial", "sans-serif")
|
||||
} else {
|
||||
font
|
||||
|
||||
Reference in new issue
Block a user