fix: use explicit relative path for swiss-letter.tex template
The /convert-cover-letter command was using a placeholder syntax [path-to-swiss-letter.tex] which caused inconsistent template discovery. Claude Code would sometimes skip the template or fail to find it, resulting in cover letters using Pandoc's default template instead of Swiss Norm formatting. This fix replaces the placeholder with an explicit relative path (../../../src/.claude/templates/swiss-letter.tex) that reliably resolves from the typical execution location (applications/pending/[job-folder]/) to the project root and then to the template directory. Changes: - Updated src/.claude/commands/convert-cover-letter.md with explicit template path - Enhanced specification with template path resolution requirement - Added clarification about path resolution relative to execution location Testing: - Verified PDF generation with Swiss letter template from application folders - Confirmed consistent template discovery across different working directories - Validated Swiss Norm formatting (address window positioning, KOMA-Script) Related: openspec/changes/fix-coverletter-template-path Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -247,12 +247,12 @@ Build the conversion command:
|
||||
pandoc cover-letter.md \
|
||||
--from markdown \
|
||||
--to latex \
|
||||
--template=[path-to-swiss-letter.tex] \
|
||||
--template=../../../src/.claude/templates/swiss-letter.tex \
|
||||
--pdf-engine=pdflatex \
|
||||
--output=cover-letter.pdf
|
||||
```
|
||||
|
||||
**Template path**: Use the template at `src/.claude/templates/swiss-letter.tex` relative to the framework root.
|
||||
**Template path**: The path `../../../src/.claude/templates/swiss-letter.tex` is relative to the typical execution location (`applications/pending/[job-folder]/`), going up three levels to the project root and then to the template directory.
|
||||
|
||||
### Execute Conversion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user