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
@@ -96,9 +96,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 {
|
||||
if counter(page).get().first() > 1 [
|
||||
@@ -118,7 +120,7 @@
|
||||
|
||||
// Mixed fonts - serif body, sans-serif headings
|
||||
// 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", "Georgia", "Times New Roman", "serif")
|
||||
} else {
|
||||
font
|
||||
@@ -143,7 +145,7 @@
|
||||
|
||||
// Magazine-style heading styles
|
||||
// Use UI-configured heading font and size if available
|
||||
let heading-font = if heading_font != none and type(heading_font) == "string" {
|
||||
let heading-font = if heading_font != none and type(heading_font) == str {
|
||||
(heading_font, "SF Pro Text", "Helvetica Neue", "Arial", "sans-serif")
|
||||
} else if heading_font != none {
|
||||
heading_font
|
||||
|
||||
Reference in new issue
Block a user