diff options
author | Karl Berry <karl@freefriends.org> | 2011-01-11 00:40:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-01-11 00:40:15 +0000 |
commit | a91307c2f17b5b11a02a758bae9548f24ea3e844 (patch) | |
tree | 124f70c8668c3f03d0d467b1e87fe7c8bfaec399 /Master/texmf-dist/tex/latex/ydoc | |
parent | 69b48db5779580145aee8c957250d4556a2c5d91 (diff) |
ydoc (10jan11)
git-svn-id: svn://tug.org/texlive/trunk@21019 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ydoc')
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty | 24 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty | 59 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty | 38 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc.cls | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ydoc/ydoc.sty | 4 |
6 files changed, 95 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty index edc76660863..a9b010ad1d4 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty @@ -29,8 +29,8 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackageSVN [ydoc-code] - {$Id: ydoc.dtx 2004 2011-01-03 22:51:32Z martin $} - [v0.3alpha] + {$Id: ydoc.dtx 2035 2011-01-09 17:22:24Z martin $} + [v0.4alpha] [ydoc package to document macro code] \RequirePackage{hyperref} \hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}} diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty index 6fe2fb5a857..99b00e20a07 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty @@ -29,8 +29,8 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackageSVN [ydoc-desc] - {$Id: ydoc.dtx 2004 2011-01-03 22:51:32Z martin $} - [v0.3alpha] + {$Id: ydoc.dtx 2035 2011-01-09 17:22:24Z martin $} + [v0.4alpha] [ydoc package to describe macros, environments, options etc.] \RequirePackage{hyperref} \hypersetup{colorlinks=true,pdfborder=0 0 0,pdfborderstyle={}} @@ -47,15 +47,6 @@ {\metastyle{#1\/}}% \ensuremath\rangle } -\def\@meta#1{% - \@ifnextchar<% - {\is@meta}% - {}% - #1% -} -\def\is@meta<#1>{% - \meta{#1}% -} \def\marg#1{\@marg{<#1>}} \def\oarg#1{\@oarg{<#1>}} \def\parg#1{\@parg{<#1>}} @@ -63,28 +54,28 @@ \def\@marg#1{% {\margstyle{% {\ttfamily\braceleft}% - \@meta{#1}% + {\def\end@Macro@args{}\read@Macro@arg#1}% {\ttfamily\braceright}% }}% } \def\@oarg#1{% {\oargstyle{% {\ttfamily[}% - \@meta{#1}% + {\def\end@Macro@args{}\read@Macro@arg#1}% {\ttfamily]}% }}% } \def\@parg#1{% {\pargstyle{% {\ttfamily(}% - \@meta{#1}% + {\def\end@Macro@args{}\read@Macro@arg#1}% {\ttfamily)}% }}% } \def\@aarg#1{% {\aargstyle{% {\ttfamily<}% - \@meta{#1}% + {\def\end@Macro@args{}\read@Macro@arg#1}% {\ttfamily>}% }}% } @@ -166,7 +157,7 @@ \@parg{#1}\read@Macro@arg } \def\read@Macro@aarg<#1>>{% - \aarg{#1}\read@Macro@arg + \@aarg{#1}\read@Macro@arg } \def\read@Macro@angle<{% \futurelet\@let@token\read@Macro@angle@ @@ -249,6 +240,7 @@ \newcommand*\MacroArgs{% \begingroup \def\end@Macro@args{\endgroup\xspace}% + \macroargsstyle \read@Macro@arg } \RequirePackage{xspace} diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty index c624bc7b407..983ae2ab978 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty @@ -29,8 +29,8 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackageSVN [ydoc-doc] - {$Id: ydoc.dtx 2004 2011-01-03 22:51:32Z martin $} - [v0.3alpha] + {$Id: ydoc.dtx 2035 2011-01-09 17:22:24Z martin $} + [v0.4alpha] [ydoc package to provide 'doc' macros] \newcount\ydoc@bslashcnt \def\ydoc@countbslashes{% @@ -46,7 +46,7 @@ \def\CheckSum#1{% \gdef\ydoc@checksum{#1}% } -\let\ydoc@checksum\z@ +\let\ydoc@checksum\m@ne \def\AlsoImplementation{% \gdef\StopEventually##1{% \@bsphack @@ -64,9 +64,45 @@ \def\MakePercentIgnore{\catcode`\%9\relax} \def\MakePercentComment{\catcode`\%14\relax} \def\DocInput#1{\MakePercentIgnore\input{#1}\MakePercentComment} -\providecommand*\CharacterTable[1]{% - \PackageWarning{ydoc}{Ignoring Character Table - not implemented yet!}{}{}% +\providecommand*\CharacterTable{% + \begingroup + \CharTableChanges + \@CharacterTable } +\def\@CharacterTable#1{% + \def\ydoc@used@CharacterTable{#1}% + \@onelevel@sanitize\ydoc@used@CharacterTable + \ifx\ydoc@used@CharacterTable\ydoc@correct@CharacterTable + \typeout{***************************}% + \typeout{* Character table correct *}% + \typeout{***************************}% + \else + \PackageError{ydoc}{Character table corrupted} + {\the\wrong@table} + \show\ydoc@used@CharacterTable + \show\ydoc@correct@CharacterTable + \fi + \endgroup +} +\newhelp\wrong@table{Some of the ASCII characters are corrupted.^^J + I now \string\show\space you both tables for comparison.} +\newcommand*\CharTableChanges{} +\def\ydoc@correct@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 \~} +\@onelevel@sanitize\ydoc@correct@CharacterTable \providecommand*\DoNotIndex[1]{% \PackageWarning{ydoc}{Ignoring DoNotIndex - not implemented yet!}{}{}% } @@ -101,8 +137,16 @@ \ifnum\ydoc@checksum=\m@ne \message{^^J}% \message{**********************^^J}% - \message{* No Checksum found! *^^J}% + \message{* No checksum found! *^^J}% \message{**********************^^J}% + \GenericWarning{No checksum found}{Correct checksum is \the\ydoc@bslashcnt^^J}{}{}% + \else + \ifnum\ydoc@checksum=\z@ + \message{^^J}% + \message{*********************^^J}% + \message{* Checksum disabled *^^J}% + \message{*********************^^J}% + \GenericWarning{Checksum disabled}{Correct checksum is \the\ydoc@bslashcnt^^J}{}{}% \else \ifnum\ydoc@checksum=\ydoc@bslashcnt \message{^^J}% @@ -114,7 +158,8 @@ \message{****************************^^J}% \message{* Checksum wrong (\ydoc@checksum<>\the\ydoc@bslashcnt) ^^J}% \message{****************************^^J}% - \GenericError{Checksum wrong}{}{}{}% + \GenericError{Checksum wrong}{Correct checksum is \the\ydoc@bslashcnt^^J}{}{}% + \fi \fi \fi } diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty index c22dc70ef11..6247f8bd527 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty @@ -29,13 +29,13 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackageSVN [ydoc-expl] - {$Id: ydoc.dtx 2004 2011-01-03 22:51:32Z martin $} - [v0.3alpha] + {$Id: ydoc.dtx 2035 2011-01-09 17:22:24Z martin $} + [v0.4alpha] [ydoc package to insert live examples of LaTeX code] \RequirePackage{listings} \lst@RequireAspects{writefile} \def\ydoc@exafile{\jobname.exa} -\def\exampleprintsettings{frame=lines}% +\def\exampleprintsettings{numbers=left,numberstyle=\tiny\color{gray}\sffamily,numbersep=5pt}% \newbox\examplecodebox \newbox\exampleresultbox \def\BoxExample{% @@ -44,17 +44,33 @@ \expandafter\expandafter\expandafter[% \expandafter\exampleprintsettings\expandafter,\thisexampleprintsettings]% {\ydoc@exafile}% - \color@endgroup}% + \unskip\color@endgroup}% \setbox\exampleresultbox\hbox{\color@setgroup \@@input\ydoc@exafile\relax - \color@endgroup}% + \unskip\color@endgroup}% } -\RequirePackage{showexpl} \def\PrintExample{% \begingroup - \lstset{basicstyle=\ttfamily}% - \MakePercentComment - \LTXinputExample[varwidth]{\ydoc@exafile}% + \BoxExample + \@tempdima=\textwidth + \advance\@tempdima by -\wd\examplecodebox\relax + \advance\@tempdima by -\wd\exampleresultbox\relax + \advance\@tempdima by -15pt\relax + \ifdim\@tempdima>\bigskipamount + \hbox to \textwidth{% + \null\hss + \minipage[c]{\wd\exampleresultbox}\fbox{\usebox\exampleresultbox}\endminipage + \hfill\hfill\hskip\bigskipamount\hskip15pt\hfill\hfill + \minipage[c]{\wd\examplecodebox}\usebox\examplecodebox\endminipage + \hss\null + }% + \else + \vbox{% + \centerline{\fbox{\usebox\exampleresultbox}}% + \vspace{\bigskipamount}% + \centerline{\usebox\examplecodebox}% + }% + \fi \endgroup } \def\examplecodesettings{gobble=4} @@ -67,7 +83,11 @@ {% \lst@EndWriteFile \egroup + \begingroup + \MakePercentComment + \catcode`\^^M=5\relax \PrintExample + \endgroup } \RequirePackage{float} \floatstyle{plain} diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc.cls b/Master/texmf-dist/tex/latex/ydoc/ydoc.cls index 01e5297a337..3684a2fea0d 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc.cls +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc.cls @@ -27,8 +27,8 @@ %% \RequirePackage{svn-prov}[2010/04/03] \ProvidesClassSVN - {$Id: ydoc.dtx 2004 2011-01-03 22:51:32Z martin $} - [v0.3alpha] + {$Id: ydoc.dtx 2035 2011-01-09 17:22:24Z martin $} + [v0.4alpha] [ydoc class: document LaTeX class and packages] \LoadClassWithOptions{article} %%\RequirePackage{doc} diff --git a/Master/texmf-dist/tex/latex/ydoc/ydoc.sty b/Master/texmf-dist/tex/latex/ydoc/ydoc.sty index eaa2824b0dd..b0031b430f9 100644 --- a/Master/texmf-dist/tex/latex/ydoc/ydoc.sty +++ b/Master/texmf-dist/tex/latex/ydoc/ydoc.sty @@ -28,8 +28,8 @@ \RequirePackage{svn-prov}[2010/04/03] \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackageSVN - {$Id: ydoc.dtx 2004 2011-01-03 22:51:32Z martin $} - [v0.3alpha] + {$Id: ydoc.dtx 2035 2011-01-09 17:22:24Z martin $} + [v0.4alpha] [ydoc package: document LaTeX class and packages] \RequirePackage{ydoc-code} \RequirePackage{ydoc-expl} |