我正在尝试对带窗口的信封进行信件排序。我的代码如下。
%-----------------------------------------------------------------------------%
\documentclass[a4paper]{scrlttr2}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{url}
\setkomavar{fromname}{My Name}
\setkomavar{fromaddress}{Address \\ etc \\ London }
\setkomavar{fromphone}{1234567890}
\begin{document}
\begin{letter}{XXXXX \\ XXXX \\ XXXXX
\\ XXXX \\ XXXXX \\ XXXXX}
% \KOMAoptions{fromphone=true,fromfax=false}
% \setkomavar{subject}{Wikipedia}
% \setkomavar{customer}{2342}
\opening{Dear XXXXX,}
%%%%%% BODY OF LETTER
\closing{Yours XXXXX,}
% \ps{P.S. You can find the full text of GFDL license at
% \url{http://www.gnu.org/copyleft/fdl.html}.}
% \encl{Copyright permission form}
\end{letter}
\end{document}
编译没问题,但它在左上角显示我的地址,而我想要的是右上角的地址。此外,我的地址下面有一行重复的信息,下面有一条实线。
有人能告诉我如何将我的地址显示在右上角,并删除这一行吗?
谢谢。
答案1
好吧,您需要向课程添加两个选项scrlttr2
才能获得您想要的东西:
fromalign=locationright, % <==========================================
backaddress=off, % <==================================================
完整的 TeX 代码如下
\documentclass[%
paper=a4,
fromalign=locationright, % <==========================================
backaddress=off, % <==================================================
]{scrlttr2}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{url}
\setkomavar{fromname}{My Name}
\setkomavar{fromaddress}{Address \\ etc \\ London }
\setkomavar{fromphone}{1234567890}
\begin{document}
\begin{letter}{XXXXX \\ XXXX \\ XXXXX
\\ XXXX \\ XXXXX \\ XXXXX}
% \KOMAoptions{fromphone=true,fromfax=false}
% \setkomavar{subject}{Wikipedia}
% \setkomavar{customer}{2342}
\opening{Dear XXXXX,}
%%%%%% BODY OF LETTER
\closing{Yours XXXXX,}
% \ps{P.S. You can find the full text of GFDL license at
% \url{http://www.gnu.org/copyleft/fdl.html}.}
% \encl{Copyright permission form}
\end{letter}
\end{document}
您将获得最终的 pdf: