使用 \href 时,指向 Google 学术档案的超链接引用不起作用?

使用 \href 时,指向 Google 学术档案的超链接引用不起作用?

使用 \href 无法使指向 Google 学术档案的超链接引用起作用

\href{https://scholar.google.com/citations?user=qc6CJjYAAAAJ&hl}{Albert Einstein}

生成:

hl## 阿尔伯特·爱因斯坦

不是一个可点击的“阿尔伯特·爱因斯坦”,它导致https://scholar.google.com/citations?user=qc6CJjYAAAAJ&hl

请参阅下面更大的示例乳胶代码:

\documentclass[a4paper,12pt]{article}

\usepackage{url}
\usepackage{parskip}    
%other packages for formatting
\RequirePackage{color}
\RequirePackage{graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[scale=0.9]{geometry}

%tabularx environment
\usepackage{tabularx}

%for lists within experience section
\usepackage{enumitem}

% centered version of 'X' col. type
\newcolumntype{C}{>{\centering\arraybackslash}X} 

%to prevent spillover of tabular into next pages
\usepackage{supertabular}
\usepackage{tabularx}
\newlength{\fullcollw}
\setlength{\fullcollw}{0.47\textwidth}

%custom \section
\usepackage{titlesec}               
\usepackage{multicol}
\usepackage{multirow}

%CV Sections inspired by: 
%http://stefano.italians.nl/archives/26
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]
\titlespacing{\section}{0pt}{10pt}{10pt}


%Setup hyperref package, and colours for links
\usepackage[unicode, draft=false]{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour}

%for academic icons
\usepackage{academicons}

%for social icons
\usepackage{fontawesome5}



\begin{document}

% non-numbered pages
\pagestyle{empty} 




\begin{tabularx}{\linewidth}{@{} C @{}}
\Huge{Prof. Albert Einstein} \\[7.5pt]
\href{https://github.com/a-einstien}{\raisebox{-0.05\height}\faGithub\ a-einstein} \ $|$ \ 
\href{https://www.linkedin.com/in/albert-einstein-9b2753a3/}{\raisebox{-0.05\height}\faLinkedin\ Albert Einstein} \ $|$ \ 
\href{https://scholar.google.com/citations?user=qc6CJjYAAAAJ&hl}{\raisebox{-0.05\height}\aiGoogleScholar Albert Einstein} 
\end{tabularx}


\end{document}

答案1

你收到错误

! Forbidden control sequence found while scanning use of \href@split.
<inserted text> 
                \par 
l.63 \end{tabularx}

出现任何错误后,PDF 将无法使用。

在这里你可以简单地使用

https://scholar.google.com/citations?user=qc6CJjYAAAAJ

因为它链接到同一个页面,并避免&在你需要&在 URL 中,并且你处于tabularx无法\href确保&安全的上下文中的情况下,\&使用

\href{https://scholar.google.com/citations?user=qc6CJjYAAAAJ}{\raisebox{-0.05\height}\aiGoogleScholar Albert Einstein} 

或者

\href{https://scholar.google.com/citations?user=qc6CJjYAAAAJ\&hl}{\raisebox{-0.05\height}\aiGoogleScholar Albert Einstein} 

相关内容