summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/uri/uri.dtx
blob: 13bcf07a8476336d166ee4427c0050405dc95608 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
% \iffalse meta-comment
%
% File: uri.dtx
% Version: 2018/09/06 v2.0b
%
% Copyright (C) 2011 - 2018 by
%    H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
% Portions of code copyrighted by other people as marked.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any later
% version. This version of this license is in
%    http://www.latex-project.org/lppl/lppl-1-3c.txt
% and the latest version of this license is in
%    http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work is H.-Martin Muench.
%
% This work consists of the main source file uri.dtx,
% the README, and the derived files
%    uri.sty, uri.pdf, uri.ins, uri.drv,
%    uri-example.tex, uri-example.pdf.
%
% 'uri' is available on CTAN:
% https://www.ctan.org/pkg/uri
%
% Also a TDS.ZIP file is provided that contains all the files
% already sorted in a TDS tree:
% http://mirror.ctan.org/install/macros/latex/contrib/uri.tds.zip
%
%<*ignore>
\begingroup
  \catcode123=1 %
  \catcode125=2 %
  \def\x{LaTeX2e}%
\expandafter\endgroup
\ifcase 0\ifx\install y1\fi\expandafter
         \ifx\csname processbatchFile\endcsname\relax\else1\fi
         \ifx\fmtname\x\else 1\fi\relax
\else\csname fi\endcsname
%</ignore>
%<*install>
\input docstrip.tex
\obeyspaces
\Msg{*****************************************************************************}
\Msg{* Installation}
\Msg{* Package: uri 2018/09/06 v2.0b Hyperlinks URIs like DOI,HDL,NBN,PubMed (HMM)}
\Msg{*****************************************************************************}

\keepsilent
\askforoverwritefalse

\let\MetaPrefix\relax
\preamble

This is a generated file.

Project: uri
Version: 2018/09/06 v2.0b

Copyright (C) 2011 - 2018 by
    H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
Portions of code copyrighted by other people as marked.

IMPORTANT NOTICE: The package takes options.

The usual disclaimer applies:
If it doesn't work right that's your problem.
(Nevertheless, send an e-mail to the maintainer
 when you find an error in this package.)

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3c of this license or (at your option) any later
version. This version of this license is in
   http://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
   http://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of
LaTeX version 2005/12/01 or later.

This work has the LPPL maintenance status "maintained".

The Current Maintainer of this work is H.-Martin Muench.

This work consists of the main source file uri.dtx,
the README, and the derived files
   uri.sty, uri.pdf, uri.ins, uri.drv,
   uri-example.tex, uri-example.pdf.

In memoriam
 Claudia Simone Barth + 1996/01/30
 Tommy Muench + 2014/01/02
 Hans-Klaus Muench + 2014/08/24

\endpreamble
\let\MetaPrefix\DoubleperCent

\generate{%
  \file{uri.ins}{\from{uri.dtx}{install}}%
  \file{uri.drv}{\from{uri.dtx}{driver}}%
  \usedir{tex/latex/uri}%
  \file{uri.sty}{\from{uri.dtx}{package}}%
  \usedir{doc/latex/uri}%
  \file{uri-example.tex}{\from{uri.dtx}{example}}%
}

\obeyspaces

