\NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. \ProvidesPackage{texlinks}[2012/12/08 v0.71 TeX-related links (UL)] %% copyright (C) 2011 2012 Uwe Lueck, %% http://www.contact-ednotes.sty.de.vu %% -- author-maintained in the sense of LPPL below. %% %% This file can be redistributed and/or modified under %% the terms of the LaTeX Project Public License; either %% version 1.3c of the License, or any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% We did our best to help you, but there is NO WARRANTY. %% %% Please report bugs, problems, and suggestions via %% %% http://www.contact-ednotes.sty.de.vu %% %% == Outline == %% % Almost %% 2011/07/23 %% % all the %% including https 2011/08/27 %% The link macros of 'texlinks' are based on macros %% |\httpref| and |\httpsref|. For use of 'texlinks' with 'blog.sty', %% the latter provides definitions of `\httpref' and `\httpsref' %% suitable for \HTML, where a choice of opening a new %% tab or window---or not---is relevant. %% %% For use with 'hyperref' (or ...?), 'texlinks' may %% provide definitions of `\httpref' and `\httpsref' %% based on `\href'. The decision to do so or not may happen at %% `\begin{document}'. 'blog.sty' generates \HTML\ without %% using the `{document}' environment, so we might assume %% that when `\begin{document}' is found, we are running %% 'hyperref', or just \emph{something} that provides a %% useful `\href'. We might then execute a definition of %% `\httpref' in terms of `\href'. Well, not sure ... %% %% Moreover, a \acro{PDF} file with links may be \emph{printed}, %% and klicking the links on the paper may fail. %% \URL s in main text, on the other hand, sometimes are %% troublesome. I consider it a good idea to present %% links with their \URL\ as the displayed text in \emph{footnotes} %% (or endnotes). It may even be useful with \HTML\ to present %% the \URL s displayed in some %% %% 2011/01/27: %% rm. 2011/10/20 %% ``appendix."---This idea has been resumed in v0.2 only, %% |\urlfoot|. %% % %% % I tend to introduce something for this ... and there might be a %% % package option forcing `\httpref' to use this style. %% % Well, better \emph{not today} ... [2011/01/24, TODO] %% %% == Package Options == %% Somebody may want to suppress a definition of `\httpref' %% at `\begin{document}' ... [2011/01/24, TODO] %% %% 2011/02/10: %% %% v0.3: Package option |[blog]| suppresses \emph{any} %% `\AtBeginDocument' actions---fine for use with 'blog.sty'. \DeclareOption{blog}{\let\AtBeginDocument\@gobble} %% This option may be improved, and another option may be %% useful for different purposes than running 'blog.sty'. \ProcessOptions %% %% == Fonts for \URL s and File/Package Names == %% %% ** Fonts for \URL s, File Names, and Package Names ** %% %% new 2011/10/19, TODO: `meansltx'? vgl. `makedoc.cfg' %% This section ``provides" markup for displaying \URL s (|\urlfmt|), %% file names (|\filenamefmt|---thinking of single files %% that may be found in the internet or on your computer---, %% and ``packages" (|\pkgnamefmt|). %% For the latter two, in certain files I use shorthands %% |\file| and |\pkg|, resp., ... %% (Not sure about `\providecommand' TODO ...) %% %% TODO "fallback" with 'provlast' %% %% It is usual to use `\texttt' for formatting \TeX\ code %% (``verbatim", `\verb' etc.). It may also be common to use %% `\texttt' for file names, perhaps even for \URL s. %% Therefore we provide |\urlfmt{}| as follows: \providecommand*{\urlfmt}{\texttt} %% The file name format |\filenamefmt{}| %% may differ from the format for \URL s---if somebody %% wants/adjusts it, \emph{here} it is the \emph{same:} \providecommand*{\filenamefmt}{\texttt} %% ... %% I favour `\code' over `\texttt' as ``logical markup," %% inspired by the \xmltagcode{code} element in \HTML, %% but it is too difficult to provide this right now here ... %% %% %% Instead of |\pkgnamefmt{}|, %% %% 'blog.sty' had `\pkg{}', %% was `prg' 2011/10/20 %% %% without a proper implementation. %% |\pkgnamefmt{}| displays the name of a ``package". %% Using `\textsf' for `\pkgnamefmt' %% seems to conform to common practice today---implemented here. %% The following code may later be suppressed at some package options, %% as with the choice for `\httpref': %% TODO 2011/01/24 % \@ifdefinable\pkgnamefmt {\let\pkgnamefmt\@firstofone} % \AtBeginDocument {\let\pkgnamefmt\textsf} %% <- This was here until v0.7, makes a difference for \acro{PDF} %% vs.\ 'blog' \HTML. Now we choose the same as with `\urlfmt': \providecommand*{\pkgnamefmt}{\textsf} %% Indeed, the same day we are providing `\textsf' in 'blog.sty'. %% However, the rationale of the earlier solution was %% that web pages use sans-serif as the \emph{normal} font ... %% %% %% moving \httpsref 2011/08/27: %% == Providing &\httpref\ and &\httpsref == %% %% rm. \kern-\baselineskip 2011/10/10 %% \[|\httpref{}{}|\] %% should display %% as a link to `http://'; %% \[|\httpsref{}{}|\] %% is the obvious analogue for `https:' \URL s. %% In case `\begin{document}' is found with a definition of %% `\href' present, we provide definitions of `\httpref' %% and `\httpsref' in terms of `\href' there: \AtBeginDocument{% \@ifundefined{href}{% % \PackageError ... TODO!? 2011/01/24 }{\newcommand*{\httpref} [1]{\href {http://#1}}% \newcommand*{\httpsref}[1]{\href{https://#1}}}} %% %% == Variants of &\httpref\ and &\httpsref == %% |\NormalHTTPref| may be used as an alias for `\httpref' %% in situations where the latter has been redefined %% v0.2 %% (as in Section~\ref{sec:urlfoot}): \AtBeginDocument{%% TODO: options, guarded \let (mine, HO) \@ifdefinable\NormalHTTPref{\let\NormalHTTPref\httpref}} %% |\ithttpref{}{}| displays in italics: % \newcommand*{\ithttpref}[2]{\NormalHTTPref{#1}{\textit{#2}}} %% However, I seem never to have used it. And I would now %% prefer |\metahttpref| TODO ... %% %% === \URL s as Links === %% With |\urlhttpref{}|, that \URL\ is displayed: \newcommand*{\urlhttpref}[1]{% \NormalHTTPref{#1}{\urlfmt{\httpprefix#1}}} %% %% moved up here 2011/10/20 %% In 'blog.sty' (as of 2010/05/26), there was a command %% `\urlref' instead of `\urlhttpref'. It did not provide `\urlfmt'. %% %% |\httpprefix| is an idea that was missing in 'blog.sty' up to v0.3. %% It may be used to determine generally whether a display of an %% \URL\ should include `http://'. I choose as default what was default %% in 'blog.sty' %% (i.e., ``don't include"): %% add. 2011/01/27 \@ifdefinable\httpprefix{\let\httpprefix\@empty} %% TODO cf. above %% `\let\httpprefix\relax' would be bad for 'blog.sty' %% (would display `\relax'), %% while it would be somewhat more efficient.%%%---%%% %% %% Now you may customize `\httpprefix' by %% \[`\renewcommand{\httpprefix}{http://}'\] %% %% v0.2: %% ---or by `\let\httpprefix'|\theHTTPprefix|: \newcommand*{\theHTTPprefix}{http://} %% With |\urlhttpsref{}|, we \emph{force} displaying \qtd{`https://'}: \newcommand*{\urlhttpsref}[1]{\httpsref{#1}{\urlfmt{https://#1}}} %% %% === Linking \URL s in Footnotes === %% 2011/08/27 %% \label{sec:urlfoot} %% |\foothttpurlref{}| just is like %% `\footnote{\urlhttpref{}}': \newcommand*{\foothttpurlref}[1]{\footnote{\urlhttpref{#1}}} %% |\urlfoot{}{}| %% redefines `\httpref' so that you can use all the shorthand %% macros based on `\httpref' to get the according \URL\ %% display (as provided by `\urlhttpref') %% in a footnote without the need to include the %% entire \URL\ in your source code. `\urlfoot' is available %% with and %% when a shorthand |\{}{}| has been defined %% where `\' is the macro name and is the target %% identifier (usually part of the \URL\ generated from ) %% according to the syntax declaration of `\'. \newcommand*{\urlfoot}[2]{{% \let\httpref\foothttpurlref \let\httpprefix\theHTTPprefix %% TODO customizable!? \csname #1\endcsname{#2}{}}} %% \strong{Example:} %% \[`\CtanPkgRef{morehype}{MoreHype}' %% \mbox{\quad and\quad } `\ctanpkgref{morehype}'\] %% are provided below for linking to %% `http://ctan.org/pkg/morehype'. %% \begin{itemize} %% \item Try `CtanPkgRef' \emph{here}: %% \CtanPkgRef{morehype}{MoreHype},\\ %% for the \emph{footnote} try %% `\urlfoot{CtanPkgRef}{morehype}';%%% %% \urlfoot{CtanPkgRef}{morehype} %% \item try `ctanpkgref' \emph{here}: \ctanpkgref{morehype},\\ %% for the \emph{footnote} try %% `\urlfoot{ctanpkgref}{morehype}'.%%% %% \urlfoot{ctanpkgref}{morehype} %% \end{itemize} %% The lonely \qtd{\pkgnamefmt{morehype}} you see there above %% demonstrates that it doesn't work with `ctanpkgref' because %% `\ctanpkgref' doesn't have separate arguments for %% and , it actually doubles . %% A local `\let\ctanpkgref\CtanPkgRef' could help, %% but right now I prefer waiting for a better idea. %% [TODO] %% 2011/01/27 %% %% v0.3: Now that using `\urlfoot' and `ctanpkgref' together %% is so clumsy, while I use it quite often, %% 2011/02/10 %% we get |\urlpkgfoot{}|, abbreviating %% `\urlfoot{CtanPkgRef}{}': \newcommand* {\urlpkgfoot} {\urlfoot{CtanPkgRef}} %% === \URL\ Bases === %% 2012/03/09 %% \label{sec:bases} %% We typically refer to many web pages under a certain domain, %% or in certain subdirectories there. Before v0.6, %% I made many definitions like %% \[`\newcommand*{\myref}[1]{\httpref{/#1}}'\] %% for this purpose. %% Storing the definition of such a `\myref' uses 6 tokens %% (including parameter text---TODO) in addition to those from . %% With %% \[`\newcommand*{\myref}{\httpbaseref{}'\] %% we need 3 tokens instead, using |\httpbaseref{}{}| %% defined as follows: \newcommand*{\httpbaseref}[2]{\httpref{#1/#2}} %% We change many definitions in ensuing sections accordingly. %% %% The situation is similar with (many) anchors of a (large) web page. %% With v0.6, we introduce |\httpancref{}{}|---perhaps, %% with `\mirrorctanref' (Sec.~\ref{sec:bytopic}) etc.? TODO % \newcommand*{\httpancref}[2]{\httpref{#1\##2}} %% %% == Wikipedia == %% %% TODO separate wikilink.sty? https:!? %% === Backbones === %% As of v0.6, we have a \dqtd{backbone} macro %% \[|\wikilangref{}{}{}|\] %% for links to Wikipedia. %% (It was |\wikiref| before, starting with v0.4---sorry!) %% consists of %% two characters like \lq`de'\rq\ for German Wikipedia articles %% or \lq`en'\rq\ for English ones. is the identifier of %% the article, and is displayed as the link: % \newcommand*{\wikilangref}[2]{\httpref{#1.wikipedia.org/wiki/#2}} %% <- 2012/03/09 etc. with Sec.~\ref{sec:bases} -> \newcommand*{\wikilangref}[1]{\httpbaseref{#1.wikipedia.org/wiki}} %% There is |\Wikilangref{}{}| %% for the case that and are the same. %% With v0.7 however, this command becomes more powerful, %% see Section~\ref{sec:pipe}. % \newcommand*{\Wikilangref}[2]{\wikilangref{#1}{#2}{#2}} %% `\wikilangref{}[]{}' would be nicer; %% %% <- shortened 2012/01/06 -> %% however, the present code is to work with 'blog.sty' %% which does not support optional arguments.%%%--- %% %% Quite often, programs share their names with movies, %% biological species, etc., then lemma disambiguation is required. %% Usually, we don't want to display the disambiguation. %% \[|\Wikilangdisambref{}{}{}|\] %% will link to %% \[`http://.wikipedia.org/wiki/_()'\] \newcommand*{\Wikilangdisambref}[3]{\wikilangref{#1}{#2 (#3)}{#2}} %% There %% was `Their' 2011/07/23 %% was something like a more general variant |\wikidisambref|, %% now I doubt its usefulness and \textcolor{blue}{omit} it %% in order to see where it occurs (2011/05/13). %% %% For \strong{anchors}, \qtd{&#} can be used with 'blog.sty'---and %% even with 'hyperref'. %% \par\smallskip\noindent %% \strong{Example:}\quad %% `\wikilangref{en}{TeX#History}{\TeX}' %% was wikilangenref 2012/05/13 %% \ for \ %% \wikilangref{en}{TeX#History}{\TeX}. %% %% === Piped Links === %% \label{sec:pipe} %% v0.7 emulates Wikipedia's %% \wikiref{Help:Links\#Piped_link}{piped links} %% was "Piped links" 2012/12/01 %% as with Wikipedia source code \[`[[Pipeline|Pipe]]'\] %% to get a link to article \qtd{\Wikiref{Pipeline}} %% \Wikiref 2012/12/01 %% with displayed text %% \qtd{\wikiref{Pipeline}{Pipe}}. The same syntax %% (double brackets) is actually supported by %% 'blog.sty' with 'markblog.sty', %% was `blogexec' 2012/12/06 %% while otherwise only %% \[\GenCmdBox+\Wikilangref{}{|}+\] %% works---with settings more below something like %% \GenCmdBox+\Wikiref{|}+---which %% admittedly is not much better than the equivalent %% \[`\wikiref{}{}'\] %% %% Even Wikipedia's feature that empty removes %% the disambiguation term as with `[[Pipe (computing)|]]' %% resulting in \qtd{\wikiref{Pipe (computing)}{Pipe}} %% is supported. \newcommand*{\Wikilangref}[2]{% \@wikilpref{#1}#2\BiteSep|\@nnil\BiteSep\@nil{#2}} %% I have introduced `\BiteSep' and this kind of parsing %% in the \ctanpkgdref{bitelist} package. \def\@wikilpref#1#2|#3\BiteSep#4\@nil#5{% \ifx\@nnil#3\@empty \wikilangref{#1}{#5}{#5}% \else \wikilangref{#1}{#2}{% \ifx\@three#3\@three \wiki@noparen#2\@nil% \else #3% \fi}% \fi} \def\wiki@noparen#1 (#2\@nil{#1} %% I have thought about improving 'bitelist.sty', resulting %% in the following code. In the present application, %% I do not consider it superior. It uses %% the same number of tokens but new one has additional %% expansion step. The situation is different to the general case %% because doing everything before `\fi' is okay here. % \newcommand*{\Wikilangref}[2]{% % \@wikilPref{#1}#2\BiteSep\@secondoftwo % |\BiteSep\@firstoftwo\@nil{#2}} % \def\@wikilPref#1#2|#3\BiteSep#4#5\@nil#6{% % #4{\wikilangref{#1}{#6}{#6}}% % {\wikilangref{#1}{#2}{% % \ifx\@three#3\@three % \wiki@noparen#2\@nil% % \else % #3% % \fi}}} %% %% === English and German === %% The next macros just save you from typing braces around %% the language codes for English and German: %% |\wikienref{}{}| refers to the English Wikipedia, %% |\wikideref{}{}| refers to the German one. \newcommand*{\wikideref}{\wikilangref{de}} \newcommand*{\wikienref}{\wikilangref{en}} %% |\Wikideref{}| refers to article in the German %% Wikipedia and displays as : \newcommand*{\Wikideref}{\Wikilangref{de}} %% |\Wikienref{}| is `\Wikideref''s analogue for English: \newcommand*{\Wikienref}{\Wikilangref{en}} %% |\Wikidedisambref{}{}| chooses a disambiguation %% according to for the German Wikipedia, %% |\Wikiendisambref{}{}| for the English one: \newcommand*{\Wikidedisambref}{\Wikilangdisambref{de}} \newcommand*{\Wikiendisambref}{\Wikilangdisambref{en}} %% %% === ``Implicit" Choice of Language === %% 2012/01/06 %% \label{sec:langcode} %% With v0.6, |\wikiref{}{}| works like %% \[`\wikilangref{}{}{}'\] %% ref 2012/10/24 %% when |\langcode| expands to %% (the two-letter language code according to \Wikiref{ISO 639-1}). %% The default for is \qtdcode{en} for English. %% It can be overridden even before loading 'texlinks' %% (e.g., by an earlier `\newcommand\langcode{de}'): \providecommand*{\langcode}{en} %% %% mod. 2012/10/24: %% For the German versions, use \ `\renewcommand{\langcode}{de}'. \ %% The \ctanpkgref{langcode} package provides a command \ %% |\uselangcode{}| \ that works like %% \ `\renewcommand*{\langcode}{}' \ %% and adjusts a number of other settings. \newcommand*{\wikiref}{\wikilangref\langcode} %% |\Wikiref| and |Wikidisambref| are the obvious analogues: \newcommand*{\Wikiref}{\Wikilangref\langcode} \newcommand*{\Wikidisambref}{\Wikilangdisambref\langcode} %% %% === Blanks and Umlauts in \URL s and Anchors === %% %% <- renamed 2011/05/17 reworked: %% |\underscorechar| seemed to be useful in macro %% definitions. The name was inspired by \LaTeX's %% `\@backslashchar' and `\@percentchar'. %% However, I am now trying what happens without it. %% It occurred in `blog.tex' for the documentation of %% the 'blog' package, but `\string_' seems to be a good %% replacement. % \newcommand \underscorechar {} % {\@makeother\_ \gdef\underscorechar{_}} %% Anyway, in my notes I have a more elegant macro for %% providing ``other" versions of special characters. %% %% Guessing what `\underscorechar' was good for (2011-05-17): %% Wikipedia lemmas and anchors often or even \emph{typically} %% contain \emph{blank spaces}. %% The Wikipedia software usually converts them into %% underscore characters. Blank spaces in \emph{lemmas} %% seem \emph{not} to need treatment here in 'texlinks'. %% However, Wikipedia also creates \emph{anchors} from %% \emph{section headings}, which typically contain blank spaces. %% This has been more difficult ... %% %% Likewise with umlauts: text encoding suffices for \emph{lemmas} %% (my `\urluml' is not needed for this purpose). %% But umlauts in \emph{anchors} %% generated from \emph{section headings} are different. %% While umlauts in \emph{lemmas} are represented by sequences %% starting with a \emph{percent} character, the anchors %% use a \emph{dot} instead of the percent character. %% Therefore now |\ancuml{}| is provided: \newcommand*{\ancuml}[1]{\csname ancuml:#1\endcsname} \@namedef{ancuml:a}{.C3.A4} \@namedef{ancuml:o}{.C3.B6} \@namedef{ancuml:u}{.C3.BC} \@namedef{ancuml:s}{.C3.9F} %% %% comments removed 2012/01/11: %% % What you read in the rest of the section is %% % \textcolor{blue}{wrong}, the commands are %% % \textcolor{blue}{dropped} for testing as of 2011/05/13. %% % |\itwikideref| is an italic variant of `\wikideref': % \newcommand*{\itwikideref}[2]{\wikideref{#1}{\textit{#2}}} %% % By analogy to `\Wikideref', %% % The following macros save you from typing the underscore %% % (didn't spaces suffice sometimes?) %% TODO 2011/01/24 %% % and the round parantheses. %% % Italic variant |\itwikienref| of `\wikienref' %% % ('blog.sty' had `\emwikienref' instead): % \newcommand*{\itwikienref}[2]{\wikienref{#1}{\textit{#2}}} %% % |\urluml{}| as of 2010/05/25 %% % (not sure if it ever worked or was actually needed): % \newcommand*{\urluml}[1]{\csname urluml:#1\endcsname} % \@namedef{urluml:a}{\#C3\#A4} % \@namedef{urluml:o}{\#C3\#B6} % \@namedef{urluml:u}{\#C3\#BC} % \@namedef{urluml:s}{\#C3\#9F} %% 2010/08/09 %% %% == \TeX-related == %% 2010/08/24 %% === \CTAN === %% ==== Directories and Files in a \TeX\ Archive ==== %% % `\newcommand*{\ctanref}[1]{\httpref{ctan.org/#1}}' %% % once was replaced in 'blog.sty' by what will now be %% |\tugctanref{}{}| %% makes a link %% to a \TeX~Archive directory or file : \newcommand*{\tugctanref}{\httpbaseref{tug.ctan.org/tex-archive}} %% Alternatively, you can refer to an (automatically chosen) %% \CTAN\ \emph{mirror} %% using %% \[|\mirrorctanref{}{}|.\] %% 2011/10/10 :->.2011/10/21: %% (I prefer the \emph{appearance} of the %% \tugctanref{}{\acro{TUG} archive}, designed by Jim Hefferon.) \newcommand*{\mirrorctanref}{\httpbaseref{mirror.ctan.org}} %% You may actually want to ``open" a file in %% on \CTAN, %% displayed as the link text, %% 2011/10/21 %% either by %% \[|\tugctanfileref{}{}|\] %% 2011/10/10 %% or (for a mirror) by %% \[|\mirrorctanfileref{}{}|.\] %% 2011/10/10 \newcommand*{\tugctanfileref}[2]{% \tugctanref{#1/#2}{\filenamefmt{#2}}} \newcommand*{\mirrorctanfileref}[2]{% \mirrorctanref{#1/#2}{\filenamefmt{#2}}} %% Typically, \LaTeX\ macro packages in `macros/latex/contrib/' %% are discussed, so here is |\ltxcontrib| saving a few characters: \newcommand*{\ltxcontrib}{macros/latex/contrib/} %% |\ctanref| works like `\tugctanref' or like `\mirrorctanref', %% depending on |\usetugctan| vs.\ |\usemirrorctan|. %% So in any case its syntax is \[|\ctanref{}{}|.\] %% Likewise, |\ctanfileref| works like %% \[`\tugctanfileref'\quad \mbox{or}\quad `\mirrorctanfileref',\] %% depending on the same `\usetugctan' vs.\ `\usemirrorctan', %% so the syntax is %% \[|\ctanfileref{}{}|\] \newcommand*{\ctanref}{} \newcommand*{\ctanfileref}{} \newcommand*{\usemirrorctan}{% \let \ctanref \mirrorctanref \let \ctanfileref \mirrorctanfileref} \newcommand*{\usetugctan}{% \let \ctanref \tugctanref \let \ctanfileref \tugctanfileref} %% |\usemirrorctan| is the \strong{default}, i.e., %% |\ctanref| and |\ctanfileref| use %% \urlhttpref{mirror.ctan.org}: \usemirrorctan %% \meta{Remark} (TODO): \ Another implementation I consider is %% using some `\ctanurl'\-`prefix' that you can redefine for %% accessing your favourite mirror. %% %% ==== J\"urgen Fenn's Topical \TeX\ Catalogue ==== %% \label{sec:bytopic} %% 2012/03/09 %% |\bytopicref{}{}| %% \ %% 2011/10/21 %% makes a link to of J\"urgen Fenn's %% Topical Index of the \TeX\ Catalogue. You find the %% by clicking at the respective \acro{TOC} entry on top of the page %% and then read the \URL\ from the browser's navigation display. \newcommand*{\bytopicref}[1]{% \mirrorctanref{help/Catalogue/bytopic.html\##1}} %% %% <- \mirrorctanref 2012/03/09 %% (Example:\quad `\bytopicref{html}{\acro{HTML}}' \ for \ %% \bytopicref{html}{\acro{HTML}}.) %% %% ==== Jim Hefferon's Package Descriptions ==== %% For v0.6 %% 2012/04/09 %% and in the spirit of Sec.~\ref{sec:bases}, %% we introduce an auxiliary %% \[|\ctanorgbaseref{}{}|:\] \newcommand*{\ctanorgbaseref}{\httpbaseref{ctan.org}} %% |\ctanpkgref{}| %% makes a link to the \CTAN\ package info page for %% the package . %% |\CtanPkgRef{}{}| %% is a variant for the cases where authors have a special idea %% using some capital letters when they describe their packages %% (ASCII versions of ``logos" such as `BibTeX') %% was Logos 2012/10/24 %% while the identifier doesn't allow capital letters. %% %% 2011/01/24: %% Also, may be a package from a \emph{bundle} %% where has a description page while %% doesn't have its \emph{own} description page %% (such as \CtanPkgRef{nicetext}{makedoc}---before 2012/04/10!). %% %% <- was `fifinddo' 2011/10/20, no with own id. \newcommand*{\CtanPkgRef}[2]{% \ctanorgbaseref{pkg/#1}{\pkgnamefmt{#2}}} \newcommand*{\ctanpkgref}[1]{\CtanPkgRef{#1}{#1}} %% |\ctanpkgstyref{}| %% 2012/11/27 %% adds \qtdcode{.sty} to the package name: \newcommand*{\ctanpkgstyref}[1]{\CtanPkgRef{#1}{#1.sty}} %% Jim Hefferon also offers pages listing %% of %% 2012/11/08 %% all the packages %% of a given author, accessible by her/his . %% |\ctanpkgauref{}{}| makes a link to that page: \newcommand*{\ctanpkgauref}[1]{\ctanorgbaseref{author/id/#1}} %% E.g., see \ctanpkgauref{lueck}{\emph{my}} packages. %% %% === Mailing Lists === %% \label{sec:mail} %% v0.7 relies on package \ctanpkgref{langcode} for %% |\enmonthname{}| and |\demonthname{}|, %% for tricks with language codes extending those in %% Section~\ref{sec:langcode}: \RequirePackage{langcode} %% The next definitions are backbones for generating links to %% web pages about \TeX\ mailing lists. %% |\TL@piper@parse--| will be used %% for referring to single postings: \def\TL@piper@parse#1-#2-#3/{#1-\enmonthname{#2}/#3} %% \[|\texlistyearmonthref{<2-digits>-}|\] %% will generate \ |{}| \ for linking to the list of postings %% of the th month in the year 20<2-digits>: \newcommand*{\texlistyearmonthref}[2]{\texlist@yearmonthref#1#2\@nil} \def\texlist@yearmonthref#1#2-#3\@nil{#1{20#2-\enmonthname{#3}}} %% \qtd{} will be \qtdcode{20<2-digits>-}, %% and will be the \emph{English} name of the %% th month of the year. %% %% \[|\texlanglistmonthref{<2-digits>-}|\] %% will generate \ |{}{}| \ %% where is determined from by : \newcommand*{\texlanglistmonthref}[3]{\texlanglistm@nthref#1#2#3\@nil} \def\texlanglistm@nthref#1#2#3-#4\@nil{% #2{20#3-\enmonthname{#4}}{#1{#4}}} %% |\detexlistmonthref{<2-digits>-}| \ %% now could be used for `{}{}' %% \emph{German} ... \newcommand*{\detexlistmonthref}{\texlanglistmonthref\demonthname} %% ... as could be \ |\entexlistmonthref{<2-digits>-}| \ %% for \emph{English} ... \newcommand*{\entexlistmonthref}{\texlanglistmonthref\enmonthname} %% With proper use of \ctanpkgref{langcode} however, %% \[|\texlistmonthref{<2-digits>-}|\] %% \emph{automatically} chooses between English and German %% (according to intention ...): \newcommand*{\texlistmonthref}{\texlanglistmonthref\monthname} %% %% === \CTAN\ Announcements === %% 2011/06/27 %% |\ctanannref{}{}| makes a link %% to the DANTE web page displaying a \CTAN\ %% announcement. You find by searching %% \[\texttt{https://lists.dante.de/pipermail/ctan-ann/}\] %% and then reading the \URL. %% is composed as %% \[`-/<6-digits>.html'\]%%%, \[\] 2012/10/24 %% %% 2012/10/24: %% where consists of 4 digits and is an \emph{English} %% month name: \newcommand*{\ctanannref}[1]{% \httpsref{lists.dante.de/pipermail/ctan-ann/#1}} %% |\ctanannpref{}{}| is a variant %% of `\ctanannref' where in place of %% you only type the third and fourth digit of the %% year (<2-digits>), then a \qtdcode{-}, then the (arabic) %% number of the month (cf. Section~\ref{sec:mail} so far), %% then another \qtdcode{-}, %% and then the actual internal identifier %% (a number of six digits preceding \qtdcode{.html} of the \URL). %% I.e., \qtd{} is \qtdcode{<2-digits>--}. \newcommand*{\ctanannpref}[1]{% \ctanannref{20\TL@piper@parse#1/.html}} %% `20' 2012/12/08 %% \[|\ctanannyearmonthref{<2-digits>-}|\] generates %% `\ctanannref{}' from \qtdcode{<2-digits>-}--- %% as in Section~\ref{sec:mail} ... \newcommand*{\ctanannyearmonthref}{\texlistyearmonthref\ctanannref} %% \[|\ctanannmonthref{<2-digits>-}|\] generates %% `\ctanannref{}{}' where obeys `\langcode' ... %% % from \qtdcode{<2-digits>-} \newcommand*{\ctanannmonthref}{\texlistmonthref\ctanannref} %% %% === \acro{TUG} === %% |\tugref{}{}| makes a link %% to on domain `tug.org': \newcommand*{\tugref}{\httpbaseref{tug.org}} %% ==== texhax ==== %% |\texhaxref{}{}| makes a link %% to the \acro{TUG} web page displaying %% a texhax posting. You find by searching %% `tug.org/pipermail/texhax/' and then reading the \URL. %% is composed as `-/<6-digits>.html'. \newcommand*{\texhaxref}[1]{\tugref{pipermail/texhax/#1}} %% |\THref{}| saves you from choosing %% and uses `texhax' instead. \newcommand*{\THref}[1]{\texhaxref{#1}{texhax}} %% (It was `\prg{texhax}' in 'blog.sty', to have something %% logo-like, without a good idea how to implement it.) %% %% |\texhaxpref{}{}| is a variant %% of `\texhaxref' where in place of %% you only type the third and fourth digit of the %% year, then a `-', then the (arabic) number of %% the month, then another `-', and then the actual %% internal identifier %% (a number of six digits preceding `.html' of the \URL). %% I made this macro because I prefer typing to copying %% from the \URL. \newcommand*{\texhaxpref}[1]{% %% 2010/09/07 \texhaxref{20\TL@piper@parse#1/.html}} %% 2011/05/03 %% TODO: `\texhaxPref#1' searches list of offsets %% to determine year/month from id ... %% %% \[|\texhaxyearmonthref{<2-digits>-}|\] generates %% `\texhaxref{}' from \qtdcode{<2-digits>-}--- %% as in Section~\ref{sec:mail} ... \newcommand*{\texhaxyearmonthref}{\texlistyearmonthref\texhaxref} %% \[|\texhaxmonthref{<2-digits>-}|\] generates %% `\texhaxref{}{}' where obeys `\langcode' ... \newcommand*{\texhaxmonthref}{\texlistmonthref\texhaxref} %% %% ==== Other ==== %% %% 2011/04/27 corr. doc. vol/issue %% |\tugbartref{tb-/}{}| %% makes a link to the TUGboat article %% `.pdf' in vol.~ and issue~: % \newcommand*{\tugbartref}[1]{\tugref{TUGboat/Articles/#1.pdf}} \newcommand*{\tugbartref}[1]{\tugref{TUGboat/#1.pdf}} %% %% <- 2011/04/30 %% |\tugiref{}{}| makes %% 2012/07/23 tugi 2012/08/05 %% a link to an %% on the \acro{TUG} web page entitled \qtd{TeX Resources on the Web} %% (e.g., \tugiref{web}{\qtd{Web Projects}}): \newcommand*{\tugiref}[1]{\tugref{interest.html\##1}} %% It was `\TUGIref' until v0.6, we keep this for compatibility %% (deprecated): \newcommand*{\TUGIref}{} \let\TUGIref\tugiref %% %% === \acro{UK FAQ} === %% |\ukfaqref{