fix: improve Swiss letter template localization and formatting
- Disable page numbering (pagenumber=false) to remove "Page 2" footer - Add conditional German language support (babel with ngerman/german) - German labels (Telefon, Anlagen) when texlive-lang-german is installed - Graceful fallback to English labels when language package unavailable - Update documentation to clarify language package as recommended This addresses user feedback about English labels in German letters and unwanted page numbers on multi-page letters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -91,14 +91,17 @@ LaTeX (pdflatex) is required for PDF generation but is not installed.
|
||||
|
||||
### Ubuntu/Debian:
|
||||
sudo apt update
|
||||
sudo apt install texlive-latex-base texlive-lang-german texlive-latex-extra
|
||||
sudo apt install texlive-latex-base texlive-latex-extra
|
||||
|
||||
# For German language support (recommended for proper labels):
|
||||
sudo apt install texlive-lang-german
|
||||
|
||||
### macOS (Homebrew):
|
||||
brew install texlive
|
||||
# Note: This is a large download (~4GB). Alternative: MacTeX from https://www.tug.org/mactex/
|
||||
|
||||
### Arch Linux:
|
||||
sudo pacman -S texlive-core texlive-latexextra
|
||||
sudo pacman -S texlive-core texlive-latexextra texlive-langgerman
|
||||
|
||||
### Windows:
|
||||
# Install MiKTeX from: https://miktex.org/download
|
||||
@@ -108,9 +111,11 @@ sudo pacman -S texlive-core texlive-latexextra
|
||||
|
||||
**Required packages**:
|
||||
- texlive-latex-base (core LaTeX)
|
||||
- texlive-lang-german (Swiss German hyphenation and spelling)
|
||||
- texlive-latex-extra (KOMA-Script including scrlttr2)
|
||||
|
||||
**Recommended packages**:
|
||||
- texlive-lang-german (German labels: "Telefon" instead of "Phone", "Anlagen" instead of "encl")
|
||||
|
||||
After installation, run: pdflatex --version
|
||||
Then try /convert-cover-letter again.
|
||||
```
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
fromalign=right, % Sender address aligned right
|
||||
fromphone, % Include phone number
|
||||
fromemail, % Include email address
|
||||
pagenumber=false, % Disable page numbers
|
||||
version=last % Use latest KOMA-Script features
|
||||
]{scrlttr2}
|
||||
|
||||
@@ -32,6 +33,28 @@
|
||||
\providecommand{\tightlist}{%
|
||||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
||||
|
||||
% ==================== LANGUAGE SUPPORT ====================
|
||||
% Try to load German language support if available
|
||||
% This provides proper German labels (Telefon, Anlagen) and hyphenation
|
||||
%
|
||||
% If german.ldf is found: Labels will be in German
|
||||
% If not found: Labels will be in English (Phone, encl)
|
||||
%
|
||||
% To install German support:
|
||||
% Ubuntu/Debian: sudo apt install texlive-lang-german
|
||||
% Arch: sudo pacman -S texlive-langgerman
|
||||
% macOS/Windows: Included in full TeX Live installation
|
||||
\IfFileExists{ngerman.ldf}{%
|
||||
\usepackage[ngerman]{babel}
|
||||
}{%
|
||||
\IfFileExists{german.ldf}{%
|
||||
\usepackage[german]{babel}
|
||||
}{%
|
||||
% No German language files found
|
||||
% Labels will be in English (Phone, encl) without language package
|
||||
}
|
||||
}
|
||||
|
||||
% ==================== SWISS LETTER CONFIGURATION ====================
|
||||
% Load Swiss Norm (SN) for proper address window positioning
|
||||
% This ensures the recipient address fits in standard Swiss envelope windows
|
||||
|
||||
Reference in New Issue
Block a user