與圖並排顯示文字鏈接

與圖並排顯示文字鏈接

我想將連結文字(例如,googlescholar/user.com)顯示為超鏈接,並與圖示(圖)並排。我使用了下面的方法,但它只顯示一個圖形或文字。我可以修改此方法以包含兩者嗎,或者是否有更好的方法?

\documentclass{article}
\usepackage{hyperref,graphicx}
\begin{document}

\href{http://www.googlescholar.com}{\includegraphics[width=5cm] 
{googlescholar}}
\end{document}

@John Kormylo 建議的解決方案給了這個結果。我需要將文字放在圖示的右側。

在此輸入影像描述

答案1

我不確定你想達到什麼目的。

\documentclass{article}
\usepackage[export]{adjustbox}% for valign
\usepackage{hyperref,graphicx}
\begin{document}
\advance\parskip by \baselineskip

\href{http://www.googlescholar.com}{\includegraphics[height=\baselineskip, valign=t] 
{example-image}} \url{http://www.googlescholar.com}% two separate links

\href{http://www.googlescholar.com}{\includegraphics[height=\baselineskip, valign=t] 
{example-image} \nolinkurl{http://www.googlescholar.com}}% single link

\includegraphics[height=\baselineskip, valign=t]{example-image} \url{http://www.googlescholar.com}% icon not linked

\href{http://www.googlescholar.com}{\includegraphics[height=\baselineskip, valign=t] 
{example-image}} \nolinkurl{http://www.googlescholar.com}% url not linked
\end{document}

相關內容