| 1 |
\ProvidesFile{texlinks.tex}[2015/05/24 documenting texlinks.sty] |
| 2 |
\title{{\Huge\textsf{texlinks.sty}}\\---\\\TeX-Related Links |
| 3 |
for \textsf{hyperref}, \textsf{blog.sty}\\ |
| 4 |
(and maybe more)\thanks{This |
| 5 |
document describes version |
| 6 |
\textcolor{blue}{\UseVersionOf{\jobname.sty}} |
| 7 |
of \textsf{\jobname.sty} as of \UseDateOf{\jobname.sty}.}} |
| 8 |
% \listfiles |
| 9 |
{ \RequirePackage{makedoc} \ProcessLineMessage{} |
| 10 |
% %% 2011/01/24: |
| 11 |
\MakeJobDoc{17}% %% 2011/01/24 |
| 12 |
{\SectionLevelThreeParseInput} |
| 13 |
% \renewcommand*{\mdSectionLevelOne}{\string\subsection} |
| 14 |
% \renewcommand*{\mdSectionLevelTwo}{\string\subsubsection} |
| 15 |
% % \renewcommand*{\mdSectionLevelThree}{\string\paragraph} |
| 16 |
% \HeaderLines{2} |
| 17 |
% \MakeSingleDoc{wikimed.sty} |
| 18 |
} |
| 19 |
\documentclass[fleqn]{article} %% TODO paper dimensions!? |
| 20 |
\input{makedoc.cfg} %% shared formatting settings |
| 21 |
\newcommand*{\xmltagcode}[1]{\texttt{<#1>}} |
| 22 |
\providecommand*{\CTAN}{\acro{CTAN}} |
| 23 |
\providecommand*{\HTML}{\acro{HTML}} |
| 24 |
\providecommand*{\URL} {\acro{URL}} |
| 25 |
\providecommand*{\TUG} {\acro{TUG}} |
| 26 |
\providecommand*{\ctanpkgdref}[1]{% |
| 27 |
\ctanpkgref{#1}\,\urlfoot{CtanPkgRef}{#1}} |
| 28 |
\providecommand*{\secref}[1]{Section~\ref{sec:#1}} %% 2012/12/15 |
| 29 |
\providecommand*{\codedots}{\code{...}} %% 2012/12/18 |
| 30 |
%% TODO following to new `makedox.sty' 2012/12/30 |
| 31 |
%% {example} 2012/12/19, more 2013/01/20: |
| 32 |
\setlength\labelsep{.6667em} |
| 33 |
\newenvironment*{singthm}[1] |
| 34 |
{\trivlist \item[\skiplabelsep\bf #1]} |
| 35 |
{\endtrivlist} |
| 36 |
\newenvironment*{example}{\singthm{Example:}}{\endtrivlist} |
| 37 |
\newcommand*{\skiplabelsep}{\hskip\labelsep} |
| 38 |
\newcommand*{\simpleexample}[1]{% |
| 39 |
{\example\simplecodefbox{#1}\skiplabelsep |
| 40 |
for\skiplabelsep \simplecodeoutfbox{#1}% |
| 41 |
\endexample}} |
| 42 |
\newcommand*{\simplecodefbox}[1]{% %% 2012/12/30 |
| 43 |
\fbox{\def~{\string~}%% TODO etc. |
| 44 |
\strut\CmdSyntaxVerb#1}} |
| 45 |
\newcommand*{\simplecodeoutfbox}[1]{% |
| 46 |
\fbox{\MakeActiveLetHere\&\empty \strut %% 2015/05/21: |
| 47 |
% \pdfstringdefDisableCommands{\MakeActiveLetHere\&\PDFempty}% |
| 48 |
\let\nvCSV\empty |
| 49 |
#1}} |
| 50 |
% \newcommand*{\PDFempty}{\134} |
| 51 |
\newlet\nvCSV\CmdSyntaxVerb |
| 52 |
\newenvironment*{simpleexamples}{% |
| 53 |
\fboxrule=0pt |
| 54 |
\let\simpleexample\innersimpleexample %% 2015/05/21 |
| 55 |
%% <- TODO by Plain TeX -> |
| 56 |
\center\strong{Examples}\\[\topsep]% |
| 57 |
\def\arraystretch{1.5} |
| 58 |
\tabular{|l|l|}% |
| 59 |
\hline |
| 60 |
% \exampletitlefbox{\strong{Code}}\endcell |
| 61 |
% \exampletitlefbox{\strong {Outcome}}\cr\hline\hline}{% |
| 62 |
%% 2015/05/21: |
| 63 |
\exampletitlefbox{\strong{Code:}}\endcell |
| 64 |
\exampletitlefbox{\strong{clickable:}}\cr\hline\hline}{% |
| 65 |
\endtabular |
| 66 |
\endcenter} |
| 67 |
\newcommand*{\exampletitlefbox}[1]{% |
| 68 |
\fbox{\exampletablenarrow#1\exampletablenarrow}} |
| 69 |
\newcommand*{\exampletablenarrow}{\kern-.3333em} %% 2015/05/21 |
| 70 |
\newcommand*{\innersimpleexample}[1]{% |
| 71 |
% \hskip-\fboxsep %% ?? 2015/05/21 |
| 72 |
\exampletablenarrow |
| 73 |
\simplecodefbox{#1}\exampletablenarrow\endcell |
| 74 |
\exampletablenarrow |
| 75 |
\simplecodeoutfbox{#1}\exampletablenarrow\cr |
| 76 |
\hline} |
| 77 |
\newcommand*{\simpleyields}[1]{% %% 2012/12/30 |
| 78 |
\simplecodefbox{#1} yields \simplecodeoutfbox{#1}} |
| 79 |
\newcommand*{\longsimpleexample}[1]{% %% 2015/05/22f. |
| 80 |
\example\leavevmode\[\simplecodefbox{#1}\]% |
| 81 |
\makebox[\mathindent][l]{for}\simplecodeoutfbox{#1}% |
| 82 |
\endexample} |
| 83 |
% %% 2015/05/23: |
| 84 |
% \newcommand*{\titlefootnote}[1]{% |
| 85 |
% \IfTypesetting{\footnote{#1}{}}} |
| 86 |
% \makeatletter |
| 87 |
\pdfstringdefDisableCommands{\let\titlefootnote\@gobble} |
| 88 |
\makeatother |
| 89 |
\RequirePackage{filesdo} \MDfinaldatechecks %% 2012/12/20 |
| 90 |
\sloppy |
| 91 |
\begin{document} |
| 92 |
\maketitle |
| 93 |
\begin{MDabstract} |
| 94 |
'texlinks.sty' provides a couple of shorthands for making hyperlinks |
| 95 |
with \ctanpkgref{hyperref}'s\urlpkgfoot{hyperref} `\href' command, |
| 96 |
linking to \URL s %% \ 2012/12/15 |
| 97 |
that one often refers to in discussing \TeX-related material. |
| 98 |
\URL s for \TUG\ material %% Especially -> \URL s to 2012/12/16 |
| 99 |
(including texhax postings and |
| 100 |
\TUG boat articles) and %% \ 2012/12/15 |
| 101 |
\CTAN\ pages (package descriptions, directories, Catalogue), |
| 102 |
% are supported, also %% rm. 2012/12/16 |
| 103 |
the \acro{UK~FAQ}, %% \acro 2012/12/15 |
| 104 |
the \LaTeX\ |
| 105 |
and the \TeX\ %% 2012/12/16 |
| 106 |
Wikibook, %% 2011/08/27 |
| 107 |
and Wikipedia |
| 108 |
(where much \TeX-related software is described in a |
| 109 |
visually appealing manner) |
| 110 |
are generated from minimal identifiers by pure expansion. %% 2012/12/16 |
| 111 |
% However, up to now %% rm. 2012/12/16 |
| 112 |
I have used them for documenting my packages %% 2012/12/16 |
| 113 |
(\acro{PDF}) as well as for %% 2012/12/16 |
| 114 |
\HTML\ overviews generated with 'blog.sty'. %% rm. \emph 2012/12/16 |
| 115 |
They may furthermore %% was "as well" 2012/12/17 |
| 116 |
be useful with better known (and better developed) |
| 117 |
\TeX\,$\to$\,\HTML\ software such as %% \HTML 2012/12/15 |
| 118 |
\ctanpkgdref{tex4ht} or %% d 2012/12/16 |
| 119 |
\CtanPkgRef{latex2html}{LaTeX2HTML}% |
| 120 |
\,\urlpkgfoot{latex2html} %% \, 2012/12/16 |
| 121 |
(I don't know, doubt latter). %% doubt 2012/12/16 |
| 122 |
\MDaddtoabstract{Related packages} %% 2012/12/28 |
| 123 |
\ctanpkgref{uri}, \ctanpkgref{url} |
| 124 |
\end{MDabstract} |
| 125 |
|
| 126 |
\tableofcontents |
| 127 |
|
| 128 |
\newpage |
| 129 |
\section{Related Packages} %% 2012/12/30 |
| 130 |
\begin{itemize} |
| 131 |
\item \ctanpkgauref{muench-hm}{Martin M\"unch}'s %% u after \" 2012/12/31 |
| 132 |
\ctanpkgref{uri} provides links for |
| 133 |
scientific online publications. %% TODO landscape? |
| 134 |
\item \ctanpkgauref{arseneau}{Donald Arseneau}'s |
| 135 |
\ctanpkgref{url} is about \emph{typesetting} \URL s, |
| 136 |
especially allowing linebreaks. It becomes relevant for |
| 137 |
'texlinks' in \secref{fonts}. |
| 138 |
\end{itemize} |
| 139 |
|
| 140 |
\section{Usage} |
| 141 |
The file 'texlinks.sty' is provided ready, installation only requires |
| 142 |
putting it somewhere where \TeX\ finds it |
| 143 |
(which may need updating the filename data |
| 144 |
base).\urlfoot{ukfaqref}{inst-wlcf} |
| 145 |
% \footnote{\url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf}} |
| 146 |
|
| 147 |
Below the `\documentclass' line(s) and above `\begin{document}', |
| 148 |
you load 'texlinks.sty' (as usually) by |
| 149 |
\begin{verbatim} |
| 150 |
\usepackage{texlinks} |
| 151 |
\end{verbatim} |
| 152 |
Package options and user commands are described near their definitions |
| 153 |
below in the implementation section. |
| 154 |
|
| 155 |
\section{Preliminaries} |
| 156 |
%% <- 2013/01/21 for \newlet -> |
| 157 |
\subsection{Package File Header (Legalese)} %% ize -> ese 2012/11/09 |
| 158 |
\input{texlinks.doc} |
| 159 |
|
| 160 |
% \section{\file{wikimed.sty}} |
| 161 |
% \ResetCodeLineNumbers |
| 162 |
% \input{wikimed.doc} |
| 163 |
|
| 164 |
%% rm. 2012/12/30 for \MDfinaldatechecks: |
| 165 |
% \ModDates |
| 166 |
% \CheckDateOfPDFmod{texlinks.sty} |
| 167 |
% \CheckDateOfPDFmod{texlinks.tex} |
| 168 |
\end{document} |
| 169 |
|
| 170 |
VERSION HISTORY |
| 171 |
|
| 172 |
2011/01/24 for v0.1, very first |
| 173 |
2011/01/27 for v0.2, use \urlfoot{ukfaq} |
| 174 |
2011/07/23 using \acro |
| 175 |
2011/08/27 mentioning LaTeX Wikibook in abstract |
| 176 |
2011/09/03 \Huge first line |
| 177 |
2011/10/10 [fleqn] |
| 178 |
2011/10/20 \HTML, \URL |
| 179 |
2012/11/09 Legalize -> Legalese |
| 180 |
2012/11/28 \ctanpkgdref |
| 181 |
2012/12/01 date checks |
| 182 |
2012/12/15 \secref, more \acro and \HTML, \TUG |
| 183 |
2012/12/16 mod. abstract |
| 184 |
2012/12/17 color.sty obsolete, \pdfstringDisable..., mod. abstract |
| 185 |
2012/12/18 \secref \provide'd only, \codedots, rm. \pdfstring... |
| 186 |
2012/12/19 {example} etc. |
| 187 |
2012/12/20 filedate checks again |
| 188 |
2012/12/28 folding example defs, {MDabstract} |
| 189 |
2012/12/29 {simpleexamples} |
| 190 |
2012/12/30 \simplecodefbox etc., \simpleyields |
| 191 |
2012/12/31 corr. M\"unch; see sec:fonts |
| 192 |
2013/01/20 {singthm} |
| 193 |
2013/01/21 \section{Preliminaries} |
| 194 |
2015/03/28 wikimed.sty |
| 195 |
2015/05/21 \awfulsimpleexample -- replaced by \nvCSV, |
| 196 |
\longsimpleexample, \exampletablenarrow |
| 197 |
2015/05/22 \longcodesimpleexample corrected |
| 198 |
2015/05/23 -> longsimpleexample |