Skip to main content
Share Your Experience: Take the 2024 Developer Survey
1 of 2
Marijn
  • 38.3k
  • 3
  • 33
  • 79

You can create a new command to add the link around the argument. In the MWE below I did not replace the spaces by underscores. Officially a space is not allowed in a URL, but most likely your pdf viewer and/or browser will automatically convert the spaces to the url encoding %20. Wikipedia then replaces %20 with _.

MWE:

\documentclass{article}
\usepackage{hyperref}
\newcommand{\wikititle}[1]{\href{https://en.wikipedia.org/wiki/#1}{#1}}
\begin{document}
\subsection{\wikititle{Row and column vectors}}
\end{document}

Result:

enter image description here

Marijn
  • 38.3k
  • 3
  • 33
  • 79