I am having an issue with the firsthead
option in scrlttr2
class. See attached code. The document compiles with firsthead=off
but when the option is set to firsthead=on
, it generates the following error message.
Head of first page ! Missing number, treated as zero.
I do not know if it is a compatibility issue or something else. This has happened with many tex files I use. Surprisingly enough the same tex file compiles fine on my work laptop.
My code is as follows:
\documentclass[
pagenumber = off, % Removes page numbers from page 2 onwards
parskip = half, % Separates paragraphs with some whitespace, use parskip=full for more space or comment out to return to default
fromalign = right, % Aligns the from address to the right
foldmarks=on, % Prints small fold marks on the left of the page
addrfield=on, % Set to false to hide the addressee section - you will then want to adjust the height of the body of the letter on the page by adding the following in this section: \makeatletter \@setplength{refvpos}{\useplength{toaddrvpos}} \makeatletter
fromphone = on, % add phone
fromemail = on, % add emaill
frommobilephone = on, % add mobile phone
firstfoot = off, % if first foot is on
firsthead = on
]{scrlttr2}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{url}
\usepackage{graphicx}
\usepackage{eurosym}
\usepackage[headheight=20pt, headsep=20pt]{geometry}
%\usepackage{showframe}
%\usepackage{datetime}
\usepackage{amsmath}
%\usepackage{gfsdidot}
%\usepackage{calligra}
\usepackage[hidelinks]{hyperref}
\usepackage{scrlayer-scrpage}
\usepackage{graphicx} % Um Grafiken (bspw. das Logo) einbinden zu können
\usepackage{blindtext}
\setlength{\parskip}{0.1\baselineskip}
\renewcommand*{\raggedsignature}{\raggedright} % Stop the signature from indenting
\LoadLetterOption{DIN} % Einstellungen für DIN 676 laden
\renewcommand*{\raggedsignature}{\raggedright}
\setkomavar{fromname}{Ct. Jack Sparrow}
\setkomavar{fromaddress}{Musterstr. 15, 05050 Musterstadt}
\setkomavar{frommobilephone}{+49 152 00000000}
\setkomavar{fromemail}{abcd@gmail.com}
\setlength{\parindent}{0pt}
\newcommand{\logo}[1]{\renewcommand{\logo}{#1}}
\newcommand{\Who}[1]{\renewcommand{\Who}{#1}}
\newcommand{\Title}[1]{\renewcommand{\Title}{#1}}
\Who{\huge Ct. Jack Sparrow \par} % Your name
\Title{Artist for Music and Dance} % Your title, leave blank for no title
\renewcaptionname{ngerman}{\customername}{Steuernummer}
\renewcaptionname{ngerman}{\invoicename}{Rechnungsnummer}
\setkomavar{customer}{222/333/00000} % Steuernummer
\setkomavar{invoice}{2017-12-E001} % Rechnungsnummer
\setkomavar{date}{\today} % Datum
\KOMAoptions{fromphone=on,fromfax=off}
\setkomavar{subject}{Rechnung über erbrachte Leistungen}
\begin{document}
\begin{letter}{Receiver\\
His address\\
Pin, City}
\opening{Sehr geehrte Damen und Herren,}
\blindtext[2]
\closing{Best Regards,}
\end{letter}
\end{document}
\parindent
is already 0 afterparskip=half
. And the result of setting\parskip
to0.1\baselineskip
looks more like a printing error than intent. However, if you want to use such settings, you should use\setparsizes
(see the KOMA-Script manual for more information). And I would recommend to change\raggedsignature
only once (and after loading the LCO). – Schweinebacke Dec 13 '17 at 6:51