我怎样才能使这些图标具有相同的大小?
https://www.overleaf.com/latex/templates/twenty-seconds-curriculum-vitae/kfgsngtymkfj
添加圆形背景的代码如下。我可以修改它来获得我需要的效果吗?
\newcommand*\icon[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=1pt, fill=mainblue,mainblue,text=white] (char) {#1};}}
然后,带有图标的列表会打印在这里:
\renewcommand{\arraystretch}{1.6}
\begin{tabular}{p{0.5cm} @{\hskip 0.5cm}p{5cm}}
\ifthenelse{\equal{\givencvdate}{}}{}{\textsc{\Large\icon{\Info}} & \givencvdate\\}
\ifthenelse{\equal{\givencvaddress}{}}{}{\textsc{\Large\icon{\Letter}} & \givencvaddress\\}
\ifthenelse{\equal{\givennumberphone}{}}{}{\textsc{\Large\icon{\Telefon}} & \givennumberphone\\}
\ifthenelse{\equal{\givencvsite}{}}{}{\textsc{\Large\icon{\Mundus}} & \href{\givencvsite}{\textcolor{cerulean}\givencvsite}\\}
\ifthenelse{\equal{\givencvmail}{}}{}{\textsc{\large\icon{@}} & \href{mailto:\givencvmail}{\givencvmail}}
\end{tabular}
答案1
要修复此问题,您必须修改文件cls
。我实际上不知道它在您的上下文中是否正确,因为您没有提供显示设置的完整文档。
\icon
首先,将的定义改为
\newcommand*\icon[2][-1.3mm]{\tikz[baseline={(0,-1.5mm)}]{
\node[shape=circle,draw,inner sep=1pt, fill=mainblue,mainblue,text=white,minimum width=6.5mm] (char) {\makebox[0pt][c]{\raisebox{#1}[0pt][0pt]{#2}}};}}
修改6.5mm
蓝色圆盘的尺寸,并-1.5mm
让圆盘相对于线上下移动。
我在 中添加了一个可选参数\icon
,用于在光盘内垂直调整图标。我使用了两次,因此您还必须更改以下几行。
\ifthenelse{\equal{\givencvdate}{}}{}{\textsc{\Large\icon[-2mm]{\Info}} & \givencvdate\\}
\ifthenelse{\equal{\givencvaddress}{}}{}{\textsc{\Large\icon{\Letter}} & \givencvaddress\\}
\ifthenelse{\equal{\givennumberphone}{}}{}{\textsc{\Large\icon{\Telefon}} & \givennumberphone\\}
\ifthenelse{\equal{\givencvsite}{}}{}{\textsc{\Large\icon{\Mundus}} & \href{\givencvsite}{\textcolor{cerulean}\givencvsite}\\}
\ifthenelse{\equal{\givencvmail}{}}{}{\textsc{\large\icon[-1mm]{@}} & \href{mailto:\givencvmail}{\givencvmail}}
最后,您应该更改样式用于识别的字符串(文件的第一行cls
):
\ProvidesClass{twentysecondcv}[2021/08/02 CV class patched]
答案2
我找到了解决方法!“大”和“大”是不一样的!
我把所有内容都改为小写“l”,并将图标排列起来。
\ifthenelse{\equal{\givencvdate}{}}{}{\textsc{\Large\icon{\Info}}
到
\ifthenelse{\equal{\givencvdate}{}}{}{\textsc{\large\icon{\Info}}