简体   繁体   中英

LaTeX link error using href inside of tabular block

I have this LaTeX code:

\begin{tabular}[t]{@{}l} \small MY ADDRESS\\
\href{http://www.github.com}{github} \end{tabular}

Which is giving me this error and no other details...

Undefined control sequence.
<recently read> \href 

l.27 \href
         {http://www.github.com}{github} \end{tabular}

does anyone know why??

You need to load the hyperref package in order to use \\href{<url>}{<stuff>} :

在此处输入图片说明

\documentclass{article}

\usepackage{hyperref}

\begin{document}

\begin{tabular}[t]{@{}l}
  \small MY ADDRESS \\
  \href{http://www.github.com}{github}
\end{tabular}

\end{document}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM