CTAN Comprehensive TeX Archive Network

Verzeichnis macros/latex/contrib/code-link

README.md

code-link

made-with-latex LPPL 1.3c PR's Welcome

code-link links the code in your listings to the place where it is defined or documented. It works with xlistings, with listings, and with minted, and it needs none of them in particular. It is the companion of xlistings, a separate package. Its manual is code-link-doc. The benchmark of its cost is in bench/ of the repository.

\usepackage{listings}
\usepackage{hyperref}
\usepackage[underline]{code-link}

\CodeLinkAnchor[command]{mymacro}  % target + registration
\begin{lstlisting}
\mymacro{x}                        % becomes a link from the second run on
\end{lstlisting}

Originally, the functionality was tightly intertwined and written by Florian Sihler for the tikzpingus documentation, the extraction was assisted by Claude. l3build check runs the tests, the tests of the minted backend need -shell-escape and Pygments.

Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (256.1k).

Code link – Link code in listings to where it is defined

This package collects definitions while a document is typeset and links every occurrence of them in listings, xlistings and minted blocks. It works with any of these three and needs none of them in particular. It is the companion of the separate package xlistings.

PaketCode link
Hilfe
Fehlermeldungen
Repository
Version1.1.0 2026-11-11
LizenzenThe Project Public License 1.3c
Copyright2026 Florian Sihler
BetreuerFlorian Sihler
ThemenListings
Hypertext
...
Gästebuch Seiten-Struktur Impressum Autor kontaktieren