\Msg{************************************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
\Msg{* uri.sty}
\Msg{*}
\Msg{* To produce the documentation run the file `uri.drv'}
\Msg{* through (pdf)LaTeX, e.g.}
\Msg{*  pdflatex uri.drv}
\Msg{*  makeindex -s gind.ist uri.idx}
\Msg{*  pdflatex uri.drv}
\Msg{*  makeindex -s gind.ist uri.idx}
\Msg{*  pdflatex uri.drv}
\Msg{*}
\Msg{* At least two runs are necessary e.g. to get the}
\Msg{*  references right!}
\Msg{*}
\Msg{* Happy TeXing!}
\Msg{*}
\Msg{************************************************************************}

\endbatchfile
%</install>
%<*ignore>
\fi
%</ignore>
%
% \section{The documentation driver file}
%
% The next bit of code contains the documentation driver file for
% \TeX , i.\,e., the file that will produce the documentation you
% are currently reading. It will be extracted from this file by the
% \verb|docstrip| programme. That is, run \LaTeX{} on \verb|docstrip|
% and specify the \verb|driver| option when \verb|docstrip|
% asks for options.
%
%    \begin{macrocode}
%<*driver>
\NeedsTeXFormat{LaTeX2e}[2015/01/01]
\ProvidesFile{uri.drv}[2018/09/06 v2.0b
            Hyperlinks URIs like DOI,HDL,NBN,PubMed (HMM)]
\documentclass{ltxdoc}[2015/03/26]% v2.0w
\usepackage{pdflscape}[2008/08/11]% v0.10
\usepackage{holtxdoc}[2012/03/21]%  v0.24
%% uri may work with earlier versions of LaTeX2e and those
%% class and packages, but this was not tested.
%% Please consider updating your LaTeX, class, and package
%% to the most recent version (if they are not already the most
%% recent version).
\hypersetup{%
 pdfsubject={Hyperlinks URIs like DOI, HDL, NBN, PubMed (HMM)},%
 pdfkeywords={LaTeX, uri, hyperlink, arXiv, ASIN, DOI, HDL, NBN, OCLC, OID, PubMed, TINY, TINY:P, preview, WebCite, citeurl, mailto, ukoeln, uref, Hans-Martin Muench},%
 pdfencoding=auto,%
 pdflang={en},%
 breaklinks=true,%
 linktoc=all,%
 pdfstartview=FitH,%
 pdfpagelayout=OneColumn,%
 bookmarksnumbered=true,%
 bookmarksopen=true,%
 bookmarksopenlevel=3,%
 pdfmenubar=true,%
 pdftoolbar=true,%
 pdfwindowui=true,%
 pdfnewwindow=true%
}
\CodelineIndex
\hyphenation{created document doc-u-ment-a-tion every-thing ignored}
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}
\begin{document}
  \DocInput{uri.dtx}%
\end{document}
%</driver>
%    \end{macrocode}
%
% \fi
%
% \CheckSum{455}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \GetFileInfo{uri.drv}
%
% \begingroup
%   \def\x{\#,\$,\^,\_,\~,\ ,\&,\{,\},\%}%
%   \makeatletter
%   \@onelevel@sanitize\x
% \expandafter\endgroup
% \expandafter\DoNotIndex\expandafter{\x}
% \expandafter\DoNotIndex\expandafter{\string\ }
% \begingroup
%   \makeatletter
%     \lccode`9=32\relax
%     \lowercase{%^^A
%       \edef\x{\noexpand\DoNotIndex{\@backslashchar9}}%^^A
%     }%^^A
%   \expandafter\endgroup\x
% \DoNotIndex{\8,\",\-,\\,\ldots,\indent,\noindent}
% \DoNotIndex{\documentclass,\usepackage,\small,\begin,\end}
% \DoNotIndex{\NeedsTeXFormat,\filedate,\fileversion,\DoNotIndex}
% \DoNotIndex{\def,\edef,\gdef}
% \DoNotIndex{\textbf,\textit,\textsf,\textsc}
% \DoNotIndex{\if,\ifx,\ifnum,\ifdim,\else,\fi}
% \DoNotIndex{\CodelineIndex,\DocInput}
% \DoNotIndex{\newpage,\pagebreak,\newline,\linebreak,\nolinebreak}
% \DoNotIndex{\MessageBreak}
% \DoNotIndex{\smallskip,\medskip,\bigskip,\space,\,}
% \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX}
% \DoNotIndex{\protect,\listfiles,\textquotedblleft,\textquotedblright}
% \DoNotIndex{\markboth,\section,\item}
% \DoNotIndex{\href,\url,\nolinkurl,\pagenumbering,\xext,\ProvidesPackage}
% \DoNotIndex{\aurl,\doipubmed,\holtxdoc,\kvoptions,\Oberdiek,\M\"{u}nch}
% \DoNotIndex{\DeclareRobustCommand,\DeclareStringOption,\DeclareUrlCommand}
% \DoNotIndex{\PackageWarning,\ProcessKeyvalOptions,\SetupKeyvalOptions}
% \DoNotIndex{\UrlLeft,\UrlRight,\verb}
%
% \title{The \xpackage{uri} package}
% \date{2018/09/06 v2.0b}
% \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}}
%
% \maketitle
%
% \begin{abstract}
% \noindent This package allows to automatically hyperlink uris of type
% arXiv, ASIN, DOI, HDL, NBN, OCLC, OID, PubMed, TINY, TINY with preview,
% and Web\-Cite in such a way that they are resolved to an address
% understood by web browsers without native support or add-ons for such types
% of uri and provides commands |\citeurl|, |\mailto|, |\ukoeln|, and |\uref|.
% \end{abstract}
%
% \bigskip
%
% \noindent Disclaimer for web links: The author is not responsible for any contents
% referred to in this work unless if having full knowledge of illegal contents.
% If any damage occurs by the use of information presented there, only the
% author of the respective pages might be liable, not the one who has referred
% to these pages.
%
% \noindent Save per page about $200\unit{ml}$ water,
% $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:
% Therefore please print only if this is really necessary.
%
% \bigskip
%
% \tableofcontents
%
% \newpage
%
% \section{Introduction}
% \indent Diverse types of URIs exists. While every web browser should know
% how to handle an uri like \url{https://www.ctan.org/}, there are probably
% quite a few web browsers which cannot handle e.\,g. \url{arXiv:math/9201303}
% (just test it by clicking the hyperlink). There are four types of solution:
% \begin{enumerate}
% \item Change the programme code of the web browser to recognise the uri.
%
% \item Use/write a plug-in for the browser to resolve the uri.
%
% \item Use only the full, expanded uri. Then they can be reliable accessed by
% every\-body, but those uris usually become quite long, which is not really
% nice (and line breaks have their own problems).
%
% \item
%
% \begin{enumerate}
% \item Write the short uri (\href{https://arxiv.org/abs/math/9201303}{arXiv:math/9201303}),
% but link to the long, expanded one. This combines reliability and aesthetics,
% but can be cumbersome to write, especially when a lot of those addresses are used.
%
% \item Do as described at (a), but automatically. This is the way this package
% can be used.
% \end{enumerate}
% \end{enumerate}
%
% \section{Usage}
% \indent Just load the package placing
% \begin{quote}
%   |\usepackage[<|\textit{options}|>]{uri}|
% \end{quote}
% \noindent in the preamble of your \LaTeXe{} source file
% (preferably after calling the \xpackage{url} and \xpackage{hyperref} package).
% For the different types of uri and available options see the documented
% code below.
%
% \section{Alternatives\label{sec:Alternatives}}
% There are similar packages, which do (or do not) similar
% things. Here is a list of some possible alternatives:
%
% \DescribeMacro{aurl}
% \begin{description}
% \item[-] The \xpackage{aurl} package \textquotedblleft [e]xtends the hyperref package
% with a mechanism for hyperlinked URLs abbreviated with prefixes\textquotedblright,
% i.\,e. similar to this package here.
% \end{description}
%
% \DescribeMacro{doi}
% \begin{description}
% \item[-] The \xpackage{doi} package \textquotedblleft contains a user-level command
% |\doi{}|, which takes a doi number, and creates a hyperlink from it. The format
% of the doi can be controlled by redefining the |\doitext| command\textquotedblright
% \ (from the \xpackage{doi} package \verb|ReadMe|). It does not handle other types
% of uris, naturally.
% \end{description}
%
% \DescribeMacro{doipubmed}
% \begin{description}
% \item[-] The \xpackage{doipubmed} package handles |DOI| as well as |PubMed| uris.
% \end{description}
%
% \bigskip
%
% \noindent (You programmed or found another alternative,
%  which is available at \url{https://www.CTAN.org}?
%  OK, send an e-mail to me with the name, location at CTAN,
%  and a short notice, and I will probably include it in the list above.)
%
% \smallskip
%
% \noindent About how to get those packages, please see subsection~\ref{ss:Downloads}.
%
% \newpage
% \begin{landscape}
%
% \section{Example}
%
%    \begin{macrocode}
%<*example>
\documentclass[british]{article}[2014/09/29]% v1.4h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\PassOptionsToPackage{hyphens}{url}% url is loaded internally by hyperref
\usepackage{hyperref}[2011/02/07]% v6.82b
\hypersetup{%
 extension=pdf,%
 plainpages=false,%
 pdfpagelabels=true,%
 hyperindex=false,%
 pdflang={en},%
 pdftitle={uri package example},%
 pdfauthor={Hans-Martin Muench},%
 pdfsubject={Example for the uri package},%
 pdfkeywords={LaTeX, uri, Hans-Martin Muench},%
 pdfview=Fit,%
 pdfstartview=Fit,%
 pdfpagelayout=SinglePage,%
 bookmarksopen=false%
}
\usepackage{uri}[2018/09/06]% v2.0b
\RequirePackage{amsmath}
\RequirePackage{relsize}
\gdef\doialternative{%
  \hbox{\text{\fontfamily{lmss}\selectfont{\smaller{%
  DO\hspace{-0.025em}I\raisebox{0.24ex}{:}}}\kern-0.01em}}\allowbreak%
  }% used later for demonstration of \urisetup
\renewcommand*{\thesubsection}{\arabic{subsection}}
\listfiles
\begin{document}
\pagenumbering{arabic}

\section*{Example for uri}
This example demonstrates the use of package\newline
\textsf{uri}, v2.0b as of 2018/09/06 (HMM).\newline
No options were given, thereby the default options were used.\newline
For more details please see the documentation!

\subsection{Supported types of uri\label{uritypes}}
The \textsf{uri} package allows to hyperlink (with the
\textsf{hyperref} package of \textsc{Heiko Ober\-diek}) uris of type
\begin{itemize}
\item[--] arXiv (\url{https://www.arXiv.org/}), e.\,g. \arxiv{math/9201303}.

\item[--] ASIN %
  (\url{https://www.amazon.co.uk/gp/help/customer/display.html/277-3416785-8259466?ie=UTF8&nodeId=898182}), %
  (that one is a good example for using a TINY url: \tinyuri{y7ju25ln}) %
  e.\,g. \asin{0201134489}.

\item[--] DOI (\url{https://www.doi.org/index.html}), e.\,g. \doi{10.1000/182} or\linebreak%
  \doi{10.1111/coin.12165}. For DOIs also \url{http://www.shortdoi.org/} %
  should be mentioned, which provides \doi{10/b8xfbg} as synonym for that long doi %
  given in \hyperref[relaxation]{\ref*{relaxation} Stress test} %
  (and also synonyms for all other DOIs).

\item[--] HDL (\url{https://www.handle.net/index.html}), e.\,g. \hdl{2128/2486}.

\item[--] NBN (\url{http://nbn-resolving.de/urn:nbn:de:1111-200606309}),\newline%
  e.\,g. \nbn{urn:nbn:de:bsz:mit1-opus-3145}.

\item[--] OCLC (the global library cooperative %
  \href{https://www.oclc.org/en/about.html}{OCLC} maintains %
  \href{https://www.worldcat.org/whatis/default.jsp}{WorldCat}), %
  e.\,g. \oclc{935889548}.

\item[--] OID (\url{http://www.oid-info.com/#oid}), e.\,g. \oid{2.16.840}.

\item[--] PubMed (\url{https://www.ncbi.nlm.nih.gov/pubmed/}),\newline%
  e.\,g. \pubmed{24925405}.

\item[--] TINY (\url{https://tinyurl.com/}), e.\,g. \tinyuri{MST19-105603}\newline%
  (uses \verb|\tinyuri| instead of \verb|\tiny|, because that command already existed).

\item[--] TINY with preview (\url{https://preview.tinyurl.com/}), %
  e.\,g. \tinypuri{MST19-105603}.

\item[--] WebCite (\url{https://www.webcitation.org/}), e.\,g. \wc{71dxjl73I},
  which is short for \wc{query?url=http%3A%2F%2Fctan.org&date=2018-08-13}{%
  }.

\item[--] XMPP (\url{https://xmpp.org/about/}) changed, for example
  \verb|URN:XMPP:time| was moved from \url{https://xmpp.org/protocols/urn:xmpp:time/}
  to\linebreak \url{https://xmpp.org/extensions/xep-0202.html}. Therefore
  \verb|\xmpp| is no longer provided by this package. For backward compatibility
  \verb|\xmpp{...}| gives an error message and links to
  \url{https://xmpp.org/extensions/}.
\end{itemize}

\subsection{Pre/post text, \texttt{\textbackslash urisetup}}
\noindent Text before (e.\,g. \textsf{DOI:}) and after (well, no example)
the uri to be displayed can be adapted by the package options.
After loading the package it is possible (even somewhere within the document's body)
to change these \hbox{\ldots \verb|pre|} (and \hbox{\ldots \verb|post|)} texts
by \verb|\urisetup|, e.\,g.\newline
\verb|\urisetup{arxivpre={\textsf{\scshape arXiv:}\hspace{.2em}}}|.\newline
This command can also be used in the preamble to define pre/post texts
which otherwise are not understood by \LaTeX. -- Compare
\arxiv{0905.0105v2} to
\urisetup{arxivpre={\textsf{\scshape arXiv:}\hspace{.2em}}}
\arxiv{0905.0105v2} or
\doi{10.1000/182} to
\urisetup{doipre={\doialternative}}% \doialternative was defined in the example's preamble.
\doi{10.1000/182}.

\subsection{\texttt{\textbackslash citeurl}, \texttt{\textbackslash mailto}, %
            \texttt{\textbackslash ukoeln}, and \texttt{\textbackslash uref}}
Additionally some commands are provided by the uri package:
\begin{itemize}
\item[--] \verb|\citeurl| similar to the command of the \textsf{doipubmed} package,\newline%
  \citeurl{https://ctan.org/pkg/doipubmed}.

\item[--] \verb|\mailto| for e-mail addresses (optionally with e-mail subject), e.\,g.\newline%
\mailto{spam@example.org} or with subject %
\mailto[Some subject of the e-mail]{spam@example.org}.

\item[--] \verb|\ukoeln| for short University of Cologne (Universit\"{a}t zu K\"{o}ln, %
  U~Koeln; Germany; \url{https://www.portal.uni-koeln.de/8911.html?&L=1})
  ad-\linebreak dresses, e.\,g. \ukoeln{PDGKL}.

\item[--] \verb|\uref| takes two arguments, the first gives the target of the hyperlink, %
  the second gives the text to be displayed for it, e.\,g. information about the %
  \uref{https://ctan.org/pkg/uri}{uri package}, similar to \verb|\href|. %
  When \textsf{hyperref} was not loaded, \newline%
  \verb|\uref{first argument}{second argument}| %
  defaults to\newline
  \verb|\url{second argument}|.
\end{itemize}


\subsection{Stress test\label{relaxation}}
Even \verb|\doi{1.2/3-.(5):<>;%A\8!$~&{}#X}|
would work (if that DOI would exist; same for the other types of uri):
\doi{1.2/3-.(5):<>;%A\8!$~&{}#X}{%
} (In the error message at doi.org the \verb|#X| is not included,
because it is interpreted as \textquotedblleft anchor X\textquotedblright{} at
page \verb|1.2/3-.(5):<>;%A\8!$~&{}|, which already is not found.)\newline
Adding \verb|opening bracket percent-sign line break closing bracket|\newline
(please see the source code of the example)
makes programs happy, which check for bracket pairs and take the
first percent sign as the start of a comment and therefore miss
the closing bracket (but therefore also the following opening one).
And this real DOI works:\newline
\doi{10.1002/1097-4636(200108)56:2<282::AID-JBM1096>3.0.CO;2-5}\newline
(short: \doi{10/b8xfbg}, see DOI in %
\hyperref[uritypes]{\ref*{uritypes} Supported types of uri}).
\pagebreak

\subsection{Name-to-Thing resolver}
It is also possible to resolve a lot of identifiers by
the Name-to-Thing resolver by just appending the identifier to
\url{https://n2t.net/}, e.\,g. \newline%
\url{https://n2t.net/arXiv:math/9201303}, \newline%
\url{https://n2t.net/ASIN:0201134489}, \newline%
\url{https://n2t.net/DOI:10.1111/coin.12165}, \newline%
\url{https://n2t.net/HDL:2128/2486}, \newline%
\url{https://n2t.net/urn:nbn:de:bsz:mit1-opus-3145}, \newline%
\url{https://n2t.net/OCLC:935889548}, \newline%
\url{https://n2t.net/PubMed:24925405}, and also \newline%
\url{https://n2t.net/ISBN:9783638922005} and \newline%
\url{https://n2t.net/ARK:12148/bpt6k15385d}.\newline%
(And for resolving OIDs like OID:2.16.840 instead of %
\url{http://www.oid-info.com/cgi-bin/display?oid=2.16.840&submit=Display&action=display} %
it is possible to use %
\url{https://identifiers.org/OID:2.16.840}.)\newline%
Disadvantages: It is longer and requires \href{https://n2t.net/}{n2t.net} to work %
(or \href{https://identifiers.org/}{identifiers.org} for OID).\newline%
Advantage: Anybody reading the printed document can just enter %
the url as given into their browser without thinking about how to resolve %
that type of uri.


\subsection{Disclaimer for web links}
The author is not responsible for any contents referred
to in this work unless if having full knowledge of illegal contents. If any damage
occurs by the use of information presented there, only the author of the respective
pages might be liable, not the one who has referred to these pages.
\end{document}
%</example>
%    \end{macrocode}
%
% \StopEventually{}
%
% \newpage
% \section{The implementation}
%
% We start off by checking that we are loading into \LaTeXe{} and
% announcing the name and version of this package.
%
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
%
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2015/01/01]
\ProvidesPackage{uri}[2018/09/06 v2.0b
   Hyperlinks URIs like DOI,HDL,NBN,PubMed (HMM)]

%    \end{macrocode}
%
% A short description of the \xpackage{uri} package:
%
%    \begin{macrocode}
%% Allows to automatically hyperlink uris of types
%% arXiv, ASIN, DOI, HDL, NBN, OCLC, OID, PubMed, TINY, TINY with preview,
%% and WebCite
%% in such a way that they are resolved to an address understood by browsers
%% independent of native support or add-ons for such types of uri
%% and provides commands \citeurl, \mailto, \ukoeln, and \uref.
%    \end{macrocode}
%
% For the handling of the options we need the \xpackage{kvoptions}
% package of \textsc{Heiko Oberdiek} (see subsection~\ref{ss:Downloads}):
%
%    \begin{macrocode}
\RequirePackage{kvoptions}[2011/06/30]% v3.11
%    \end{macrocode}
%
% We need the \xpackage{url} package of \textsc{Donald Arseneau} and
% \textsc{Robin Fairbairns} (see subsection~\ref{ss:Downloads}):
%
%    \begin{macrocode}
\RequirePackage{url}[2013/09/16]% v3.4

%    \end{macrocode}
%
% When spaces shall be kept, |\usepackage[obeyspaces]{url}| should be used
% in the document (and |\ | in the options), and for using special characters even
% |\usepackage[obeyspaces,T1]{url}| could be a good idea.~-
% When the \xpackage{hyperref} package has been loaded, we hyperlink the uris,
% otherwise we do not do this.\newline
% \textbf{So, if you want hyperlinks, load \xpackage{uri} after \xpackage{hyperref},
% otherwise before} (or no \xpackage{hyperref} at all, of course).
%
% For each supported uri type there are two options, |...pre| and |...post|,
% e.\,g. |doipre| and |doipost|. For example the option |doipre={DOI:\ }|
% results in \hbox{\textquotedblleft{}DOI:\ \textquotedblright}
% (without the quotation marks, of course) to be written before the DOIs.\newline
% (There are more brackets and braces then necessary here, but better
% save than sorry, i.\,e. make it robust.)
%
%    \begin{macrocode}
\SetupKeyvalOptions{family = uri, prefix = uri@}

\DeclareStringOption[arXiv:]{arxivpre}[arXiv:]
\DeclareStringOption[]{arxivpost}[]

\DeclareStringOption[ASIN:]{asinpre}[ASIN:]
\DeclareStringOption[]{asinpost}[]

\DeclareStringOption[DOI:]{doipre}[DOI:]
\DeclareStringOption[]{doipost}[]

\DeclareStringOption[HDL:]{hdlpre}[HDL:]
\DeclareStringOption[]{hdlpost}[]

\DeclareStringOption[]{nbnpre}[]
\DeclareStringOption[]{nbnpost}[]

\DeclareStringOption[OCLC:]{oclcpre}[OCLC:]
\DeclareStringOption[]{oclcpost}[]

\DeclareStringOption[URN:OID:]{oidpre}[URN:OID:]
\DeclareStringOption[]{oidpost}[]

\DeclareStringOption[PubMed:]{pubmedpre}[PubMed:]
\DeclareStringOption[]{pubmedpost}[]

%    \end{macrocode}
%
% The commands are \verb|tinyuri| and \verb|tinypuri|,
% thus the according options are
% tinyuripre, tinyuripre, tinyuripost, tinypuripost, and tinypuripre.
% In older versions they were
% tinypre, tinypre, tinypost, tinyppost, and tinyppre.
% For backward compatibility we need to define and handle them:
%
%    \begin{macrocode}
\def\uri@tiny@pre@default{TINY:}
\def\uri@tiny@post@default{}

\def\uri@tinyp@pre@default{TINY:P:}
\def\uri@tinyp@post@default{}

\DeclareStringOption[\uri@tiny@pre@default]{tinypre}[\uri@tiny@pre@default]
\DeclareStringOption[\uri@tiny@post@default]{tinypost}[\uri@tiny@post@default]

\DeclareStringOption[\uri@tinyp@pre@default]{tinyppre}[\uri@tinyp@pre@default]
\DeclareStringOption[\uri@tinyp@post@default]{tinyppost}[\uri@tinyp@post@default]

\DeclareStringOption[\uri@tiny@pre@default]{tinyuripre}[\uri@tiny@pre@default]
\DeclareStringOption[\uri@tiny@post@default]{tinyuripost}[\uri@tiny@post@default]

\DeclareStringOption[\uri@tinyp@pre@default]{tinypuripre}[\uri@tinyp@pre@default]
\DeclareStringOption[\uri@tinyp@post@default]{tinypuripost}[\uri@tinyp@post@default]

\DeclareStringOption[WC:]{wcpre}[WC:]
\DeclareStringOption[]{wcpost}[]

\DeclareStringOption[URN:XMPP:]{xmpppre}[]
\DeclareStringOption[]{xmpppost}[]

\DeclareStringOption[<]{citeurlpre}[<]
\DeclareStringOption[>]{citeurlpost}[>]

\DeclareStringOption[mailto:]{mailtopre}[mailto:]
\DeclareStringOption[]{mailtopost}[]

\DeclareStringOption[http://UKoeln.de/]{ukoelnpre}[http://UKoeln.de/]
\DeclareStringOption[]{ukoelnpost}[]

\ProcessKeyvalOptions*

%    \end{macrocode}
%
% To set options with more complicated/problematic content,
% \verb|\urisetup| is needed. With this the user can set
% the according option(s) after loading this package
% (please see the example file).
%
%    \begin{macrocode}
\gdef\urisetup{\kvsetkeys{uri}}

%    \end{macrocode}
%
% Handling of deprecated options
% tinypre, tinypre, tinypost, tinyppost, and tinyppre:
%
%    \begin{macrocode}
\def\uri@wrapper{\uri@tiny@pre@default}
\ifx\uri@tinypre\uri@wrapper%
\else%
  \ifx\uri@tinyuripre\uri@wrapper%
    \PackageWarning{uri}{Option tinypre deprecated.\MessageBreak%
      Please use tinyuripre instead!\MessageBreak%
      Transfering content of option tinypre to tinyuripre now;\MessageBreak%
      }%
    \let\uri@tinyuripre\uri@tinypre%
  \else%
    \PackageError{uri}{Conflicting options tinypre and tinyuripre used}{%
      Option tinypre deprecated.\MessageBreak%
      Please use ONLY option tinyuripre instead!\MessageBreak%
      Ignoring option tinypre now.\MessageBreak%
      }%
  \fi%
\fi%

\def\uri@wrapper{\uri@tiny@post@default}
\ifx\uri@tinypost\uri@wrapper%
\else%
  \ifx\uri@tinyuripost\uri@wrapper%
    \PackageWarning{uri}{Option tinypost deprecated.\MessageBreak%
      Please use tinyuripost instead!\MessageBreak%
      Transfering content of option tinypost to tinyuripost now;\MessageBreak%
      }%
    \let\uri@tinyuripost\uri@tinypost%
  \else%
    \PackageError{uri}{Conflicting options tinypost and tinyuripost used}{%
      Option tinypost deprecated.\MessageBreak%
      Please use ONLY option tinyuripost instead!\MessageBreak%
      Ignoring option tinypost now.\MessageBreak%
      }%
  \fi%
\fi%

\def\uri@wrapper{\uri@tinyp@pre@default}
\ifx\uri@tinyppre\uri@wrapper%
\else%
  \ifx\uri@tinypuripre\uri@wrapper%
    \PackageWarning{uri}{Option tinyppre deprecated.\MessageBreak%
      Please use tinypuripre instead!\MessageBreak%
      Transfering content of option tinyppre to tinypuripre now;\MessageBreak%
      }%
    \let\uri@tinypuripre\uri@tinyppre%
  \else%
    \PackageError{uri}{Conflicting options tinyppre and tinypuripre used}{%
      Option tinyppre deprecated.\MessageBreak%
      Please use ONLY option tinypuripre instead!\MessageBreak%
      Ignoring option tinyppre now.\MessageBreak%
      }%
  \fi%
\fi%

\def\uri@wrapper{\uri@tinyp@post@default}
\ifx\uri@tinyppost\uri@wrapper%
\else%
  \ifx\uri@tinypuripost\uri@wrapper%
    \PackageWarning{uri}{Option tinyppost deprecated.\MessageBreak%
      Please use tinypuripost instead!\MessageBreak%
      Transfering content of option tinyppost to tinypuripost now;\MessageBreak%
      }%
    \let\uri@tinypuripost\uri@tinyppost%
  \else%
    \PackageError{uri}{Conflicting options tinyppost and tinypuripost used}{%
      Option tinyppost deprecated.\MessageBreak%
      Please use ONLY option tinypuripost instead!\MessageBreak%
      Ignoring option tinyppost now.\MessageBreak%
      }%
  \fi%
\fi%

%    \end{macrocode}
%
% We disable the deprecated options. If not disabled,
% it would be possible to use \verb|\urisetup| with them
% without error message, but this would not have any effect,
% because only the newer options
% tinyuripre, tinyuripre, tinyuripost, tinypuripost, and tinypuripre
% are regarded.
%
%    \begin{macrocode}
\DisableKeyvalOption[action={error},package=uri]{uri}{tinypre}
\DisableKeyvalOption[action={error},package=uri]{uri}{tinypost}
\DisableKeyvalOption[action={error},package=uri]{uri}{tinyppre}
\DisableKeyvalOption[action={error},package=uri]{uri}{tinyppost}

%    \end{macrocode}
%
% Now we define the commands, using |\tinyuri| instead of |\tiny|,
% because that command already existed before
% (and accordingly |\tinypuri|, even if |\tinyp| did not exist).
%
%    \begin{macrocode}
\@ifpackageloaded{hyperref}{%
\DeclareRobustCommand{\uref}[2]{\protect\href{#1}{\protect\nolinkurl{#2}}}%
%% arXiv
\DeclareUrlCommand\arxiv{\def\UrlLeft##1\UrlRight{\href{https://arxiv.org/abs/##1}{\uri@arxivpre##1\uri@arxivpost}}}%
%% ASIN
\DeclareUrlCommand\asin{\def\UrlLeft##1\UrlRight{\href{https://amzn.com/##1}{\uri@asinpre##1\uri@asinpost}}}%
%% DOI
\DeclareUrlCommand\doi{\def\UrlLeft##1\UrlRight{\href{https://dx.doi.org/##1}{\uri@doipre##1\uri@doipost}}}%
%% HDL
\DeclareUrlCommand\hdl{\def\UrlLeft##1\UrlRight{\href{https://hdl.handle.net/##1}{\uri@hdlpre##1\uri@hdlpost}}}%
%% NBN
\DeclareUrlCommand\nbn{\def\UrlLeft##1\UrlRight{\href{https://nbn-resolving.org/urn/resolver.pl?urn=##1}{\uri@nbnpre##1\uri@nbnpost}}}%
%% OCLC
\DeclareUrlCommand\oclc{\def\UrlLeft##1\UrlRight{\href{https://www.worldcat.org/oclc/##1}{\uri@oclcpre##1\uri@oclcpost}}}%
%% OID
\DeclareUrlCommand\oid{\def\UrlLeft##1\UrlRight{\href{http://www.oid-info.com/cgi-bin/display?oid=##1&submit=Display&action=display}{%
\uri@oidpre##1\uri@oidpost}}}%
%% PubMed
\DeclareUrlCommand\pubmed{\def\UrlLeft##1\UrlRight{%
\href{https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=##1&dopt=Abstract}{\uri@pubmedpre##1\uri@pubmedpost}}}%
%% TINY
\DeclareUrlCommand\tinyuri{\def\UrlLeft##1\UrlRight{\href{https://tinyurl.com/##1}{\uri@tinyuripre##1\uri@tinyuripost}}}%
%% TINYP (tiny with preview)
\DeclareUrlCommand\tinypuri{\def\UrlLeft##1\UrlRight{\href{https://preview.tinyurl.com/##1}{\uri@tinypuripre##1\uri@tinypuripost}}}%
%% WebCite
\DeclareUrlCommand\wc{\def\UrlLeft##1\UrlRight{\href{https://www.webcitation.org/##1}{\uri@wcpre##1\uri@wcpost}}}%
%% XMPP
\DeclareUrlCommand\xmpp{%
  \PackageError{uri}{Command \string\xmpp\space deprecated}{%
    XMPP (https://xmpp.org/about/) changed, for example URN:XMPP:time\MessageBreak%
    was moved from https://xmpp.org/protocols/urn:xmpp:time/\MessageBreak%
    to https://xmpp.org/extensions/xep-0202.html. Therefore\MessageBreak%
    \string\xmpp\space is no longer provided by this package.\MessageBreak%
    For backward compatibility \string\xmpp\space links to\MessageBreak%
    https://xmpp.org/extensions/.\MessageBreak%
    Please replace \string\xmpp\space in your document by the appropriate url.\MessageBreak%
  }%
  \def\UrlLeft##1\UrlRight{\href{https://xmpp.org/extensions/}{\uri@xmpppre##1\uri@xmpppost}}%
  }%
%% citeurl
\DeclareUrlCommand\citeurl{\def\UrlLeft##1\UrlRight{\href{##1}{\uri@citeurlpre##1\uri@citeurlpost}}}%
%% mailto
\DeclareUrlCommand\mailto@{\def\UrlLeft##1\UrlRight{\href{mailto:##1\mailto@subject}{\uri@mailtopre##1\uri@mailtopost}}}%
\DeclareRobustCommand\mailto[1][]{\def\mailto@subject{?subject=#1}\mailto@}%
%    \end{macrocode}
%
% \verb|\mailto| code provided by \textsc{Frank Mittelbach} (thanks!),
% making possible \verb|\mailto{person@example.org}| as well as\newline
% \verb|\mailto[Some subject of the e-mail]{person@example.org}|,
% i.\,e. \verb|mailto:person@example.org?subject=Some subject of the e-mail|.
%
%    \begin{macrocode}
%% ukoeln
\DeclareUrlCommand\ukoeln{\def\UrlLeft##1\UrlRight{\href{https://UKoeln.de/##1}{\uri@ukoelnpre##1\uri@ukoelnpost}}}%
}{% otherwise, i.e. if hyperref has not been loaded:
\DeclareRobustCommand{\uref}[1]{\url}%
%% arXiv
\DeclareUrlCommand\arxiv{\def\UrlLeft##1\UrlRight{\uri@arxivpre##1\uri@arxivpost}}%
%% ASIN
\DeclareUrlCommand\asin{\def\UrlLeft##1\UrlRight{\uri@asinpre##1\uri@asinpost}}%
%% DOI
\DeclareUrlCommand\doi{\def\UrlLeft##1\UrlRight{\uri@doipre##1\uri@doipost}}%
%% HDL
\DeclareUrlCommand\hdl{\def\UrlLeft##1\UrlRight{\uri@hdlpre##1\uri@hdlpost}}%
%% NBN
\DeclareUrlCommand\nbn{\def\UrlLeft##1\UrlRight{\uri@nbnpre##1\uri@nbnpost}}%
%% OCLC
\DeclareUrlCommand\oclc{\def\UrlLeft##1\UrlRight{\uri@oclcpre##1\uri@oclcpost}}%
%% OID
\DeclareUrlCommand\oid{\def\UrlLeft##1\UrlRight{\uri@oidpre##1\uri@oidpost}}%
%% PubMed
\DeclareUrlCommand\pubmed{\def\UrlLeft##1\UrlRight{\uri@pubmedpre##1\uri@pubmedpost}}%
%% TINY
\DeclareUrlCommand\tinyuri{\def\UrlLeft##1\UrlRight{\uri@tinyuripre##1\uri@tinyuripost}}%
%% TINYP (tiny with preview)
\DeclareUrlCommand\tinypuri{\def\UrlLeft##1\UrlRight{\uri@tinypuripre##1\uri@tinypuripost}}%
%% WebCite
\DeclareUrlCommand\wc{\def\UrlLeft##1\UrlRight{\uri@wcpre##1\uri@wcpost}}%
%% XMPP
\DeclareUrlCommand\xmpp{\def\UrlLeft##1\UrlRight{\uri@xmpppre##1\uri@xmpppost}}%
%% citeurl
\DeclareUrlCommand\citeurl{\def\UrlLeft##1\UrlRight{\uri@citeurlpre##1\uri@citeurlpost}}%
%% mailto
\DeclareUrlCommand\mailto@{\def\UrlLeft##1\UrlRight{\uri@mailtopre##1\uri@mailtopost}}%
\DeclareRobustCommand\mailto[1][]{\mailto@}%
%% ukoeln
\DeclareUrlCommand\ukoeln{\def\UrlLeft##1\UrlRight{\uri@ukoelnpre##1\uri@ukoelnpost}}%
}

%    \end{macrocode}
%
% Note that you cannot create those addresses by this way, only link to existing ones.
%
% That was already everything which was necessary.
%
% (Once you get the syntax for the |\DeclareUrlCommand| right, it is straight forward.
% Emphasis is at \textquotedblleft Once\textquotedblright\ldots )
%
% \pagebreak
% \begin{macro}{\AtBeginDocument}
% \indent |\AtBeginDocument| it is checked whether any of the
% \xpackage{aurl}, \xpackage{doi}, or \xpackage{doipubmed} packages are loaded.
%
%    \begin{macrocode}
\AtBeginDocument{%
  \@ifpackageloaded{aurl}%
    {\PackageWarning{uri}{Packages uri AND aurl detected.\MessageBreak%
       Results might depend on order of loading;\MessageBreak}%
    }{\relax}%
  \@ifpackageloaded{doi}%
    {\PackageWarning{uri}{Packages uri AND doi detected.\MessageBreak%
       Results will depend on order of loading!\MessageBreak%
       Consider using only one package.\MessageBreak%
       The uri package alone should be sufficient;\MessageBreak}%
    }{\relax}%
  \@ifpackageloaded{doipubmed}%
    {\PackageWarning{uri}{Packages uri AND doipubmed detected.\MessageBreak%
       Results will depend on order of loading!\MessageBreak%
       Consider using only one package.\MessageBreak%
       The uri package alone should be sufficient;\MessageBreak}%
    }{\relax}%
  }%
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
%</package>
%    \end{macrocode}
%
% \end{landscape}
% \newpage
%
% \section{Installation}
%
% \subsection{Downloads\label{ss:Downloads}}
%
% Everything is available on CTAN: \url{https://www.ctan.org/pkg/}
% but may need additional packages themselves.
%
% \DescribeMacro{uri.dtx}
% For unpacking the |uri.dtx| file and constructing the documentation it is required
% (newer versions should be OK):
% \begin{description}
% \item[-] \TeX{} Format \LaTeXe, 2016/03/31, v2$\varepsilon $:
%   \url{https://www.CTAN.org}
%
% \item[-] document class \xclass{ltxdoc}, 2015/03/26, v2.0w,
%   \url{https://www.ctan.org/pkg/ltxdoc}
%
% \item[-] package \xpackage{pdflscape}, 2008/08/11, v0.10,
%   \url{https://www.ctan.org/pkg/pdflscape}
%
% \item[-] package \xpackage{holtxdoc}, 2012/03/21, v0.24,
%   \url{https://www.ctan.org/pkg/holtxdoc}
%
% \item[-] package \xpackage{hypdoc}, 2011/08/19, v1.11,
%   \url{https://www.ctan.org/pkg/hypdoc}
% \end{description}
%
% \DescribeMacro{uri.sty}
% The |uri.sty| for \LaTeXe{} (i.\,e. all documents using
% the \xpackage{uri} package) requires:
% \begin{description}
% \item[-] \TeX{} Format \LaTeXe, 2016/03/31, v2$\varepsilon $:
%   \url{https://www.CTAN.org}
%
% \item[-] package \xpackage{kvoptions}, 2011/06/30, v3.11,
%   \url{https://www.ctan.org/pkg/kvoptions}
%
% \item[-] package \xpackage{url}, 2013/09/16, v3.4, 
%   \url{https://www.ctan.org/pkg/url}
% \end{description}
%
% \DescribeMacro{uri-example.tex}
% The |uri-example.tex| requires the same files as all
% documents using the \xpackage{uri} package, especially:
% \begin{description}
% \item[-] package \xpackage{hyperref}, 2012/11/06, v6.83m,
%   \url{https://www.ctan.org/pkg/hyperref}\newline
%   (not generally necessary but probably used most often)
% \item[-] package \xpackage{uri}, 2018/09/06, v2.0b,
%   \url{https://www.ctan.org/pkg/uri}\newline
%   (Well, it is the example file for this package, and because you are reading the
%    documentation for the \xpackage{uri} package, it can be assumed that you already
%    have some version of it~-- is it the current one?)
% \end{description}
% \noindent and additionally (for demonstration purposes)
% \begin{description}
% \item[-] package \xpackage{amsmath}, 2016/03/10, v2.15b,
%   \url{https://www.ctan.org/pkg/amsmath}
% \item[-] package \xpackage{relsize}, 2013/03/29, v4.1,
%   \url{https://www.ctan.org/pkg/relsize}
% \end{description}
%
% As possible alternatives to \xpackage{uri} in section \ref{sec:Alternatives}
% there are listed
% \DescribeMacro{aurl}
% \DescribeMacro{doi}
% \DescribeMacro{doipubmed}
% \begin{description}
% \item[-] package \xpackage{aurl}, 2016/08/12, v?.?,
%   \url{https://www.ctan.org/pkg/aurl}
%
% \item[-] package \xpackage{doi}, 2007/07/24, v?.?,
%   \url{https://www.ctan.org/pkg/doi}
%
% \item[-] package \xpackage{doipubmed}, 2007/08/20, v1.01,
%   \url{https://www.ctan.org/pkg/doipubmed}
% \end{description}
%
% \DescribeMacro{Oberdiek}
% \DescribeMacro{holtxdoc}
% \DescribeMacro{kvoptions}
% All packages of \textsc{Heiko Oberdiek}'s bundle `oberdiek'
% (especially \xpackage{holtxdoc} and \xpackage{kvoptions})
% are also available in a TDS compliant ZIP archive:\newline
% \url{http://mirror.ctan.org/install/macros/latex/contrib/oberdiek.tds.zip}.\newline
% It is probably best to download and use this, because the packages in there
% should be both recent and compatible.
%
% \DescribeMacro{M\"{u}nch}
% A list of my packages can be found at \url{https://www.ctan.org/author/muench-hm}.
%
% \subsection{Package, unpacking TDS}
% \paragraph{Package.} This package is available on \url{https://www.CTAN.org}.
% \begin{description}
% \item[\url{http://mirror.ctan.org/macros/latex/contrib/uri/uri.dtx}]\hspace*{0.1cm}
%       The source file.
% \item[\url{http://mirror.ctan.org/macros/latex/contrib/uri/uri.pdf}]\hspace*{0.1cm}
%       The documentation.
% \item[\url{http://mirror.ctan.org/macros/latex/contrib/uri/uri-example.pdf}]\hspace*{0.1cm}
%       The compiled example file, as it should look like.
% \item[\url{http://mirror.ctan.org/macros/latex/contrib/uri/README}]\hspace*{0.1cm}
%       The README file.
% \end{description}
% There is also a uri.tds.zip available:
% \begin{description}
% \item[\url{http://mirror.ctan.org/install/macros/latex/contrib/uri.tds.zip}]\hspace*{0.1cm}\newline
%       Everything in TDS compliant, compiled format.
% \end{description}
% which additionally contains\newline
% \begin{tabular}{ll}
% uri.ins         & The installation file.\\
% uri.drv         & The driver to generate the documentation.\\
% uri.sty         &  The \xext{sty}le file.\\
% uri-example.tex & The example file.%
% \end{tabular}
%
% \bigskip
%
% \noindent For required other packages, see the preceding subsection.
%
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
% \docstrip{} archive. The files are extracted by running the
% \xfile{.dtx} through \plainTeX:
% \begin{quote}
%   \verb|tex uri.dtx|
% \end{quote}
%
% About generating the documentation see paragraph~\ref{GenDoc} below.\newline
%
% \paragraph{TDS.} Now the different files must be moved into
% the different directories in your installation TDS tree
% (also known as \xfile{texmf} tree):
% \begin{quote}
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
%   uri.sty & tex/latex/uri.sty\\
%   uri.pdf & doc/latex/uri.pdf\\
%   uri-example.tex & doc/latex/uri-example.tex\\
%   uri-example.pdf & doc/latex/uri-example.pdf\\
%   uri.dtx & source/latex/uri.dtx\\
% \end{tabular}^^A
% }^^A
% \sbox0{\t}^^A
% \ifdim\wd0>\linewidth
%   \begingroup
%     \advance\linewidth by\leftmargin
%     \advance\linewidth by\rightmargin
%   \edef\x{\endgroup
%     \def\noexpand\lw{\the\linewidth}^^A
%   }\x
%   \def\lwbox{^^A
%     \leavevmode
%     \hbox to \linewidth{^^A
%       \kern-\leftmargin\relax
%       \hss
%       \usebox0
%       \hss
%       \kern-\rightmargin\relax
%     }^^A
%   }^^A
%   \ifdim\wd0>\lw
%     \sbox0{\small\t}^^A
%     \ifdim\wd0>\linewidth
%       \ifdim\wd0>\lw
%         \sbox0{\footnotesize\t}^^A
%         \ifdim\wd0>\linewidth
%           \ifdim\wd0>\lw
%             \sbox0{\scriptsize\t}^^A
%             \ifdim\wd0>\linewidth
%               \ifdim\wd0>\lw
%                 \sbox0{\tiny\t}^^A
%                 \ifdim\wd0>\linewidth
%                   \lwbox
%                 \else
%                   \usebox0
%                 \fi
%               \else
%                 \lwbox
%               \fi
%             \else
%               \usebox0
%             \fi
%           \else
%             \lwbox
%           \fi
%         \else
%           \usebox0
%         \fi
%       \else
%         \lwbox
%       \fi
%     \else
%       \usebox0
%     \fi
%   \else
%     \lwbox
%   \fi
% \else
%   \usebox0
% \fi
% \end{quote}
% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
% TDS installing feature, then some files can already be in the right
% place, see the documentation of \docstrip.
%
% \subsection{Refresh file name databases}
%
% If your \TeX~distribution (\TeX{} Live, \mikTeX, \teTeX, \dots) relies on
% file name databases, you must refresh these. For example, \teTeX{} users run
% \verb|texhash| or \verb|mktexlsr|.
%
% \subsection{Some details for the interested}
%
% \paragraph{Unpacking with \LaTeX{}.}
% The \xfile{.dtx} chooses its action depending on the format:
% \begin{description}
% \item[\plainTeX:] Run \docstrip{} and extract the files.
% \item[\LaTeX:] Generate the documentation.
% \end{description}
% If you insist on using \LaTeX{} for \docstrip{} (really,
% \docstrip{} does not need \LaTeX ), then inform the autodetect routine
% about your intention:
% \begin{quote}
%   \verb|latex \let\install=y\input{uri.dtx}|
% \end{quote}
% Do not forget to quote the argument according to the demands
% of your shell.
%
% \paragraph{Generating the documentation.\label{GenDoc}}
% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
% the documentation. The process can be configured by a
% configuration file \xfile{ltxdoc.cfg}. For instance, put the following
% line into this file, if you want to have A4 as paper format:
% \begin{quote}
%   \verb|\PassOptionsToClass{a4paper}{article}|
% \end{quote}
%
% \noindent An example follows how to generate the
% documentation with \pdfLaTeX :
%
% \begin{quote}
%\begin{verbatim}
%pdflatex uri.drv
%makeindex -s gind.ist uri.idx
%pdflatex uri.drv
%makeindex -s gind.ist uri.idx
%pdflatex uri.drv
%\end{verbatim}
% \end{quote}
%
% \subsection{Compiling the example}
%
% The example file, \xpackage{uri-example.tex}, can be compiled via\newline
% \indent \verb|(pdf)latex uri-example.tex|\newline
% but will need probably three compiler runs to get everything right.
%
% \section{Acknowledgements}
%
% I (H.-Martin M\"{u}nch) would like to thank \textsc{Heiko Oberdiek}
% for providing a~lot~(!) of useful packages (from 
% which I also got everything I know about creating a file in \xfile{dtx}
% format, ok, say it: copying), \textsc{Frank Mittelbach} for several bug reports
% and for code for improving the package, \textsc{Volker RW Schaa} for a bug report,
% everybody of the CTAN team for managing CTAN, and the
% \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex}
% newsgroups and everybody at \url{https://tex.stackexchange.com/}
% for their help in all things \hbox{\TeX{}.}
%
% \phantomsection
% \begin{History}\label{History}
%   \begin{Version}{2011/03/04 v1.0a}
%     \item First version of this package.
%   \end{Version}
%   \begin{Version}{2011 -- 2018 v1.0\ldots}
%     \item Several versions, which where not officially published.
%   \end{Version}
%   \begin{Version}{2018/09/01 v2.0a}
%     \item Now using the \xpackage{pdflscape} package instead of \xpackage{lscape} package.
%     \item The \xpackage{holtxdoc} package was fixed (recent: 2011/02/04, v0.21), therefore
%             the warning in \xfile{drv} could be removed.-- Adapted the style of this
%             doc\-u\-ment\-a\-tion to new \textsc{Oberdiek} \xfile{dtx} style.
%     \item Made |\newcommand|s robust.
%     \item OCLC and WebCite added; alternative package aurl added,
%           URLs and documentation updated.
%     \item Name-to-Thing resolver added to the example.
%     \item XMPP removed due to changes at XMPP.
%     \item New \verb|\urisetup| to be able to use complicated pre/post text
%           (and change it mid-document!).
%     \item Added an optional argument to \verb|\mailto| for providing the e-mail's subject.
%     \item Options tinypre, tinypre, tinypost, tinyppost, and tinyppre
%            replaced by tinyuripre, tinyuripre, tinyuripost, tinypuripost, and tinypuripre,
%            because the commands are \verb|tinyuri| and \verb|tinypuri|.
%     \item Bugs fixed.
%   \end{Version}
%   \begin{Version}{2018/09/06 v2.0b}
%     \item Bug fix: README file format, .tds placement, wrong word, OID not n2t, description.
%   \end{Version}
% \end{History}
%
% \bigskip
%
% When you find a mistake or have a suggestion for an improvement of this package,
% please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.)
%
% \PrintIndex
%
% \Finale
\endinput