AwesomeCV 範本:在 \cventry 中新增徽標

AwesomeCV 範本:在 \cventry 中新增徽標

我正在使用模板awesome-cvhttps://github.com/posquit0/Awesome-CV)並且我想在其行旁邊添加公司或學校的徽標。有人可以提示我該怎麼做嗎?

編輯:我設法按照我想要的方式將徽標放在側面,但我無法將其垂直居中:我該怎麼做?它是這樣的,程式碼如下:

\newcommand*{\cventrybis}[6]{%
\vspace{-2.0mm}
\setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt}

\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 16cm} R{16cm}}
\includegraphics[width=1.5cm]{#6} &
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 5.2cm} R{3cm}}
\ifempty{#2#3}
  {\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
  {\entrytitlestyle{#2} & \entrylocationstyle{#3} \\
  \entrypositionstyle{#1} & \entrydatestyle{#4} \\}
\multicolumn{2}{L{\textwidth}}{\descriptionstyle{#5}}
\end{tabular*}%
\end{tabular*}
 }

答案1

根據您的命令,\cventrybis我創建了一個新命令\mycventry以使徽標(圖像)以以下文字為中心。因為它是基於兩個,minipages所以不能跨兩頁!我在圖像和下面的文字之間添加了 0.2 公分的距離。我為圖像的寬度添加了一個新的長度:\photowidth。改成你需要的數值,我用的是1.5cm。

因此,請使用以下 MWE(請參閱標有 的重要程式碼變更<========

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Awesome Resume/CV
% XeLaTeX Template
% Version 1.1 (9/1/2016)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Claud D. Park ([email protected]) with modifications by 
% Vel ([email protected])
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
% Important note:
% This template must be compiled with XeLaTeX, the below lines will ensure this
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[11pt, a4paper]{awesome-cv} % A4 paper size by default, use 'letterpaper' for US letter
%\usepackage{multicol}
\geometry{left=2cm, top=1.5cm, right=2cm, bottom=2cm, footskip=.5cm} % Configure page margins with geometry
%\usepackage{pst-blur}
\usepackage{graphicx}
\fontdir[fonts/] % Specify the location of the included fonts
\usepackage[autostyle=true,german=quotes]{csquotes}
\usepackage{polyglossia}
\setdefaultlanguage[spelling=new]{german}

\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{multicol}
\usepackage{parallel}


% Color for highlights
\colorlet{awesome}{awesome-skyblue} % Default colors include: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange, awesome-nephritis, awesome-concrete, awesome-darknight
\colorlet{emphasis}{black}
\colorlet{body}{black!80!white}
%\definecolor{awesome}{HTML}{CA63A8} % Uncomment if you would like to specify your own color

% Colors for text - uncomment and modify
%\definecolor{darktext}{HTML}{414141}
%\definecolor{text}{HTML}{414141}
%\definecolor{graytext}{HTML}{414141}
%\definecolor{lighttext}{HTML}{414141}

\renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad} % If you would like to change the social information separator from a pipe (|) to something else

%----------------------------------------------------------------------------------------
%   PERSONAL INFORMATION
%   Comment any of the lines below if they are not required
%----------------------------------------------------------------------------------------

\name{James}{Bond}
\mobile{(+01) 234 56789}

\email{[email protected]}

\makecvfooter{\today}{James Bond~~~--~~~Curriculum Vitae}{\thepage}
%----------------------------------------------------------------------------------------

\newlength{\photowidth} % <=============================================
\setlength{\photowidth}{1.5cm}

\newcommand*{\mycventry}[6]{% <=========================================
\vspace{-2.0mm}
\setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt}

\begin{minipage}[c]{\photowidth} % <====================================
\includegraphics[width=\photowidth]{#6}
\end{minipage}
\hfil
\begin{minipage}[c][][t]{\textwidth -\photowidth - 0.2cm} % <===========
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 5.2cm} R{5.2cm}}
\ifempty{#2#3}
  {\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
  {\entrytitlestyle{#2} & \entrylocationstyle{#3} \\
  \entrypositionstyle{#1} & \entrydatestyle{#4} \\}
\multicolumn{2}{L{\textwidth}}{\descriptionstyle{#5}}
\end{tabular*}%
\end{minipage}
} % <===================================================================


\begin{document}

\makecvheader % Print the header

%----------------------------------------------------------------------------------------
%   CV/RESUME CONTENT
%   Each section is imported separately, open each file in turn to modify content
%----------------------------------------------------------------------------------------

%----------------------------------------------------------------------------------------
%   SECTION TITLE
%----------------------------------------------------------------------------------------

\cvsection{Education}

%----------------------------------------------------------------------------------------
%   SECTION CONTENT
%----------------------------------------------------------------------------------------

\begin{cventries}

%------------------------------------------------
\cventry
{Something} % Degree
{Highschool} % Institution
{Springfield} % Location
{2025} % Date(s)
{ % Description(s) bullet points
\begin{cvitems}
\item {Test, Test, Test}
\end{cvitems}
}

\mycventry
{Something} % Degree
{Highschool} % Institution
{Springfield} % Location
{2025} % Date(s)
{ % Description(s) bullet points
\begin{cvitems}
\item {Test, Test, Test}
\end{cvitems}
}
{example-image-a}

\mycventry
{Something else} % Degree
{University} % Institution
{Springfield} % Location
{2025} % Date(s)
{ % Description(s) bullet points
\begin{cvitems}
\item {Test, Test, Test}
\item {Test, Test, Test}
\item {Test, Test, Test}
\end{cvitems}
}
{example-image-b}

\mycventry
{Another one} % Degree
{College} % Institution
{Springfield} % Location
{2025} % Date(s)
{ % Description(s) bullet points
\begin{cvitems}
\item {Test, Test, Test}
\end{cvitems}
}
{example-image-a}

\cventry
{Something} % Degree
{Highschool} % Institution
{Springfield} % Location
{2025} % Date(s)
{ % Description(s) bullet points
\begin{cvitems}
\item {Test, Test, Test}
\end{cvitems}
}


%------------------------------------------------
\end{cventries}


%----------------------------------------------------------------------------------------
\end{document}

你得到了想要的結果:

期望的結果

相關內容