summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-01-11 00:40:15 +0000
committerKarl Berry <karl@freefriends.org>2011-01-11 00:40:15 +0000
commita91307c2f17b5b11a02a758bae9548f24ea3e844 (patch)
tree124f70c8668c3f03d0d467b1e87fe7c8bfaec399
parent69b48db5779580145aee8c957250d4556a2c5d91 (diff)
ydoc (10jan11)
git-svn-id: svn://tug.org/texlive/trunk@21019 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/ydoc/ydoc.pdfbin521643 -> 531528 bytes
-rw-r--r--Master/texmf-dist/source/latex/ydoc/ydoc.dtx182
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc-code.sty4
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc-desc.sty24
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc-doc.sty59
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc-expl.sty38
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc.cls4
-rw-r--r--Master/texmf-dist/tex/latex/ydoc/ydoc.sty4
8 files changed, 223 insertions, 92 deletions
diff --git a/Master/texmf-dist/doc/latex/ydoc/ydoc.pdf b/Master/texmf-dist/doc/latex/ydoc/ydoc.pdf
index 6e2ecfe168a..2670d3cdacc 100644
--- a/Master/texmf-dist/doc/latex/ydoc/ydoc.pdf
+++ b/Master/texmf-dist/doc/latex/ydoc/ydoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/ydoc/ydoc.dtx b/Master/texmf-dist/source/latex/ydoc/ydoc.dtx
index 7855ff07a42..be3645188bb 100644
--- a/Master/texmf-dist/source/latex/ydoc/ydoc.dtx
+++ b/Master/texmf-dist/source/latex/ydoc/ydoc.dtx
@@ -35,8 +35,8 @@
%<expl> [ydoc-expl]
%<doc> [ydoc-doc]
%<*driver|class|package|code|desc|expl|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]
%</driver|class|package|code|desc|expl|doc>
%<class> [ydoc class: document LaTeX class and packages]
%<package> [ydoc package: document LaTeX class and packages]
@@ -74,7 +74,7 @@
%</driver>
% \fi
%
-% \CheckSum{1238}
+% \CheckSum{1459}
%
% \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
@@ -229,9 +229,13 @@
% follow. Macros which are not part of the syntax but normal arguments should be written as
% |<\textbackslash name>| (yielding \MacroArgs<\textbackslash name>) instead.
%
-% \subsubsection*{Example:}
+% \subsubsection*{Examples:}
% |\Macro\@for<\textbackslash var> ':=' <list> \AlsoMacro\do {<code>}|\\
-% \Macro\@for<\textbackslash var> ':=' <list> \AlsoMacro\do {<code>}\\
+% \Macro\@for<\textbackslash var> ':=' <list> \AlsoMacro\do {<code>}
+% \par\medskip\noindent
+% |\Macro\pgfkeys{<key1>'='<value1>','<key2>'/.code='{<code>}}|\\
+% \Macro\pgfkeys{<key1>'='<value1>','<key2>'/.code='{<code>}}\\
+%
%
% \begin{DescribeEnv}{DescribeMacros}
% \Macro\Macro<\textbackslash name><arguments>\\
@@ -273,15 +277,15 @@
% \toprule
% Description & Syntax & Result & Macro$^{a}$ \\
% \midrule
-% Meta text & |<text>| & \MacroArgs<text> & |\meta| \\
-% Mandatory Argument & |{<text>}| & \MacroArgs{<text>} & |\marg| \\
-% ---, without meta text & |{text}| & \MacroArgs{text} & \\
-% Optional Argument & |[<text>]| & \MacroArgs[<text>] & |\oarg| \\
-% ---, without meta text & |[text]| & \MacroArgs[text] & \\
-% Picture Argument & |(<text>)| & \MacroArgs(<text>) & |\parg| \\
-% ---, without meta text & |(text)| & \MacroArgs(text) & \\
-% Beamer Overlay Argument & |<<text>>| & \MacroArgs<<text>> & |\aarg| \\
-% ---, without meta text & |'<'text'>'| & \MacroArgs'<'text'>' \\
+% Meta text & |<text>| & \MacroArgs<text> & \Macro\meta{<text>} \\
+% Mandatory Argument & |{args}| & \MacroArgs{args} & \\
+% ---, with meta text & |{<text>}| & \MacroArgs{<text>} & \Macro\marg{<text>} \\
+% Optional Argument & |[args]| & \MacroArgs[args] & \\
+% ---, with meta text & |[<text>]| & \MacroArgs[<text>] & \Macro\oarg{<text>} \\
+% Picture Argument & |(args)| & \MacroArgs(args) & \\
+% ---, with meta text & |(<text>)| & \MacroArgs(<text>) & \Macro\parg{<text>} \\
+% Beamer Overlay Argument & |<<args>>| & \MacroArgs<<args>> \\
+% ---, with meta text & |<< <text> >>| & \MacroArgs<<<text> >> & \Macro\aarg{<text>} \\
% Star & |*| & \MacroArgs* \\
% \midrule
% Verbatim content & |'$&^%_#$\'| & \MacroArgs'$&^%_#$\' \\
@@ -292,7 +296,8 @@
% \midrule
% Second macro (e.g.\ endmarker) & |\AlsoMacro\macro| & \MacroArgs\AlsoMacro\macro \\
% \bottomrule
-% \multicolumn{4}{l}{{\Large\strut}$^{a}$) As alternative to be used inside normal text.}
+% \multicolumn{4}{l}{{\Large\strut}$^{a}$) As alternative to be used inside normal text.} \\
+% \multicolumn{4}{l}{Note that `|args|' can itself be further macro arguments except true verbatim.}
% \end{tabular}
% \end{table}
%
@@ -729,7 +734,7 @@
\def\CheckSum#1{%
\gdef\ydoc@checksum{#1}%
}
-\let\ydoc@checksum\z@
+\let\ydoc@checksum\m@ne
% \end{macrocode}
% \end{macro}
%
@@ -777,9 +782,51 @@
%
% \begin{macro}{\CharacterTable}
% \begin{macrocode}
-\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{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ydoc@correct@CharacterTable}
+% \begin{macrocode}
+\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
+%
% \end{macrocode}
% \end{macro}
%
@@ -860,8 +907,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}%
@@ -873,7 +928,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
}
@@ -925,28 +981,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@meta}
-% Checks if |#1| is surrounded by angles |< >|.
-% If so it calls \cs{is@meta} which removes the angles and calls \cs{meta}.
-% \begin{macrocode}
-\def\@meta#1{%
- \@ifnextchar<%
- {\is@meta}%
- {}%
- #1%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\is@meta}
-% Only removes the |< >| ands calls \cs{meta}.
-% \begin{macrocode}
-\def\is@meta<#1>{%
- \meta{#1}%
-}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\marg}
% Calls \cs{marg} with angles added to force meta format.
% \begin{macrocode}
@@ -976,12 +1010,13 @@
% \end{macro}
%
% \begin{macro}{\@marg}
-% Sets style and adds braces. Text is formatted with \cs{@meta} which might add meta format.
+% Sets style and adds braces.
+% The text is formatted as separate set of macro arguments.
% \begin{macrocode}
\def\@marg#1{%
{\margstyle{%
{\ttfamily\braceleft}%
- \@meta{#1}%
+ {\def\end@Macro@args{}\read@Macro@arg#1}%
{\ttfamily\braceright}%
}}%
}
@@ -989,12 +1024,13 @@
% \end{macro}
%
% \begin{macro}{\@oarg}
-% Sets style and adds brackets. Text is formatted with \cs{@meta} which might add meta format.
+% Sets style and adds brackets.
+% The text is formatted as separate set of macro arguments.
% \begin{macrocode}
\def\@oarg#1{%
{\oargstyle{%
{\ttfamily[}%
- \@meta{#1}%
+ {\def\end@Macro@args{}\read@Macro@arg#1}%
{\ttfamily]}%
}}%
}
@@ -1002,12 +1038,12 @@
% \end{macro}
%
% \begin{macro}{\@parg}
-% Sets style and adds parentheses. Text is formatted with \cs{@meta} which might add meta format.
+% Sets style and adds parentheses.
% \begin{macrocode}
\def\@parg#1{%
{\pargstyle{%
{\ttfamily(}%
- \@meta{#1}%
+ {\def\end@Macro@args{}\read@Macro@arg#1}%
{\ttfamily)}%
}}%
}
@@ -1015,12 +1051,12 @@
% \end{macro}
%
% \begin{macro}{\@aarg}
-% Sets style and adds angles. Text is formatted with \cs{@meta} which might add meta format.
+% Sets style and adds angles.
% \begin{macrocode}
\def\@aarg#1{%
{\aargstyle{%
{\ttfamily<}%
- \@meta{#1}%
+ {\def\end@Macro@args{}\read@Macro@arg#1}%
{\ttfamily>}%
}}%
}
@@ -1264,7 +1300,7 @@
% \begin{macro}{\read@Macro@aarg}
% \begin{macrocode}
\def\read@Macro@aarg<#1>>{%
- \aarg{#1}\read@Macro@arg
+ \@aarg{#1}\read@Macro@arg
}
% \end{macrocode}
% \end{macro}
@@ -1443,6 +1479,7 @@
\newcommand*\MacroArgs{%
\begingroup
\def\end@Macro@args{\endgroup\xspace}%
+ \macroargsstyle
\read@Macro@arg
}
\RequirePackage{xspace}
@@ -1826,7 +1863,7 @@
%
% \begin{macro}{\exampleprintsettings}
% \begin{macrocode}
-\def\exampleprintsettings{frame=lines}%
+\def\exampleprintsettings{numbers=left,numberstyle=\tiny\color{gray}\sffamily,numbersep=5pt}%
% \end{macrocode}
% \end{macro}
%
@@ -1843,16 +1880,17 @@
\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}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\PrintExample}
% \begin{macrocode}
+%<*DISABLED>
\RequirePackage{showexpl}
\def\PrintExample{%
\begingroup
@@ -1861,6 +1899,38 @@
\LTXinputExample[varwidth]{\ydoc@exafile}%
\endgroup
}
+%</DISABLED>
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\PrintExample}
+% \begin{macrocode}
+\def\PrintExample{%
+ \begingroup
+ \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
+}
% \end{macrocode}
% \end{macro}
%
@@ -1880,7 +1950,11 @@
{%
\lst@EndWriteFile
\egroup
+ \begingroup
+ \MakePercentComment
+ \catcode`\^^M=5\relax
\PrintExample
+ \endgroup
}
% \end{macrocode}
% \end{environment}
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}