我想获得一封信件的确切布局,但我没有得到答案。
我在 ctan 上找到了课程chletter
,但阅读文档后,我认为它不允许这个日期位置。
\documentclass[]{chletter}
\usepackage[english]{babel}
\name{My Name}
\address{My Street \\ My city}
\date{The place where I am, \today}
\title{\textbf{The title of the job \quad --\quad 100\%}}
\begin{document}
\begin{letter}{Compagny\\Contact person\\Street\\City}
\object
\opening{Dear Mr. Forexample,}
My letter body.
\closing{Best regards}
%\encl{enclosures}
%\cc{other recipients}
\end{letter}
\end{document}
我也尝试了这个课程scrlttr2
,但我还没有找到如何获得这种布局。
答案1
下面是一个使用的示例scrlttr2
:
\documentclass[
SN,% lco file for swiss letters (SN 010 130))
refline=dateleft,
firstfoot=false,
enlargefirstpage,
backaddress=false,
foldmarks=false,
parskip=half-
]{scrlttr2}
\usepackage[english]{babel}
\setkomavar{fromname}{My Name}
\setkomavar{fromaddress}{My Street \\ My city}
\setkomavar{date}{The place where I am, \today}
\setkomavar{subject}{The title of the job \quad --\quad 100\%}
\setkomafont{title}{\bfseries\normalsize\raggedright}
\makeatletter
\@setplength{firstheadwidth}{\textwidth}
\makeatother
\renewcommand\raggedsignature{\raggedright}
\usepackage{blindtext}% dummy text
\begin{document}
\begin{letter}{Compagny\\Contact person\\Street\\City}
\opening{Dear Mr. Forexample,}
\blindtext
\blindtext
\closing{Best regards}
\encl{enclosures}
\cc{other recipients}
\end{letter}
\end{document}
要将您的地址稍微向下移动,请将所需的移位添加到伪长度firstheadvpos
。
\documentclass[
SN,% lco file for swiss letters (SN 010 130))
refline=dateleft,
firstfoot=false,
enlargefirstpage,
backaddress=false,
foldmarks=false,
parskip=half-
]{scrlttr2}
\usepackage[english]{babel}
\setkomavar{fromname}{My Name}
\setkomavar{fromaddress}{My Street \\ My city}
\setkomavar{date}{The place where I am, \today}
\setkomavar{subject}{The title of the job \quad --\quad 100\%}
\setkomafont{title}{\bfseries\normalsize\raggedright}
\makeatletter
\@setplength{firstheadwidth}{\textwidth}
\@addtoplength{firstheadvpos}{.5cm}% <- shift the head with your address .5cm down
\makeatother
\renewcommand\raggedsignature{\raggedright}
\usepackage{blindtext}% dummy text
\begin{document}
\begin{letter}{Compagny\\Contact person\\Street\\City}
\opening{Dear Mr. Forexample,}
\blindtext
\blindtext
\closing{Best regards}
\encl{enclosures}
\cc{other recipients}
\end{letter}
\end{document}
如果您visualize.loc
在序言中加载,您可以显示某些字段的位置和大小:
\LoadLetterOption{visualize}
\showfields{head,foot,address,location,refline}
答案2
那么,您已经阅读过文档了吗chletter
(texdoc chletter
在您的控制台/终端上尝试)?
在第 25 页上,您将找到“5.5.1 信头布局”一章,其中包含您必须更改的定义。
\makeatletter
请运行以下 MWE(并检查和之间的附加代码\makeatother
(因为代码使用而需要@
)):
\documentclass[%
%leftwin % Adresse Empfänger links, sonst rechts
%,leftsig
%,foldmark
%,footfill
]{chletter}
\usepackage[english]{babel}
\makeatletter % <=====================================================
\if@leftwin
\def\titletopmatter%
{\splitfield
{}{\fromlocation\par\fromname\par\fromaddress\par\telephonenum}}
\def\titlemidmatter%
{\returnaddress\par\toname\par\toaddress}
\def\titlebotmatter%
{\splitfield
{\@date}{}} % <===== position of date in letter head!
\else
\def\titletopmatter%
{\splitfield
{\fromlocation\par\fromname\par\fromaddress\par\telephonenum}{}}
\def\titlemidmatter%
{\splitfield
{}{\returnaddress\par\toname\par\toaddress}}
\def\titlebotmatter%
{\splitfield
{\@date}{}}\fi % <===== position of date in letter head!
\makeatother % <=====================================================
\name{My Name}
\address{My Street \\ My city}
\date{The place where I am, \today}
\title{\textbf{The title of the job \quad --\quad 100\%}}
\begin{document}
\begin{letter}{Compagny\\Contact person\\Street\\City}
\object
\opening{Dear Mr. Forexample,}
My letter body.
\closing{Best regards}
%\encl{enclosures}
%\cc{other recipients}
\end{letter}
\end{document}
并查看结果:
答案3
我从来都不喜欢letter
类似 的类。它们往往在前言中指定大量可设置的内容,使得布局的细微调整变得非常困难(或者至少很麻烦)。
字母很容易设置在里面article
:
\documentclass{article}
\usepackage{lipsum,graphicx}
\usepackage[margin=1in]{geometry}
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}
\pagestyle{empty}% Remove any headers/footers
\begin{document}
\sffamily% Default font for this letter
\begin{tabular}{@{}l}
Jean Dupont \\
Chemin des Capucines 3 \\
1200 Gen\`eve
\end{tabular}
\hfill
\begin{tabular}{@{}p{.5\linewidth}@{}}
A l'attention de Madame Lara Meier \\
Chef du personnel \\
centrale \'electrique de Limmattal \\
Hagenholzstrasse 74 \\
8037 Limmattal
\end{tabular}
Gen\`eve, le 20 f\'evrier 2015
\bigskip
\textbf{Candidature pour le poste d'ing\'enieur au sein de votre d\'epartement WORLD}
\bigskip
Madame,
\lipsum[1-3]% Your letter content
Dans l'attente de vos nouvelles, je vous prie de recevoir, Madame, mes salutations les meilleures.
Jean Dupont
% http://tex.stackexchange.com/q/32911/5764
\includegraphics[height=3\baselineskip]{example-image}
Annexes: CV, dipl\^omes at certificats de travail
\end{document}