格式化求职信 - 带有徽标的页脚

格式化求职信 - 带有徽标的页脚

我很难定位和对齐字母页脚的徽标。附件是页脚 ID 的类型,可能以前用过标尺。1我正在使用带有类文件的模板。

%
% brownletter.cls -- a document class for writing letters with Brown letterhead 
%
% Copyright 2003, Nesime Tatbul ([email protected])
%
% Notes:
%
% 1. This class can be used for creating letters with Brown logo at the
%    header and CS department address at the footer (as in standard Brown
%    letterhead stationery).
% 2. It is based on the standard Latex document class, letter.cls.
% 3. Required packages are epsfig and ifthen.
% 4. If Brown logo is to be included in the head, then the file
%    brownlogo.eps must be provided. Otherwise, the logo is omitted.
% 5. For example usage, please see brownletter_example.tex
% 
% Please contact [email protected] to report any problems or bugs.
%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{brownletter}
\RequirePackage{graphicx}
\RequirePackage{epstopdf}
\RequirePackage{epsfig}
\RequirePackage{ifthen}
\DeclareGraphicsExtensions{.png}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
\ProcessOptions
\LoadClass[letterpaper]{letter} % we always use letter paper

\newcommand{\subjectname}{Subject}
\newcommand{\@subject}{}
\newcommand{\subject}[1]{\renewcommand{\@subject}{\subjectname: #1}}

\newboolean{logofound}
\IfFileExists{logo.png}
    {\setboolean{logofound}{true}}
    {\setboolean{logofound}{false}}

\setlength{\textwidth}{6.875in}
\setlength{\textheight}{7.0in}
\setlength{\topskip}{0.0in}
\setlength{\footskip}{1.0in}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\evensidemargin}{-0.25in}
\setlength{\topmargin}{-0.875in}

\DeclareFixedFont{\xcmrbn}{OT1}{cmr}{b}{n}{10}
\DeclareFixedFont{\xcmrmn}{OT1}{cmr}{m}{n}{10}
\DeclareFixedFont{\ixcmrmn}{OT1}{cmr}{m}{n}{10}

\newsavebox{\departmenthead}
\newsavebox{\departmentfoot}
\newsavebox{\emptyfoot}

\sbox{\departmenthead}{
    \begin{tabular*}{\textwidth}
                    {@{}l@{\extracolsep{0.0in}}|@{\extracolsep{0.125in}}l@{}}
    \parbox{4.625in}{\raggedright
        \ifthenelse{\boolean{logofound}}
           {\epsfig{file=logo.png, height=1.75in, width=2in}}
           {\parbox[t][1.2in][t]{2.0in}{\hfill} 
            \ClassWarning{brownletter}{logo.png COULD NOT BE FOUND!}}
    } &
    \parbox[t][1.0in]{2.125in}{{\xcmrbn Department of Engineering}\\
                               {\ixcmrmn http://www.xxx.fr}}\\
    \end{tabular*}
}


\savebox{\departmentfoot}[\textwidth][t]{\ixcmrmn 
    Dr xxxx xxxxxx
    Associate Professor in xx xx - University xx and xx xxxxx
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Telxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    email: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    [email protected]
}


% header and footer should be placed only on the first page
\renewcommand{\ps@firstpage}{

    \setlength{\headheight}{1.375in}
    \setlength{\headsep}{1.0in}
    \renewcommand{\@oddhead}{\usebox{\departmenthead}}
    \renewcommand{\@oddfoot}{\usebox{\departmentfoot}}
    \renewcommand{\@evenhead}{}
    \renewcommand{\@evenfoot}{}
}

\renewcommand{\ps@empty}{
    \setlength{\headheight}{1.375in}
    \setlength{\headsep}{0.5in}
    \renewcommand{\@oddhead}{}
    \renewcommand{\@oddfoot}{\usebox{\emptyfoot}}
    \renewcommand{\@evenhead}{}
    \renewcommand{\@evenfoot}{\usebox{\emptyfoot}}
}

\providecommand{\@evenhead}{}
\providecommand{\@oddhead}{}
\providecommand{\@evenfoot}{}
\providecommand{\@oddfoot}{}

\pagestyle{empty}

% we add the subject command to the opening
\renewcommand{\opening}[1]{\thispagestyle{firstpage}%
    \ifx\@empty\fromaddress
        {\raggedleft\@date\par}%
    \else  % home address
        {\raggedleft
            \begin{tabular}{l@{}}\ignorespaces
            \fromaddress \\ *[1\parskip]%
            \@date 
            \end{tabular}\par
        }%
     \fi
     \vspace{1\parskip}%
     {\raggedright \toname \\ \toaddress \par}%
     \vspace{1\parskip}%
     \ifthenelse{\equal{\@subject}{}}{}{\@subject\par}
     \vspace{1\parskip}%
     #1\par\nobreak
}

% we push closing to the right
\renewcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
    \stopbreaks
    \noindent
    \hspace*{0.6\textwidth}\parbox{0.4\textwidth}{\raggedright
    \ignorespaces #1\\[4\medskipamount]%
    \ifx\@empty\fromsig
        \fromname
    \else \fromsig 
    \fi\strut}%
    \par
}` 

它可以工作,但我想添加我在图像中显示的页脚。这是使用上面的类文件的主要代码。

%
% brownletter_example.tex - an example latex file to illustrate brownletter.cls
%
% Copyright 2003, Nesime Tatbul ([email protected])
%

\documentclass[11pt]{brownletter}

% Paquets généraux
\usepackage[utf8]{inputenc}     % Codage du fichier TeX
\usepackage[T1]{fontenc}        % Codage du fichier PDF (les paquets cm-super ou lmodern doivent être installés pour obtenir un bon résultat)
\usepackage{graphicx}           % Logos et autres illustrations
\usepackage{fancyhdr}           % En-têtes et pieds de page
\usepackage{color}              % Couleur
\usepackage{ifthen}             % Condition
\usepackage{helvet}             % Police Helvetica
%\usepackage[french]{babel}      % Courrier en français
\usepackage[english]{babel}   % Courrier en anglais


\name{xxxxx xxxx} % used as signature, if no signature is specified

\signature{xxx xxx, PhD}

\date{June 30, 2016} % if no date specified, today's date is used 

\subject{xxx xxxx} % optional subject line




\begin{document}

\begin{letter}{Prof. Eli Upfal\\ 
               Brown University\\ 
               Box 1910\\ 
               Providence, RI 02912}

\opening{Dear Sir,}

We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.

We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the Latex letter document class file with Brown letterhead.



\closing{Sincerely,}

%\encl{brownletter.cls}

%\ps{Please see the enclosed file.}

%\cc{J. Kirschenbaum}

\end{letter}

\end{document}

所以我的想法是在信的底部添加我的所有联系方式和我的标志,并像图片中那样正确对齐。到目前为止,我排了很长的队,无法设计一个合适的盒子。谢谢

答案1

您正在尝试使用布朗大学计算机科学信头。我们先看看它是什么样子的,通过编译示例.tex文件(使用原始brownletter班级标识):

在此处输入图片描述

由于班级是具体的到布朗大学,因此在类文件中硬编码了许多字母元素(除了直接编辑之外,很难用自己的内容来规避.cls),让我们使用重新创建粗略的布局article并添加页脚:

在此处输入图片描述

\documentclass[11pt]{article}

\usepackage{geometry,tabularx,fancyhdr}
\usepackage[export]{adjustbox}
\geometry{
  paper = letterpaper,
  margin = 0.7in,
  includefoot,
  footskip = 41pt
}

\setlength{\parindent}{0pt}% Remove paragraph indentation
\setlength{\parskip}{0.7\baselineskip plus .1\baselineskip minus .1\baselineskip}

\fancypagestyle{firstpage}{
  \fancyhf{}% Clear header/footer
  \renewcommand{\headrulewidth}{0pt}% Remove header rule
  \renewcommand{\footrulewidth}{.4pt}% Insert footer rule
  \fancyfoot[L]{%
    \resizebox{!}{3\baselineskip}{\begin{tabular}[b]{@{} l @{}}
      Dr xxxx \textbf{xxxxxx} \\
      Associate Professor in xx xx - University xx and xx xxxxx \\
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \\
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \\
      Tel: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \\
      email: [email protected]
    \end{tabular}}%
  }
  \fancyfoot[R]{%
  \includegraphics[height=3\baselineskip]{example-image-9x16}%
  }
}

\pagestyle{plain}

\begin{document}

\thispagestyle{firstpage}

% First page letterhead
\begin{tabularx}{\textwidth}{ @{} X | @{\hspace{0.125in}} p{2.5in} @{} }
  \smash{\includegraphics[height=1in, width=2in, valign=T]{brownlogo}} & \\[2\normalbaselineskip]
    & \small\bfseries Department of Computer Science \\
    & \footnotesize http://www.cs.brown.edu/
    \\[.7in]
\end{tabularx}%

\vspace{2\bigskipamount}

\hfill
December 15, 2003

\bigskip
\begin{tabular}{@{} l @{}}
  Prof.\ Eli Upfal \\
  Brown University \\
  Box 1910 \\
  Providence, RI 02912
\end{tabular}

\medskip

Subject: Brown letterhead

\medskip

Dear Sir,

We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.

We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.
We are most pleased to deliver this sample letter which uses
the LaTeX letter document class file with Brown letterhead.

\medskip

\hfill
\begin{tabular}{@{} p{.4\linewidth} @{}}
  Sincerely, \\[4\medskipamount]
  Random Randofsky \\
  Randomiser
\end{tabular}

\medskip

encl: \texttt{brownletter.cls}

\medskip

Please see the enclosed file.

\medskip

cc: R.\ Randofsky II

\end{document}

目前页脚仅设置在第一页。但是,这可能会影响整个文档的布局。我的建议是在整个信件中设置相同的页脚,就像信头一样(如果您有多个页面)。

相关内容