summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-03-13 23:47:26 +0000
committerKarl Berry <karl@freefriends.org>2007-03-13 23:47:26 +0000
commit9f788918f4e0a58fe14ab233810562a8bd517bc0 (patch)
tree20cad4419d00e637be5de205bf91ba434c0f949a /Master/texmf-dist
parent7528bed5b6dc85d8d97044a2ad1ea49a55b96a90 (diff)
syntrace update (13mar07)
git-svn-id: svn://tug.org/texlive/trunk@4031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/syntrace/syntrace.pdfbin80670 -> 62180 bytes
-rw-r--r--Master/texmf-dist/source/latex/syntrace/syntrace.dtx141
-rw-r--r--Master/texmf-dist/tex/latex/syntrace/syntrace.sty64
-rw-r--r--Master/texmf-dist/tpm/syntrace.tpm8
4 files changed, 160 insertions, 53 deletions
diff --git a/Master/texmf-dist/doc/latex/syntrace/syntrace.pdf b/Master/texmf-dist/doc/latex/syntrace/syntrace.pdf
index 84907ae6c00..a36b5115fbd 100644
--- a/Master/texmf-dist/doc/latex/syntrace/syntrace.pdf
+++ b/Master/texmf-dist/doc/latex/syntrace/syntrace.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/syntrace/syntrace.dtx b/Master/texmf-dist/source/latex/syntrace/syntrace.dtx
index 653603b1a28..cb65d15a9bb 100644
--- a/Master/texmf-dist/source/latex/syntrace/syntrace.dtx
+++ b/Master/texmf-dist/source/latex/syntrace/syntrace.dtx
@@ -21,13 +21,37 @@
% \fi
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{syntrace}[2006/08/13 v1.0 Package for dealing with trace in synttree]
+%<package>\ProvidesPackage{syntrace}[2006/08/17 v1.1 Package for dealing with trace in syntaxic tree]
%<package>\RequirePackage{ifthen}
-%<package>\RequirePackage{synttree}
+%<package>\DeclareOption{synttree}{
+%<package>\AtEndOfPackage{%
+%<package>\IfFileExists{synttree.sty}{%
+%<package>\RequirePackage{synttree}\syntraceaddresetmacro{synttree}%
+%<package>}{%
+%<package>\PackageWarning{syntrace}{Unable to locate synttree package}
+%<package>}
+%<package>}
+%<package>}
+%<package>\DeclareOption{qtree}{
+%<package>\AtEndOfPackage{%
+%<package>\IfFileExists{qtree.sty}{%
+%<package>\RequirePackage{qtree}\syntraceaddresetmacro{Tree}%
+%<package>}{%
+%<package>\PackageWarning{syntrace}{Unable to locate qtree package}
+%<package>}
+%<package>}
+%<package>}
+%<package>\DeclareOption{i-start}{
+%<package>\AtEndOfPackage{%
+%<package>\setcounter{syntrace@startvalue}{8}
+%<package>}
+%<package>}
+%<package>\ExecuteOptions{synttree}
+%<package>\ProcessOptions
%
%<*driver>
\documentclass{ltxdoc}
-\usepackage{syntrace}
+\usepackage[qtree,i-start]{syntrace}
\usepackage{verbatim}
\EnableCrossrefs
\CodelineIndex
@@ -47,19 +71,27 @@
% This file describe the \textsf{syntrace} package. This package is intended for \LaTeX\ users who must deal with
% traces in synttree.
% \end{abstract}
+%
+% \section{Options}
+%
+% \DescribeMacro{synttree} The |synttree| option add the synttree command of the synttree package to the auto reset commands. With this option, the |\synttree| command is redefined to auto reset trace counter. A |\synttree*| command is add that work like |\synttree|, but without auto reset. This option is enabled is a default options.
+%
+% \DescribeMacro{qtree} The |qtree| option add the Tree command of the qtree package to the auto reset command.
+%
+% \DescribeMacro{i-start} The |i-start| change the first label of trace to i instance of a.
%
% \section{Usage}
% The \textsf{syntrace} package add a way to deal with trace in tree produce using the \textsf{synttree} package.
%
-% \DescribeMacro{\traceLabel} The |\traceLabel{label}| set and draw a start trace. The parameter is the label to use for
+% \DescribeMacro{\traceLabel} The |\traceLabel{label}| set and draw a end trace. The parameter is the label to use for
% the reference.
%
% \DescribeMacro{\traceReference} The |\traceReference{ref}| draw a trace linked with the specified reference.
%
-% \DescribeMacro{\synttree} The |\synttree| is redefined to auto reset the counter of trace at the start of a tree. The |\synttree*| work as the standard |\synttree| command (without auto reseting the counter).
+% \DescribeMacro{\syntraceresetmacro} The |\syntraceresetmacro{commande name without slash}| add auto-reset to this command.
%
% \section{Examples}
-% \subsection{Simply example}
+% \subsection{Simply example with synttree}
% \begin{verbatim}
% \synttree[A %
% [B [C\traceLabel{l1}] [D]] %
@@ -70,39 +102,45 @@
% [B [C\traceLabel{l1}] [D]] %
% [E [F] [\traceReference{l1}]]%
% ]
-% \subsection{One complexe example}
+% \subsection{One complex example with synttree}
% \begin{verbatim}
-% \synttree[AgrP
-% [\traceReference{sujet1}]
-% [Agr'
-% [Arg [\traceReference{verbe1}]]
-% [TP
-% [T'
-% [T [\traceReference{verbe1}]]
-% [VP
-% [DP\traceLabel{sujet1} [.t Le chat]]
-% [V' [V [dort\traceLabel{verbe1}]]]
+% \synttree*[AgrP
+% [DP\traceLabel{sujet1} [.t Le chat]]
+% [Agr'
+% [Arg [dort\traceLabel{verbe1}]]
+% [TP
+% [T'
+% [T [\traceReference{verbe1}]]
+% [VP
+% [\traceReference{sujet1}]
+% [V' [V [\traceReference{verbe1}]]]
+% ]
% ]
% ]
% ]
% ]
-% ]
% \end{verbatim}
-% \synttree[AgrP
-% [\traceReference{sujet1}]
-% [Agr'
-% [Arg [\traceReference{verbe1}]]
-% [TP
-% [T'
-% [T [\traceReference{verbe1}]]
-% [VP
-% [DP\traceLabel{sujet1} [.t Le chat]]
-% [V' [V [dort\traceLabel{verbe1}]]]
+% \synttree*[AgrP
+% [DP\traceLabel{sujet1} [.t Le chat]]
+% [Agr'
+% [Arg [dort\traceLabel{verbe1}]]
+% [TP
+% [T'
+% [T [\traceReference{verbe1}]]
+% [VP
+% [\traceReference{sujet1}]
+% [V' [V [\traceReference{verbe1}]]]
+% ]
% ]
% ]
% ]
% ]
-% ]
+% \subsection{One example with qtree}
+% \syntraceaddresetmacro{Tree}
+% \begin{verbatim}
+% \Tree [.S [.NP subject\traceLabel{s1} ] [.VP [.V verb ] [.NP \traceReference{s1} ]]]
+% \end{verbatim}
+% \Tree [.S [.NP subject\traceLabel{s1} ] [.VP [.V verb ] [.NP \traceReference{s1} ]]]
% \section{Implementation}
%
% \begin{macro}{syntrace@startvalue}
@@ -169,20 +207,45 @@
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{synttree}
-% This macro add the autoreset to the synttree command
+% \begin{macro}{\syntraceaddresetmacro}
+% This macro add autoreset to a command and add a starred version to this command that have the default functionnality
% \begin{macrocode}
-\let\syntrace@syntree=\synttree
-\def\synttree{\@ifstar%
- \syntrace@syntree%
- \syntree@star%
+\newcommand*{\syntraceaddresetmacro}[1]{%
+ \expandafter\ifx%
+ \csname syntrace@old@#1\endcsname
+ \relax%
+ \PackageInfo{syntrace}{Adding auto-reset to #1}%
+ \expandafter\let\csname syntrace@old@#1\expandafter\endcsname%
+ \csname #1\endcsname%
+ \expandafter\def\csname#1\endcsname{\@ifstar{%
+ \csname syntrace@old@#1\endcsname%
+ }{%
+ \syntrace@reset%
+ \csname syntrace@old@#1\endcsname%
+ }%
+ }%
+ \else
+ \PackageWarning{syntrace}{#1 allready set as auto-reset}%
+ \fi
}
-\def\syntree@star{%
- \syntrace@reset%
- \syntrace@syntree%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\syntraceremoveresetmacro}
+% This macro remove autoreset to a command
+% \begin{macrocode}
+\newcommand*{\syntraceremoveresetmacro}[1]{%
+ \expandafter\ifx%
+ \csname syntrace@old@#1\endcsname
+ \relax%
+ \PackageWarning{syntrace}{#1 is not set as auto-reset}%
+ \else
+ \PackageInfo{syntrace}{Removing auto-reset from #1}%
+ \expandafter\let\csname #1\expandafter\endcsname%
+ \csname syntrace@old@#1\endcsname%
+ \expandafter\let\csname syntrace@old@#1\expandafter\endcsname\relax%
+ \fi
}
% \end{macrocode}
% \end{macro}
% \Finale
-
\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/syntrace/syntrace.sty b/Master/texmf-dist/tex/latex/syntrace/syntrace.sty
index 2a208c230c1..c8cb0946c34 100644
--- a/Master/texmf-dist/tex/latex/syntrace/syntrace.sty
+++ b/Master/texmf-dist/tex/latex/syntrace/syntrace.sty
@@ -24,9 +24,33 @@
%% This work consists of the file syntrace.ins and
%% syntrace.dtx and the derived file syntrace.sty
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{syntrace}[2006/08/13 v1.0 Package for dealing with trace in synttree]
+\ProvidesPackage{syntrace}[2006/08/17 v1.1 Package for dealing with trace in syntaxic tree]
\RequirePackage{ifthen}
-\RequirePackage{synttree}
+\DeclareOption{synttree}{
+\AtEndOfPackage{%
+\IfFileExists{synttree.sty}{%
+\RequirePackage{synttree}\syntraceaddresetmacro{synttree}%
+}{%
+\PackageWarning{syntrace}{Unable to locate synttree package}
+}
+}
+}
+\DeclareOption{qtree}{
+\AtEndOfPackage{%
+\IfFileExists{qtree.sty}{%
+\RequirePackage{qtree}\syntraceaddresetmacro{Tree}%
+}{%
+\PackageWarning{syntrace}{Unable to locate qtree package}
+}
+}
+}
+\DeclareOption{i-start}{
+\AtEndOfPackage{%
+\setcounter{syntrace@startvalue}{8}
+}
+}
+\ExecuteOptions{synttree}
+\ProcessOptions
\newcounter{syntrace@startvalue}
\setcounter{syntrace@startvalue}{0}
\newcounter{syntrace@labelcounter}
@@ -51,16 +75,36 @@
\newcommand*{\syntrace@reset}{%
\setcounter{syntrace@labelcounter}{\arabic{syntrace@startvalue}}%
}
-\let\syntrace@syntree=\synttree
-\def\synttree{\@ifstar%
- \syntrace@syntree%
- \syntree@star%
+\newcommand*{\syntraceaddresetmacro}[1]{%
+ \expandafter\ifx%
+ \csname syntrace@old@#1\endcsname
+ \relax%
+ \PackageInfo{syntrace}{Adding auto-reset to #1}%
+ \expandafter\let\csname syntrace@old@#1\expandafter\endcsname%
+ \csname #1\endcsname%
+ \expandafter\def\csname#1\endcsname{\@ifstar{%
+ \csname syntrace@old@#1\endcsname%
+ }{%
+ \syntrace@reset%
+ \csname syntrace@old@#1\endcsname%
+ }%
+ }%
+ \else
+ \PackageWarning{syntrace}{#1 allready set as auto-reset}%
+ \fi
}
-\def\syntree@star{%
- \syntrace@reset%
- \syntrace@syntree%
+\newcommand*{\syntraceremoveresetmacro}[1]{%
+ \expandafter\ifx%
+ \csname syntrace@old@#1\endcsname
+ \relax%
+ \PackageWarning{syntrace}{#1 is not set as auto-reset}%
+ \else
+ \PackageInfo{syntrace}{Removing auto-reset from #1}%
+ \expandafter\let\csname #1\expandafter\endcsname%
+ \csname syntrace@old@#1\endcsname%
+ \expandafter\let\csname syntrace@old@#1\expandafter\endcsname\relax%
+ \fi
}
-
\endinput
%%
%% End of file `syntrace.sty'.
diff --git a/Master/texmf-dist/tpm/syntrace.tpm b/Master/texmf-dist/tpm/syntrace.tpm
index c26667e3ef9..8ce83817786 100644
--- a/Master/texmf-dist/tpm/syntrace.tpm
+++ b/Master/texmf-dist/tpm/syntrace.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/syntrace.zip">
<TPM:Name>syntrace</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/08/18 23:34:31</TPM:Date>
+ <TPM:Date>2007/03/13 14:15:00</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>The syntrace package.</TPM:Title>
@@ -12,15 +12,15 @@
<TPM:Size>91307</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="3022">
+ <TPM:RunFiles size="4397">
texmf-dist/tex/latex/syntrace/syntrace.sty
texmf-dist/tpm/syntrace.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="80827">
+ <TPM:DocFiles size="62337">
texmf-dist/doc/latex/syntrace/README
texmf-dist/doc/latex/syntrace/syntrace.pdf
</TPM:DocFiles>
- <TPM:SourceFiles size="7458">
+ <TPM:SourceFiles size="10127">
texmf-dist/source/latex/syntrace/syntrace.dtx
texmf-dist/source/latex/syntrace/syntrace.ins
</TPM:SourceFiles>