1

I want to access this site say, https://en.wikipedia.org/wiki/Cricket#History

Now I want the specific section 'History' to be shown as soon as I open the link

In overleaf I did this, \href{https://en.wikipedia.org/wiki/Cricket#History}{link} But it gives me this error -> llegal parameter number in definition of \Hy@tempa, and when I open the link after compiling even if it get an error I get this -> https://en.wikipedia.org/wiki/Cricket##History, 2 '#' and is wrong

How do I fix this?

Manas
  • 11
  • 2

1 Answers1

0

The \# escapes the hash symbol, ensuring that LaTeX interprets it as part of the URL rather than as a special character.

\documentclass{article}
\usepackage{hyperref}

\begin{document}

This is an example of how to link to a specific section in a Wikipedia article. Click on the following link to go to the 'History' section of the cricket page on Wikipedia: \href{https://en.wikipedia.org/wiki/Cricket#History}{Cricket History}.

\end{document}