![与图片并排显示文本链接](https://linux22.com/image/475881/%E4%B8%8E%E5%9B%BE%E7%89%87%E5%B9%B6%E6%8E%92%E6%98%BE%E7%A4%BA%E6%96%87%E6%9C%AC%E9%93%BE%E6%8E%A5.png)
我想将链接文本(例如 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}