summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nicetext/run/substr.tex
blob: 1974b2e15bf691be1aadca08ed818f8b5ba67a1e (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
\ProvidesFile{substr.tex}[{2011/08/20 [2010/03/30] documentation for substr.sty}]
\title{\textsf{substr.sty}\thanks{See 
       \url{http://ctan.org/pkg/substr} for more about 
       \textsf{substr.sty}.}---Substring 
       Functions with \LaTeX}
\author{Harald Harders\thanks{Joint work with Heiko Oberdiek, 
                              one line + documentation tool
                              by Uwe L\"uck.}}
% \listfiles

%% Preprocessing 'substr.sty':
\RequirePackage{makedoc}

%% Replacements:
\SetPatternCodes{\MakeOther\\}
\MakeExpandableAllReplacer{Cmds} 
                          {Commands:}{\SECT{Commands:}}{LEAVE}
\PrependExpandableAllReplacer{Change}{ChangeLog}{\SECT{ChangeLog}}
\PrependExpandableAllReplacer{CR}{Copyright}{\COPYRIGHT}
\PrependExpandableAllReplacer{LaTeX}
               [\MakeOther\ ]{LaTeX }{\LaTeX{} }
\PrependExpandableAllReplacer{HH@}
                             {h.harders@tu-bs.de}
                             {`h.harders@tu-bs.de'\MEDSK}
\PrependExpandableAllReplacer{COMP}
                             {de.comp.text.tex}
                             {`de.comp.text.tex'}
\PrependExpandableAllReplacer{LPPL}
                             {macros/latex/base/lppl.txt}
                             {`macros/latex/base/lppl.txt'}
\PrependExpandableAllReplacer{Hist}[\MakeOther\ ]%
{History of this package:}{\SECT{History of this package:}}
\ResetPatternCodes
\SetCorrectHookJobLast

\HeaderLines{3}
\MainDocParser{\ProcessInputWith{comment}}
\LaTeXresultFile{substr.doc}
\MakeCloseDoc{substr.sty}

\documentclass{article}

\usepackage{hyperref,makedoc,niceverb} %% niceverb after hyperref!
\AddToNoVerbList{\MEDSK\SECT\textbf\COPYRIGHT,\LaTeX}
\newcommand*{\MEDSK}{\par\medskip}
\newcommand*{\SECT}[1]{\MEDSK\textbf{#1}\nopagebreak\par}
\newcommand*{\COPYRIGHT}{\MEDSK\textbf{Copyright} }
\usepackage[utf8]{inputenc}            %% for v1.2

\pagestyle{myheadings}
\markboth{\textsf{substr.sty}}{\textsf{substr.sty}}
\usepackage{parskip}

\begin{document}
\maketitle

\begin{abstract}\noindent
  This documentation of 'substr.sty' has been typeset 
  by automatical ASCII\slash UTF\hbox{-}8~$\to$ \LaTeX\ 
  enhancement provided by 'makedoc.sty' and 'niceverb.sty''s 
  ``auto mode."\footnote{See 
                         \url{http://ctan.org/pkg/nicetext} 
                         for more on these packages.}
  Some extended formatting---kind of sectioning, 
  switches to `\tt'---have been achieved by string replacements 
  specific to the comment text of the package file 
  (see source file 'substr.tex').

  'substr.sty' especially demonstrates the rather rare 
  \lq`%% '\rq\ style of package comments that is somewhat 
  favoured by 'makedoc' because this way ``true comments" 
  are easily distinguishable from mere ``commenting out."
% 
%   The idea to use 'parskip.sty' for formatting the documentation 
%   (as opposed to the version of the present file of one week ago) 
%   is due to the quite recent 
%   'import.tex'\footnote{\url{http://ctan.org/pkg/import}} 
%   that 
%% ???
\end{abstract}
\sloppy 
% \MakeJobDoc{3}{\ProcessInputWith{comment}}
\AutoCmdInput{substr.doc}
\end{document}

%% HISTORY
2010/03/18   sent to CTAN
2010/03/27   removed `\usepackage{substr}'
2010/03/28   extended formatting by replacing words
2010/03/29   \SetPatternCodes etc.
2010/03/30   import -> substr; see source file
2011/08/20   \ProvidesFile for fileinfo