From bddefbf234bbe8889456b2e1b09cce68cf590891 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 27 May 2013 01:20:56 +0000 Subject: skdoc 5/27 git-svn-id: svn://tug.org/texlive/trunk@30697 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/skdoc/README | 38 + Master/texmf-dist/doc/latex/skdoc/skdoc.pdf | Bin 185476 -> 178123 bytes Master/texmf-dist/source/latex/skdoc/skdoc.dtx | 1046 ++++++++++++++++++++---- Master/texmf-dist/tex/latex/skdoc/skdoc.cls | 555 ++++++++++--- 4 files changed, 1377 insertions(+), 262 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/skdoc/README diff --git a/Master/texmf-dist/doc/latex/skdoc/README b/Master/texmf-dist/doc/latex/skdoc/README new file mode 100644 index 00000000000..c1a5c43bd2c --- /dev/null +++ b/Master/texmf-dist/doc/latex/skdoc/README @@ -0,0 +1,38 @@ +%% skdoc documentation class +%% +%% Copyright (C) 2012-2013 by Simon Sigurdhsson +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 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 Simon Sigurdhsson. +%% +%% This work consists of the files skdoc.dtx +%% and the derived filebase skdoc.cls. + +This is version 1.3a of the skdoc document class. It is designed to +generate both documentation and derivative files using only LaTeX, +i.e. without using docstrip and ins/dtx files. + +The following files are enclosed. + + README - This file + Makefile - GNU Makefile for making the package and documentation + skdoc.dtx - LaTeX source code of the package + skdoc.pdf - PDF version of the documentation + +Installation notes: +The easiest way to install this package, assuming you have obtained the +source code from Github or CTAN, is to simply run `make install`. This +will generate package code and documentation, install it into TEXMFHOME +and run `mktexlsr`. If you wish to compile the package but not install +it, run `make all` instead. If you insist on doing it manually, remember +to run `tex` to generate the code, and `pdflatex` (or `latex`, if you +don't fancy PDFs) to generate the documentation. diff --git a/Master/texmf-dist/doc/latex/skdoc/skdoc.pdf b/Master/texmf-dist/doc/latex/skdoc/skdoc.pdf index 2c534d2255a..4217655a1d9 100644 Binary files a/Master/texmf-dist/doc/latex/skdoc/skdoc.pdf and b/Master/texmf-dist/doc/latex/skdoc/skdoc.pdf differ diff --git a/Master/texmf-dist/source/latex/skdoc/skdoc.dtx b/Master/texmf-dist/source/latex/skdoc/skdoc.dtx index e8fea60711c..afd57482a03 100644 --- a/Master/texmf-dist/source/latex/skdoc/skdoc.dtx +++ b/Master/texmf-dist/source/latex/skdoc/skdoc.dtx @@ -1,7 +1,7 @@ % \iffalse %% skdoc documentation class %% -%% Copyright (C) 2012 by Simon Sigurdhsson +%% Copyright (C) 2012-2013 by Simon Sigurdhsson %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -73,7 +73,7 @@ % %\ProvidesExplClass{skdoc} %<*class> - {2012/12/26}{1.0}{skdoc documentation class} + {2013/05/24}{1.3a}{skdoc documentation class} % % %<*driver> @@ -82,15 +82,20 @@ \IfFileExists{skdoc.cls}{}{ \msg_fatal:nn{skdoc-dtx}{not-installed} } +\cs_set_protected_nopar:Npn\ExplHack{ + \char_set_catcode_letter:n{ 58 } + \char_set_catcode_letter:n{ 95 } +} \ExplSyntaxOff \DeclareDocumentCommand\MakePercentIgnore{}{\catcode`\%9\relax} \DeclareDocumentCommand\MakePercentComment{}{\catcode`\%14\relax} \DeclareDocumentCommand\DocInput{m}{ \MakePercentIgnore\input{#1}\MakePercentComment } -\documentclass{skdoc} +\documentclass[highlight=false]{skdoc} \usepackage{hologo} \usepackage{booktabs} +\usepackage{csquotes} \usepackage[style=authoryear,backend=biber]{biblatex} %%\usepackage{chslacite} \begin{filecontents}{skdoc.bib} @@ -106,6 +111,14 @@ year = {2013}, url = {http://tex.stackexchange.com/a/89830/66} } +@manual{Rahtz10, + author = {Sebastian Rahtz and Herbert Vo\ss}, + title = {The \enquote{\textsf{fancyvrb}} package}, + subtitle = {Fancy Verbatims in \LaTeX}, + date = {2012-05-15}, + version = {2.8}, + url = {http://mirrors.ctan.org/macros/latex/contrib/fancyvrb/fancyvrb.pdf} +} \end{filecontents} \addbibresource{skdoc.bib} \OnlyDescription @@ -119,10 +132,15 @@ % {}{\small\pagemark} % \pagestyle{skdoc-class} % -% \version{1.0} +% \version{1.3a} % \changes{1.0}{Initial version} +% \changes{1.1}{Added support for syntax highlighting using \pkg{minted}} +% \changes{1.1a}{Deprecate the use of \pkg{bibtex} in favour of \pkg{biblatex}} +% \changes{1.2}{Use \pkg{l3prg} booleans instead of toggles} +% \changes{1.2b}{Use \pkg{inconsolata}. Don't use \pkg{ascii}} +% \changes{1.3}{Allow multiple targets per \env{MacroCode}} % -% \package[ctan=skbundle,vcs=https://github.com/urdh/skdoc]{skdoc} +% \package[ctan=skdoc,vcs=https://github.com/urdh/skdoc]{skdoc} % \repository{https://github.com/urdh/skdoc} % \title{The \thepkg{} document class} % \author{Simon Sigurdhsson} @@ -179,13 +197,27 @@ % % \subsection{Options} % \Option{load}\WithValues{\meta{package}}\AndDefault{\cs{jobname}} -% The \thepkg\ document class has only one option. The \opt{load} +% \label{ssec:options:load} The \opt{load} % option declares that if the package specified exists, it should % be loaded. This is intended to load any package provided in the % implementation, but requires that the documentation provides % stub variants of the macros used in the documentation so that -% \LaTeX\ still completes its first run. \Warning{The \opt{load} -% option will likely disappear in a future version.} +% \LaTeX\ still completes its first run. +% +% \Option{highlight}\WithValues{true,false}\AndDefault{true} +% \label{ssec:option:highlight} +% The \opt{highlight} option enables or disabled syntax highlighting +% of the implementation code. Highlighting is performed using +% \pkg{minted}, and falls back to no highlighting if there is no +% \cs{write18} access, if \pkg{minted} is unavailable or if the +% \texttt{pygmentize} binary can't be found. +% \Notice{On non-unix platforms, the test for \texttt{pygmentize} +% will likely fail. Therefore, syntax highlighting is not supported +% on such platforms.} +% +% Generally, there should be no reason to disable syntax highlighting +% unless the documentation describes a very large package, and the +% repeated calls to \texttt{pygmentize} take too long. % % \subsection{General macros} % The document class defines a number of general macros intended for @@ -383,7 +415,7 @@ % \label{tab:args} % \begin{tabular}{ll} % \toprule -% Invokation % Result \\ +% Invokation & Result \\ % \midrule % \Macro\marg{argument} & \marg{argument} \\ % \Macro\oarg{argument} & \oarg{argument} \\ @@ -394,6 +426,39 @@ % \end{tabular} % \end{table} % +% \subsubsection{Examples} +% \DescribeEnv[]{example} +% Perhaps the most powerful way to illustrate features of a package +% is to show their function by examples. This is made possible by +% the \env{example} environment. By enclosing example code in this +% environment, the actual code is typeset next to the result it would +% produce, as seen below\footnote{Note that the showcased \env{example} +% environment doesn't contain another \env{example} environment --- the +% environment is not intended to be nested inside itself.}\footnote{The +% percent characters in the example are caused by the \pkg{docstrip} +% requirement of prefixing the documentation with them.}: +% \begin{example} +% Simply typesetting a +% \emph{paragraph} may +% be simple enough, but +% it should showcase +% the utility of the +% environment well enough. +% \end{example} +% +% Note that for this to work the package obviously needs to be loaded. +% As such, it is probably a good idea to combine the use of \env{example} +% with the \opt{load} option, so be sure to read up on the caveats of +% using that option (see page \pageref{ssec:options:load}). +% +% Since the \env{example} environment is based on the same mechanisms +% as \env{MacroCode}, (mostly) the same typesetting properties apply. +% In particular, the code will be highlighted if \pkg{minted} is +% available. \Notice{Since the backend utilizes \cs{verbatim}, the +% usual caveats apply. In particular, leaving whitespace before +% \cs{end}\marg{example} will result in an extra newline at the end +% of the displayed code.} +% % \subsubsection{Options} % Package options are of course important to describe, and to this % end four macros are provided. They aid in describing options of @@ -534,16 +599,16 @@ % improve readability of the implementation code. % % \DescribeEnv[]{macro}{<\textbackslash macro>} -% <\# of args>{}'...' -% {} +% [<\# of args>]{}'...' +% {} % With this environment, the implementation of a macro is described. % Note that as with \cs{DescribeMacro}, \LaTeX3-style macros can not % be used in \meta{\textbackslash macro} without the catcode hack % mentioned earlier. % % \DescribeEnv[]{environment}{} -% <\# of args>{}'...' -% {} +% [<\# of args>]{}'...' +% {} % This environment describes the implementation of an environment. % % \DescribeEnv[]{option}{