Skip to content

Commit 769a576

Browse files
committed
(workflow): add XeLaTeX, multi-document, and font support for presentations
- Add XeLaTeX compilation support for presentation/poster projects - Add output directory support (-outdir=build) for compiled files - Add font installation step for CI (custom fonts in fonts/ dir) - Add multi-document compilation (additional documents like posters) - Add get_documents_config() for multi-document project configuration - Add get_workflow_config() for workflow-specific settings - Update pyproject.toml template with [documents] and [workflow] sections - Update artifact and release files to include all compiled PDFs Closes #3
1 parent e44cf07 commit 769a576

File tree

2 files changed

+229
-16
lines changed

2 files changed

+229
-16
lines changed

src/article_cli/config.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,21 @@ def get_project_config(self) -> Dict[str, Any]:
180180
"project_type": self.get("project", "type", "article"),
181181
}
182182

183+
def get_documents_config(self) -> Dict[str, Any]:
184+
"""Get documents configuration for multi-document projects"""
185+
return {
186+
"main": self.get("documents", "main", ""),
187+
"additional": self.get("documents", "additional", []),
188+
}
189+
190+
def get_workflow_config(self) -> Dict[str, Any]:
191+
"""Get workflow-specific configuration for GitHub Actions"""
192+
return {
193+
"output_dir": self.get("workflow", "output_dir", ""),
194+
"fonts_dir": self.get("workflow", "fonts_dir", ""),
195+
"install_fonts": self.get("workflow", "install_fonts", False),
196+
}
197+
183198
def get_presentation_config(self) -> Dict[str, Any]:
184199
"""Get presentation-specific configuration (for Beamer)"""
185200
return {
@@ -327,6 +342,25 @@ def create_sample_config(self, path: Optional[Path] = None) -> Path:
327342
328343
# Number of columns
329344
columns = 3
345+
346+
# Multi-document projects (for projects with multiple LaTeX documents)
347+
[documents]
348+
# Main document to compile
349+
main = "main.tex"
350+
351+
# Additional documents to compile (e.g., poster alongside presentation)
352+
# additional = ["poster.tex"]
353+
354+
# Workflow settings for GitHub Actions
355+
[workflow]
356+
# Output directory for compiled files (empty string means root directory)
357+
# output_dir = "build"
358+
359+
# Directory containing custom fonts (for XeLaTeX compilation)
360+
# fonts_dir = "fonts"
361+
362+
# Whether to install custom fonts in CI environment
363+
# install_fonts = true
330364
"""
331365

332366
try:

0 commit comments

Comments
 (0)