Is it possible to create "automatic hyperlinks" in the sense that each time I write some word (or set of words) an hyperlink is automatically created? For example I would like that each time I write Schrödinger I have an hyperlink to https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger and the text says Schrödinger. The same as in Wikipedia where you have some words (or sets of words) with hyperlinks.
Asked
Active
Viewed 203 times
4
1 Answers
1
Run with xelatex or Lualatex
\documentclass{article}
\usepackage{hyperref}
\usepackage{xspace}
\def\Schrödinger{\href{https://en.wikipedia.org/wiki/Erwin_Schrödinger}{Schrödinger}\xspace}
\begin{document}
What \Schrödinger wrote, is important for physics.
\end{document}
-
You could mention that the code you posted works with pdflatex or latex as well as long as you call the macro
\Schrodinger(or\Schroedingeror\cator whatever) – David Carlisle Aug 25 '18 at 16:04 -
sure ... but I used
\Schrödinger:-) and the other ways were already mentioned in your comment – Aug 25 '18 at 17:30

\schrodingerand define that to be\href{Schrödinger}{https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger }or whatever. – David Carlisle Aug 25 '18 at 15:17