feat: add proposal for cover letter PDF conversion
Add OpenSpec proposal for converting markdown cover letters to PDF format using Swiss business letter standards. The proposal includes: - Swiss letter formatting with scrlttr2 and Swiss Norm configuration - Environment validation for Pandoc and LaTeX - Comprehensive error handling and user guidance - Support for Swiss German formatting and address window positioning This addresses step 7 "Generate PDFs" in the project workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
% Swiss Business Letter Template for Pandoc
|
||||
% This template follows Swiss standards (SN) for business correspondence
|
||||
% Compatible with KOMA-Script scrlttr2 class
|
||||
|
||||
\documentclass[
|
||||
fontsize=11pt,
|
||||
paper=a4,
|
||||
parskip=half, % Half line spacing between paragraphs
|
||||
fromalign=right, % Sender address aligned right
|
||||
fromphone, % Include phone number
|
||||
fromemail, % Include email address
|
||||
version=last % Use latest KOMA-Script features
|
||||
]{scrlttr2}
|
||||
|
||||
% ==================== ENCODING & FONTS ====================
|
||||
% UTF-8 input encoding for special characters (ä, ö, ü, ß)
|
||||
\usepackage[utf8]{inputenc}
|
||||
% T1 font encoding for proper hyphenation and special characters
|
||||
\usepackage[T1]{fontenc}
|
||||
|
||||
% ==================== HYPERLINKS ====================
|
||||
% Enable clickable email links in PDF
|
||||
\usepackage{hyperref}
|
||||
\hypersetup{
|
||||
colorlinks=true,
|
||||
urlcolor=black,
|
||||
pdfborder={0 0 0}
|
||||
}
|
||||
|
||||
% ==================== PANDOC COMPATIBILITY ====================
|
||||
% Define tightlist command for Pandoc-generated lists
|
||||
\providecommand{\tightlist}{%
|
||||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
||||
|
||||
% ==================== SWISS LETTER CONFIGURATION ====================
|
||||
% Load Swiss Norm (SN) for proper address window positioning
|
||||
% This ensures the recipient address fits in standard Swiss envelope windows
|
||||
\LoadLetterOption{SN}
|
||||
|
||||
% ==================== SENDER INFORMATION ====================
|
||||
% Customize these fields by editing the markdown frontmatter
|
||||
\setkomavar{fromname}{$from.name$}
|
||||
\setkomavar{fromaddress}{$from.street$\\$from.city$}
|
||||
|
||||
$if(from.phone)$
|
||||
\setkomavar{fromphone}{$from.phone$}
|
||||
$endif$
|
||||
|
||||
$if(from.email)$
|
||||
% Email is rendered as a clickable hyperlink
|
||||
\setkomavar{fromemail}{\href{mailto:$from.email$}{$from.email$}}
|
||||
$endif$
|
||||
|
||||
% ==================== LETTER METADATA ====================
|
||||
$if(subject)$
|
||||
\setkomavar{subject}{$subject$}
|
||||
$endif$
|
||||
|
||||
$if(date)$
|
||||
\setkomavar{date}{$date$}
|
||||
$endif$
|
||||
|
||||
$if(signature)$
|
||||
\setkomavar{signature}{$signature$}
|
||||
$endif$
|
||||
|
||||
% ==================== ENCLOSURES ====================
|
||||
$if(enclosures)$
|
||||
% Separator between "Enclosures" label and list (e.g., "Anlagen:")
|
||||
\setkomavar{enclseparator}{:}
|
||||
$endif$
|
||||
|
||||
% ==================== CUSTOMIZATION OPTIONS ====================
|
||||
% Remove backaddress line in envelope window (uncomment to enable)
|
||||
\setkomavar{backaddress}{}
|
||||
|
||||
% You can customize additional elements here:
|
||||
% - \setkomavar{location}{} - Text in the upper right corner
|
||||
% - \setkomavar{place}{} - Place of writing (if different from address)
|
||||
% - Font sizes, margins, spacing can be adjusted via KOMA-Script options
|
||||
|
||||
% ==================== DOCUMENT BODY ====================
|
||||
\begin{document}
|
||||
|
||||
\begin{letter}{%
|
||||
% Recipient address - each line from the 'to' frontmatter array
|
||||
$for(to)$
|
||||
$to$\\
|
||||
$endfor$
|
||||
}
|
||||
|
||||
% ==================== OPENING ====================
|
||||
$if(opening)$
|
||||
\opening{$opening$}
|
||||
$else$
|
||||
% Default opening if not specified
|
||||
\opening{Sehr geehrte Damen und Herren}
|
||||
$endif$
|
||||
|
||||
% ==================== LETTER BODY ====================
|
||||
% The main content from your markdown file is inserted here
|
||||
$body$
|
||||
|
||||
% ==================== CLOSING ====================
|
||||
$if(closing)$
|
||||
\closing{$closing$}
|
||||
$else$
|
||||
% Default closing if not specified
|
||||
\closing{Freundliche Grüsse}
|
||||
$endif$
|
||||
|
||||
% ==================== ENCLOSURES LIST ====================
|
||||
$if(enclosures)$
|
||||
% List of attached documents (e.g., CV, certificates)
|
||||
\encl{$for(enclosures)$$enclosures$$sep$\\$endfor$}
|
||||
$endif$
|
||||
|
||||
\end{letter}
|
||||
|
||||
\end{document}
|
||||
Reference in New Issue
Block a user