这是修复 LinkedIN (国际配置文件) 的“moderncv”的“\social”命令
有没有办法在求职信的发件人地址处显示带有符号的 LinkedIn 链接?也许可以重新定义 \makelettertitle?我相信应该可以通过添加类似
\ifthenelse{\isundefined{\@linkedin}}{}{\makenewline\linkedinsocialsymbol\httplink{\@linkedin}}%
或者
\def\socialsdetails{}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
在 \makelettertitle-Definition 中。但是使用 moderncv.cls 中的 socials-collection 我无法让它工作。此外,是否有可能在 moderncv 文档中的任何选定点插入带有符号的 LinkedIn 链接?
来自 moderncvstyleclassic.sty:
\renewcommand*{\makelettertitle}{% % recompute lengths (in case we are switching from letter to resume, or vice versa) \recomputeletterlengths% % sender contact info \hfill% \begin{minipage}{.5\textwidth}%
\raggedleft%
\addressfont\textcolor{color2}{%
{\bfseries\upshape\@firstname~\@lastname}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
\end{minipage}\\[1em] % recipient block \begin{minipage}[t]{.5\textwidth}
\raggedright%
\addressfont%
{\bfseries\upshape\@recipientname}\\%
\@recipientaddress% \end{minipage} % date \hfill% US style % \\[1em]% UK style \@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900" % opening \raggedright% \@opening\\[1.5em]% % ensure no extra spacing after \makelettertitle due to a possible blank line % \ignorespacesafterend% not working \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
来自moderncv.cls:
\collectionnew{socials}
\NewDocumentCommand{\social}{O{}O{}m}{%
\ifthenelse{\equal{#2}{}}%
{%
\ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httplink[#3]{www.linkedin.com/in/#3}}}{}%
\ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httplink[#3]{www.twitter.com/#3}}} {}%
\ifthenelse{\equal{#1}{github}} {\collectionadd[github]{socials} {\protect\httplink[#3]{www.github.com/#3}}} {}%
}
{\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}}
答案1
我想我自己通过添加解决了这个问题
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}%
到 moderncvstyleclassic.sty 中的 \makelettertitle 定义。可以在文档中的任何位置使用相同的(不带 \makenewline):
\collectionloop{socials}{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}