2016-09-28 31 views
0

我正在尋找能夠告訴我如何在LaTeX中製作此字母模板的人,目前我使用的是單詞模板。我想知道可以在LaTeX中製作相同的模板。帶側邊欄的乳膠字母模板

背景信息:

兩種字體使用:Garamond字體和Arial 字體大小:12和16

必須支持表格,minipage和數字環境

Letter template written in MS-Word

+1

1)有關LaTeX的問題應該轉到專門的[TeX.SE](http://tex.stackexchange.com)網站。 2)當然可以製作這樣一個模板,但是你必須投入一些時間。你已經嘗試了什麼?你看過'letter'或'scrlttr2'類嗎? – hbaderts

+0

我的正常模板如下: –

+0

[我的正常模板預覽] [1] [1]:http://i.stack.imgur.com/xeWmL.png –

回答

0
My normal preamble is the following (which i have used a lot of time writing): 

\documentclass[10pt,a4paper]{extarticle} 

\usepackage{fontspec} 

\usepackage{titlesec} 

\usepackage{titling} 

\usepackage{listings} 

\usepackage{caption} 

%\usepackage[helvet]{sfmath} 

% commands from fontspec 

\defaultfontfeatures{Ligatures=TeX} 

\setmainfont[Scale=1.2]{Garamond} 

\newfontfamily\gmd{Garamond} 

\newfontfamily\DTL{DTL Argo} 

\newfontfamily\subsubsectionfont{Helvetica Neue} 

% 
\titleformat{\section}[hang]{}{\thesection}{1.8cm}{}[{\titlerule[0.4pt]}] 

\titleformat{\subsection}[hang]{}{\thesubsection}{1.6cm}{} 

\titleformat{\subsubsection}[hang]{\bfseries}{\thesubsubsection}{1.4cm}{} 

% commands from titlesec 

\newcommand*{\Stor}{\@setfontsize\Stor{30pt}{30pt}} 

\titleformat*{\section}{\gmd\fontsize{28pt}{30pt}\selectfont} 

\titleformat*{\subsection}{\gmd\fontsize{18pt}{18pt}\selectfont} 

\titleformat*{\subsubsection}{\bfseries\fontsize{14pt}{14pt}\subsubsectionfont} 

% Document properties 

\usepackage[utf8]{inputenc} 

\usepackage[pdftex]{geometry} 

\geometry{margin=1.3in} 

\geometry{top=1.4in} 

\geometry{bottom=1.4in} 

\usepackage{fancyhdr} 

\pagestyle{fancy} 

\setcounter{secnumdepth}{3} 

\setcounter{tocdepth}{2} 

\usepackage{float} 

\usepackage{newfloat} 

\usepackage{amsmath, amssymb} 

\usepackage{fixltx2e} 

\usepackage[hang,nooneline]{subfigure} 

\usepackage[danish]{babel} 

\usepackage{multirow} 

\setlength{\parindent}{0em} 

\usepackage{color} 

\usepackage{natbib} 

\usepackage{arydshln} 

\makeatletter 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. 

\usepackage{graphicx} 

\usepackage{lastpage} 

\usepackage{enumitem} 

\usepackage{etoolbox} 

\usepackage{caption} 

\usepackage{xcolor} 

\usepackage{xcolor,colortbl} 

\usepackage{adjustbox} 

\usepackage{mdframed} 

% Footnote font 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\makeatletter 

\newfontfamily\gmd{Garamond} 
%\patchcmd{\@footnotetext}{\footnotesize}{\normalsize\gmd}{}{} 
\let\footnotesize\small 

\makeatother 

\usepackage[hang]{footmisc} 

\setlength\footnotemargin{7.05pt} 

\renewcommand{\footnoterule}{% 
    \kern 3pt 
    \hrule width \textwidth height 0.4pt 
    \kern 2.6pt 
} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands. 
%\numberwithin{figure}{section} 
%\numberwithin{table}{section} 
%\numberwithin{program}{section} 
%\numberwithin{boks}{section} 
%\numberwithin{equation}{section} 

% Colors and lines 

%\definecolor{fm}{RGB}{248,244,230} 
\definecolor{fm}{RGB}{248,247,217} 
\definecolor{borsen}{RGB}{254,232,215} 
\definecolor{dblue}{RGB}{4,19,73} 
%\definecolor{Grå}{RGB}{128,128,128} 
\definecolor{Grå}{RGB}{217,217,217} 
\newcommand{\gline}{\arrayrulecolor{Grå}\hline} 
\newcommand{\HRule}{\rule{\linewidth}{0.25mm}} 
\newcommand{\HHRule}{\rule{\linewidth}{1.5mm}} 

\newcommand{\tabitem}{\par\hspace*{\labelsep}\textbullet\hspace*{\labelsep}} 

\arrayrulecolor{Grå} 

\DeclareCaptionFont{dblue}{\color{dblue}} 
\DeclareCaptionFont{black}{\color{black}} 

% commands from caption 
\usepackage[document]{ragged2e} 

\usepackage[width={\textwidth}, margin=11pt , aboveskip=20pt, belowskip=6pt, font=footnotesize, labelfont={bf,dblue}, textfont={bf,black}, tableposition=top, figureposition=top,justification=RaggedRight,singlelinecheck=false, labelsep={newline}]{caption}% 

\newfontfamily\tablefont[Numbers={Monospaced,Lining}]{Arial} 
\AtBeginEnvironment{table}{\setmainfont[Color=black, Numbers={Proportional,OldStyle}]{Arial}} 
\AtBeginEnvironment{figure}{\setmainfont[Color=black, Numbers={Proportional,OldStyle}]{Arial}} 
\AtBeginEnvironment{boks}{\setmainfont[Color=black, Numbers={Proportional,OldStyle}]{Arial}} 

%%%%%%%%%%%%%%%%%% Liste %%%%%%%%%%%%%%%%%% 

\setlist[description]{ 
    style=multiline, 
    font=\normalfont\gmd, % set the label font 
    align=parleft, 
    topsep=5pt, 
    labelwidth={0.06\textwidth}, 
    leftmargin=!, 
    parsep=0pt, 
    before=\gmd 
} 

%%%%%%%%%%%%%%%%%%%%CEPOS Figure%%%%%%%%%%%%%% 

\usepackage{url} 

\usepackage{threeparttable} 
\usepackage{tabularx,booktabs} 
\usepackage{tabulary} 
\belowrulesep=0pt 
\aboverulesep=0pt 

\renewcommand{\arraystretch}{1.4} 

%%%%%%%%%%%%%%%%%%%% Finansministeriets figur %%%%%%%%%%%%%%%%% 
\newenvironment{fmfigur}[4]{ 
\begin{figure}[htbp!] 
\centering 
\begin{adjustbox}{minipage=\textwidth,bgcolor=fm} 
\rule{\textwidth}{0.4pt} 
\begin{tabular}{@{\extracolsep{\fill}} @{}[email protected]{}} 
\begin{minipage}[t]{\textwidth} 
\captionof{figure}{#1}\label{#2} 
\end{minipage} 
\\ 
\begin{minipage}[t]{\textwidth} 
    \centering 
    \includegraphics[width=0.9\textwidth]{bil/#2.pdf} 
\end{minipage} 
\end{tabular} 
    \rule{\textwidth}{0.4pt} 
    \end{adjustbox}  \vspace{-0.5em} 
\begin{center} 
\begin{adjustbox}{minipage=0.95\textwidth} 
    {\gmd\small 
    \begin{description} 
    \item[{\ Anm.}:]#3 
    \item[{\ Kilde}:]#4 
    \end{description}} 
\end{adjustbox} \vspace{-1.75em} 
\end{center} 
\end{figure} 
} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

%%%%%%%%%%%%% Finansministeriets Side by Side figurer %%%%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\FMADAM}[6]{ 
\begin{table}[htpb!] 
\begin{adjustbox}{minipage=\textwidth,bgcolor=fm} 
\rule{\textwidth}{0.4pt}\vspace{-1pt} \arrayrulecolor{black} 
\begin{tabular}{@{\extracolsep{\fill}} @{}[email protected]{} | @{}[email protected]{} } 
\begin{minipage}[t]{0.5\textwidth} 
\captionof{figure}{#1}\label{#2} 
\end{minipage} 
& 
\begin{minipage}[t]{0.5\textwidth} 
\captionof{figure}{#3}\label{#4} 
\end{minipage}  
\\ 
\begin{minipage}[t]{0.5\textwidth} 
\centering 
\includegraphics[width=0.9\linewidth,keepaspectratio=true]{bil/#2.pdf} 
\end{minipage} 
& 
\begin{minipage}[t]{0.5\textwidth} 
\centering 
\includegraphics[width=0.9\linewidth,keepaspectratio=true]{bil/#4.pdf} 
\end{minipage} 
\vspace{-1pt} 
\end{tabular} 
\rule{\textwidth}{0.4pt} 
\end{adjustbox}  \vspace{-0.5em} 
\begin{center} 
\begin{adjustbox}{minipage=0.95\textwidth} 
    {\gmd\small 
    \begin{description} 
    \item[{\ Anm.}:]#5 
    \item[{\ Kilde}:]#6 
    \end{description}} 
\end{adjustbox} \vspace{-1.75em} 
\end{center} 
\end{table} 
} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\DeclareFloatingEnvironment[ 
    fileext=lop, 
    name=Program 
]{program} 
% announce the float to subcaption and create the subprogram environment 
\DeclareCaptionSubType{program} 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\makeatletter 
\makeatother 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\DeclareFloatingEnvironment[ 
    fileext=lop, 
    name=Boks 
]{boks} 
% announce the float to subcaption and create the subprogram environment 
\DeclareCaptionSubType{boks} 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\makeatletter 
\makeatother 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%FMTable%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\fmboks}[5]{ 
\begin{boks}[htbp!] 
\begin{adjustbox}{minipage=\textwidth,bgcolor=fm} 
\rule{\textwidth}{0.4pt} 
\begin{minipage}[t]{\textwidth} 
\caption{#1}\label{boks:#2} 
\end{minipage} 
    \fontsize{8pt}{9pt}\selectfont\centering 
\begin{tabulary}{0.95\textwidth}{@{\extracolsep{\fill}}@{}[email protected]{}} 
\onehalfspacing \fontsize{8pt}{9pt}\selectfont 
    #3 
\end{tabulary} 
\rule{\textwidth}{0.4pt} 
\end{adjustbox}  \vspace{-0.5em} 
\begin{center} 
\begin{adjustbox}{minipage=0.95\textwidth} 
    {\gmd\small 
    \begin{description} 
    \item[{\ Anm.}:]#4 
    \item[{\ Kilde}:]#5 
    \end{description}} 
\end{adjustbox} \vspace{-1.75em} 
\end{center} 
\end{boks} 
} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%FMTable%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\fmtable}[5]{ 
\begin{table}[htbp!] 
\begin{adjustbox}{minipage=\textwidth,bgcolor=fm} 
\rule{\textwidth}{0.4pt} 
\begin{minipage}[t]{\textwidth} 
\caption{#1}\label{tab:#2} 
\end{minipage} 
\begin{center} 
\begingroup 
    \fontsize{8pt}{9pt}\selectfont\arrayrulecolor{Grå} 
#3 
\endgroup 
\end{center} 
\rule{\textwidth}{0.4pt} 
\end{adjustbox}  \vspace{-0.5em} 
\begin{center} 
\begin{adjustbox}{minipage=0.95\textwidth} 
    {\gmd\small 
    \begin{description} 
    \item[{\ Anm.}:]#4 
    \item[{\ Kilde}:]#5 
    \end{description}} 
\end{adjustbox} \vspace{-1.75em} 
\end{center} 
\end{table} 
} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\makeindex 
\patchcmd{\footrule}{\hrule}{\color{dblue}\hrule}{}{} 
\patchcmd{\headrule}{\hrule}{\color{dblue}\hrule}{}{} 
\renewcommand{\footrulewidth}{0pt} 
\renewcommand{\headrulewidth}{0pt} 
\makeindex 

\DeclareMathOperator{\dlog}{dlog\!} 
\DeclareMathOperator{\dd}{d\!} 
\newcommand{\gmdit}[1]{\textit{\gmd #1}} 
\newcommand{\abs}[1]{\lvert #1 \rvert}         
\newcommand{\lrarrow}{\Leftrightarrow}    
\newcommand{\degree}{\text{\textdegree}}    
\newcommand{\rarrow}{\Rightarrow}     
\newcommand{\larrow}{\Leftarrow}      
\newcommand{\udarrow}{\Updownarrow}     
\newcommand{\bsm}{\left[ \begin{smallmatrix}} 
\newcommand{\esm}{\end{smallmatrix} \right]}   
\newcommand{\shiftline}{\newline \newline}   
\newcommand{\PD}{\partial}    
\newcommand{\grad}{\nabla} 
\newcommand{\lb}{\left(}       
\newcommand{\rb}{\right)}      
\newcommand{\ohm}{\Omega} 
\newcommand{\Sun}{\ensuremath{\odot}}   
\newcommand{\g}{\cdot}      
\newcommand{\limit}{\lim_{n \rightarrow \infty}} 
\newcommand{\N}{\mathbb{N}} 
\newcommand{\R}{\mathbb{R}} 
\newcommand{\mat}[1]{ 
\begin{align*} 
\centering 
#1 
\end{align*}} 
\newcommand{\matnr}[1]{ 
\begin{align} 
\centering 
#1 
\end{align}} 

\usepackage{setspace} 

\renewcommand{\baselinestretch}{1.4} 

\fancyhead[R]{{Ivan Erik Kragh}\\{(+45) 60 68 13 05}} % predefined() 
\fancyhead[L]{Opdatering: Ulighed og Working Poor (juli, 2016)} % 1. sectionname 

\lfoot{\small } 
\chead{\ } 
%\rhead{\small Ivan Erik Kragh\\(+45) 60 68 13 05} 
\cfoot{Side \thepage\ af \pageref{LastPage}} 
\rfoot{[email protected]} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
0
\textwidth=12in 
    \begin{document} 
    \begin{tabular}{p{6cm}p{4cm}p{6cm}} 
     Navin & &28 September\\ 
     Firma & &2016 
     \end{tabular} 

    \textwidth=8in 
    {\bf Kaer Navin}\\ 
    \small 
    \vspace{2cm} 

%你可以在這裏ter您的段落 這是我輸入以查看測試頁時所得到的結果。那 一定是瘋了。

\vspace{3cm} 

    Med\\ 

    \line(1,0) {100}\\ 

    Tl: 123 456 

    \vfill 


    \hspace{2cm}Kevin etc. 

    \end{document} 

%我認爲這種格式對您有用。