默认情况下,发件人信息会打印两次,一次在标题中,一次在地址字段中。
我想在标题中隐藏发件人信息。
这个问题与删除双重发件人标头
\documentclass[
fontsize=11pt,
paper=a4,
parskip=half,
enlargefirstpage=on, % More space on first page
fromalign=right, % Placement of name in letter head
fromphone=off, % Turn on phone number of sender
fromrule=aftername, % Rule after sender name in letter head
addrfield=on, % Adress field for envelope with window
backaddress=on, % Sender address in this window
subject=beforeopening, % Placement of subject
locfield=narrow, % Additional field for sender
foldmarks=on, % Print foldmarks
firstfoot=off, % Footerbereich
numericaldate=on,
]{scrlttr2}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,ngerman]{babel}
\usepackage{lmodern}
\setkomafont{fromname}{\sffamily \LARGE}
\setkomafont{fromaddress}{\sffamily}%% statt \small
\setkomafont{pagenumber}{\sffamily}
\setkomafont{subject}{\bfseries}
\setkomafont{backaddress}{\mdseries}
\LoadLetterOption{DIN}
\setkomavar{fromname}{hh}
\setkomavar{fromaddress}{hh}
\setkomavar{fromphone}{+39 \,00\,00\,00\,000}
\setkomavar{fromemail}{[email protected]} % NON VIENE VISUALIZZATA
\setkomavar{backaddressseparator}{\enspace\textperiodcentered\enspace}
\setkomavar{signature}{hh}
\setkomavar{place}{hh}
\setkomavar{date}{\today}
\setkomavar{enclseparator}{: }
% signature same indention level as rest
\renewcommand*{\raggedsignature}{\raggedright}
\setkomavar{location}
{\raggedleft Kundennummer: hh \\}
\begin{document}
\begin{letter}
{
hh \\ hh \\ hh \\ 79090 Pfortsheim
}
\setkomavar{subject}{hh}
\opening{Sehr geehrte Damen und Herren,}
hh
\closing{Viele Grüße,
\vspace{1cm}
}
\end{letter}
\end{document}
答案1
设置类选项firsthead=false
。然后您可以删除选项fromalign
,fromrule
然后fromphone
:
\documentclass[
fontsize=11pt,
paper=a4,
parskip=half,
enlargefirstpage=on, % More space on first page
addrfield=on, % Adress field for envelope with window
% following line is changed:
backaddress=on, % Sender address in this window
subject=beforeopening, % Placement of subject
locfield=narrow, % Additional field for sender
foldmarks=on, % Print foldmarks
firsthead=false % <- added
]{scrlttr2}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{blindtext}
\setkomafont{fromname}{\sffamily \LARGE}
\setkomafont{fromaddress}{\sffamily}%% statt \small
\setkomafont{pagenumber}{\sffamily}
\setkomafont{subject}{\bfseries}
%\setkomafont{backaddress}{\mdseries}
%\LoadLetterOption{DIN}
\setkomavar{fromname}{Mario Rossi}
\setkomavar{fromaddress}{Via Roma 2,\\Frascati}
\setkomavar{fromphone}{+39 \,00\,00\,00\,000}
\setkomavar{fromemail}{[email protected]} % NON VIENE VISUALIZZATA
%\setkomavar{backaddressseparator}{\enspace\textperiodcentered\enspace}
\setkomavar{signature}{(Mario Rossi)}
\setkomavar{place}{Frascati}
\setkomavar{date}{\today}
\setkomavar{enclseparator}{: }
\begin{document}
\begin{letter}{To: Claire Laterfield}
\setkomavar{subject}{Greetings}
\opening{Dear Claire,}
I am writing this letter because I have nothing better to do.
\closing{Sincerely,}
\end{letter}
\end{document}
结果是
或者,您可以更改变量firsthead
。如果标题应为空,请使用:
\documentclass[
fontsize=11pt,
paper=a4,
parskip=half,
enlargefirstpage=on, % More space on first page
addrfield=on, % Adress field for envelope with window
% following line is changed:
backaddress=on, % Sender address in this window
subject=beforeopening, % Placement of subject
locfield=narrow, % Additional field for sender
foldmarks=on, % Print foldmarks
]{scrlttr2}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{blindtext}
\setkomafont{fromname}{\sffamily \LARGE}
\setkomafont{fromaddress}{\sffamily}%% statt \small
\setkomafont{pagenumber}{\sffamily}
\setkomafont{subject}{\bfseries}
%\setkomafont{backaddress}{\mdseries}
%\LoadLetterOption{DIN}
\setkomavar{fromname}{Mario Rossi}
\setkomavar{fromaddress}{Via Roma 2,\\Frascati}
\setkomavar{fromphone}{+39 \,00\,00\,00\,000}
\setkomavar{fromemail}{[email protected]} % NON VIENE VISUALIZZATA
%\setkomavar{backaddressseparator}{\enspace\textperiodcentered\enspace}
\setkomavar{signature}{(Mario Rossi)}
\setkomavar{place}{Frascati}
\setkomavar{date}{\today}
\setkomavar{enclseparator}{: }
\setkomavar{firsthead}{}% <- added
\begin{document}
\begin{letter}{To: Claire Laterfield}
\setkomavar{subject}{Greetings}
\opening{Dear Claire,}
I am writing this letter because I have nothing better to do.
\closing{Sincerely,}
\end{letter}
\end{document}
您也可以定义自己的标题:
\documentclass[
fontsize=11pt,
paper=a4,
parskip=half,
enlargefirstpage=on, % More space on first page
addrfield=on, % Adress field for envelope with window
% following line is changed:
backaddress=on, % Sender address in this window
subject=beforeopening, % Placement of subject
locfield=narrow, % Additional field for sender
foldmarks=on, % Print foldmarks
]{scrlttr2}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{blindtext}
\setkomafont{fromname}{\sffamily \LARGE}
\setkomafont{fromaddress}{\sffamily}%% statt \small
\setkomafont{pagenumber}{\sffamily}
\setkomafont{subject}{\bfseries}
%\setkomafont{backaddress}{\mdseries}
%\LoadLetterOption{DIN}
\setkomavar{fromname}{Mario Rossi}
\setkomavar{fromaddress}{Via Roma 2,\\Frascati}
\setkomavar{fromphone}{+39 \,00\,00\,00\,000}
\setkomavar{fromemail}{[email protected]} % NON VIENE VISUALIZZATA
%\setkomavar{backaddressseparator}{\enspace\textperiodcentered\enspace}
\setkomavar{signature}{(Mario Rossi)}
\setkomavar{place}{Frascati}
\setkomavar{date}{\today}
\setkomavar{enclseparator}{: }
\setkomavar{firsthead}{<own header>}% <- added
\begin{document}
\begin{letter}{To: Claire Laterfield}
\setkomavar{subject}{Greetings}
\opening{Dear Claire,}
I am writing this letter because I have nothing better to do.
\closing{Sincerely,}
\end{letter}
\end{document}