Fixing broken texdoc.net links

0

Please login or register to vote for this query.

(click on this box to dismiss)

TeX - LaTeX

Q&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems

CREATE TABLE #links (Link NVARCHAR(MAX));

INSERT INTO #links VALUES
('http://texdoc.net/texmf-dist/doc/generic/knuth/tex/tex.pdf'),
('http://texdoc.net/texmf-dist/doc/latex/listings/listings.pdf'),
('http://texdoc.net/texmf-dist/doc/fonts/amsfonts/amsfndoc.pdf');

SELECT Link AS 'Original',
  'https://texdoc.net/pkg/' + REVERSE(SUBSTRING(REVERSE(Link), 1, CHARINDEX('/', REVERSE(Link)) - 1))
  FROM #links; 
  
DROP TABLE #links;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results