scrlttr2 与我的简历相同的头像

scrlttr2 与我的简历相同的头像

最近我刚刚为我的信件找到了 scrlttr2 类,因为它具有SN在不到 5-10 秒的时间内获取我所需的一切的选项。但如果我想用它来制作我的简历封面信,我需要一个特定的选项,以便能够为我的标题绘制彩色背景。

事实是我玩的是海盗工程师模板(https://www.overleaf.com/latex/templates/pirate-engineer-template/sqfvydxkztqj),获得一份像样的简历,我想找到一种方法,使这封信保持专业性,并带有一点我的个人风格。

from *那么,如何使用已经存在的宏/变量绘制相同类型的彩色条纹和白色文本?

我尝试添加 TikZ 包并绘制一些表格或 parbox,但它只是在第二页上移动我的字母,而第一页得到一个移动(和firstheadvposfirstheadhpos的彩色填充矩形,似乎在标题的位置,可能超出右边距(正如我minimum width=\paperwidth在 TikZ 设置中使用的那样)。

梅威瑟:

%\LoadLetterOption{SN} %% Lettere in stile svizzero
\usepackage{mwe}
\usepackage{geometry}

\usepackage[italian]{babel}
\usepackage{hyperref}

\usepackage{xcolor}
\definecolor{Green4}{HTML}{059108}

\usepackage{calc}

%% advanced drawing
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{smartdiagram}
\usepackage{float}
\usepackage{array}
\usetikzlibrary{decorations.text}
\usetikzlibrary{fadings}
\usetikzlibrary{calc}
\usetikzlibrary{shapes.misc,positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{backgrounds} 
\usetikzlibrary{shadings}
\usetikzlibrary{calendar} 
\usetikzlibrary{er}
\usetikzlibrary{patterns}
\usetikzlibrary{shapes} 
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{decorations}
\usetikzlibrary{topaths}

\renewcommand{\familydefault}{\sfdefault}

\date{\today}

\KOMAoptions{
    paper=a4,
    fromemail=true,
    foldmarks=true,
    fromphone=true,
    firsthead=true,
%   backaddress=false,
}

%% Opzioni personali
\setkomavar{fromname}{First LAST}
\setkomavar{fromaddress}{my Street\\ZIP myCity}
\setkomavar{fromemail}[]{\href{mailto:[email protected]}{[email protected]}}
\setkomavar{fromphone}[]{+41 (0)7x abc de fg}
\setkomavar{place}{myLivingRoom}
\setkomavar{signature}{f. LAST}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%
%%%%    Oggetto della missiva
%%%%
\setkomavar{subject}{Job something}
%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \firsthead{
        \tikz{%
            \node[rectangle, fill=Green4, anchor=north, minimum width=\paperwidth, minimum height=3.5cm](header) at (current page.north){};%
            \node[draw=none, align=left](name) at (header) {%
                {\color{white}\usekomavar{fromname}\\ \usekomavar{fromaddress}}% 
                    };%
            \node[draw=none, align=right](contacts) at (header) {\color{red}\usekomavar{fromphone}\\ \usekomavar{fromemail}};% 
        }\vspace{-7mm}%
    }
    
\begin{document}
    % If you want headings on subsequent pages,
    % remove the ``%'' on the next line:
    % \pagestyle{headings}
    

    \begin{letter}{\textbf{COmpany Hiring}\\companyStreet\\ZipCode Town}
        
        \opening{Dear Madam, Dear Sir,}
        
        
        
        \closing{Best Regards,}
        
        %enclosure listing
        \vfill
        \encl{CV}
        
    \end{letter}
\end{document}

输出: 在此处输入图片描述 期望输出: 在此处输入图片描述

答案1

您必须为命令(或环境)添加remember picture选项,并且必须使用锚点作为节点。overlay\tikztikzpicture

\documentclass{scrlttr2}
%\LoadLetterOption{SN} %% Lettere in stile svizzero

\usepackage[T1]{fontenc}% <- added
\usepackage{tikz}% loads package xcolor
\usepackage{hyperref}

\definecolor{Green4}{HTML}{059108}

\renewcommand{\familydefault}{\sfdefault}

\setkomavar{date}{\today}% <- changed!

\KOMAoptions{
    %paper=a4,% default
    fromemail=true,
    foldmarks=true,
    fromphone=true,
    firsthead=true,
%   backaddress=false,
}

%% Opzioni personali
\setkomavar{fromname}{First LAST}
\setkomavar{fromaddress}{my Street\\ZIP myCity}
\setkomavar{fromemail}[]{\href{mailto:[email protected]}{[email protected]}}
\setkomavar{fromphone}[]{+41 (0)7x abc de fg}
\setkomavar{place}{myLivingRoom}
\setkomavar{signature}{f. LAST}

\setkomavar{subject}{Job something}

\setkomavar{firsthead}{% <- changed!
  \tikz[remember picture,overlay,inner sep=1em,text=white]{
    \node[outer sep=0pt,fill=Green4, anchor=north, minimum width=\paperwidth, minimum height=3.5cm]
      (header) at (current page.north) {};%
    \node[anchor=north west,align=left](name) at (header.north west) 
      {\usekomavar{fromname}\\ \usekomavar{fromaddress}};%
    \node[anchor=north east,align=left](contacts) at (header.north east)
      {\usekomavar{fromphone}\\ \usekomavar{fromemail}};% 
  }%
}

\begin{document}
\begin{letter}{\textbf{COmpany Hiring}\\companyStreet\\ZipCode Town}
  \opening{Dear Madam, Dear Sir,}
  \closing{Best Regards,}
  \vfill
  \encl{CV}
\end{letter}
\end{document}

在此处输入图片描述

请注意,我已经使用了\setkomavar{date}{...}\setkomavar{firsthead}{...}

相关内容