summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-01-30 00:36:39 +0000
committerKarl Berry <karl@freefriends.org>2012-01-30 00:36:39 +0000
commitfffb66ff18c270c899cee9199cf3c1b002f2b1a0 (patch)
tree4b434366a20f381d3c3d68d72efb6104f65626c5 /Master/texmf-dist/tex/latex
parentda5a8ebcbef768e7565429bb04feb998d3da0869 (diff)
ed (29jan12)
git-svn-id: svn://tug.org/texlive/trunk@25231 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/ed/ed.sty115
1 files changed, 72 insertions, 43 deletions
diff --git a/Master/texmf-dist/tex/latex/ed/ed.sty b/Master/texmf-dist/tex/latex/ed/ed.sty
index d65bb3172ea..fdc38fd63f2 100644
--- a/Master/texmf-dist/tex/latex/ed/ed.sty
+++ b/Master/texmf-dist/tex/latex/ed/ed.sty
@@ -7,7 +7,7 @@
%% ed.dtx (with options: `package')
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{ed}[2011/01/16 v1.7 Editorial Notes]
+\ProvidesPackage{ed}[2012/01/29 v1.8 Editorial Notes]
\newif\ifshowednotes\showednotesfalse
\newif\ifmargins\marginstrue
\DeclareOption{show}{\showednotestrue\message{ed.sty: showing ednotes}}
@@ -22,68 +22,97 @@
\else
\RequirePackage{verbatim}
\fi
-\def\ednoteshape{\sffamily}
+\newcommand\ednoteshape{\sffamily}
\newcounter{ednote}
-\def\ed@foot#1#2#3% text, type, label
-{\def\test{#3}\def\empty{}\footnotetext[\value{ednote}]%
-{{\scshape{#2}\if\test\empty\else\label{ed:#3}[{#3}]\fi:} \ednoteshape #1}}
-\def\ed@margin#1{\ifmargins\marginpar{#1}\fi}
-\def\Ed@note#1#2#3% text, type, label
+\newcommand\ed@foot[3]% text, type, label
+{\def\@test{#3}\footnotetext[\arabic{ednote}]%
+{{\scshape{#2}\if\@test\@empty\else\label{ed:#3}[{#3}]\fi:} \ednoteshape #1}}
+\newcommand\ed@footnote[3]{\footnotemark[\arabic{ednote}]\ed@foot{#1}{#2}{#3}}
+\newcommand\ed@margin[1]{\ifmargins\marginpar{#1}\fi}
+\newcommand\Ed@note[3]% text, type, label
{\addtocounter{ednote}{1}\message{#2!}%
-\ifshowednotes\footnotemark[\arabic{ednote}]\ed@foot{#1}{#2}{#3}\fi}
-\def\ed@note#1#2#3% text, type, label
-{\Ed@note{#1}{#2}{#3}\ifshowednotes\ed@margin{#2:\arabic{ednote}}\fi}
-\def\ednote@label{EdNote}
+\ifshowednotes\ed@footnote{#1}{#2}{#3}\fi}
+\newcommand\ed@note[4]% text, type, label, margin
+{\Ed@note{#1}{#2}{#3}\ifshowednotes\ed@margin{#4:\arabic{ednote}}\fi}
+\newcommand\ednote@label{EdNote}
+\newcommand\ednote@margin{EdN}
\newcommand\ednotelabel[1]{\def\ednote@label{#1}}
+\newcommand\ednotemargin[1]{\def\ednote@margin{#1}}
\newcommand{\Ednote}[2][]{\Ed@note{#2}\ednote@label{#1}}
-\newcommand{\ednote}[2][]{\ed@note{#2}\ednote@label{#1}}
+\newcommand{\ednote}[2][]{\ed@note{#2}\ednote@label{#1}\ednote@margin}
\newcommand\tweaklabel[1]{\def\tweak@label{#1}}
-\def\tweak@label{Tweak}
-\newcommand{\tweak}[2][]{\ed@note{#2}\tweak@label{#1}}
+\newcommand\tweak@label{Tweak}
+\newcommand\tweakmargin[1]{\def\tweak@margin{#1}}
+\newcommand\tweak@margin{Tw}
+\newcommand{\tweak}[2][]{\ed@note{#2}\tweak@label{#1}\tweak@margin}
\newcommand{\Tweak}[2][]{\Ed@note{#2}\tweak@label{#1}}
-\def\edissue@label{Issue}
+\newcommand\edissue@label{Issue}
\newcommand\edissuelabel[1]{\def\edissue@label{#1}}
-\providecommand{\issue}[2][]{\ed@note{#2}\edissue@label{#1}}
+\newcommand\edissue@margin{Is}
+\newcommand\edissuemargin[1]{\def\edissue@margin{#1}}
+\providecommand{\issue}[2][]{\ed@note{#2}\edissue@label{#1}\edissue@margin}
\providecommand{\Issue}[2][]{\Ed@note{#2}\edissue@label{#1}}
-\newcommand{\edissue}[2][]{\ed@note{#2}\edissue@label{#1}}
+\newcommand{\edissue}[2][]{\ed@note{#2}\edissue@label{#1}\edissue@margin}
\newcommand{\edIssue}[2][]{\Ed@note{#2}\edissue@label{#1}}
-\def\new@part#1#2#3% text, mess, start
+\newenvironment{Ed@part}[3]% text, mess, start
{\addtocounter{ednote}{1}\edef\new@number{\theednote}\message{#2!\new@number}
-\ifshowednotes\ed@foot{#1}{#2}{}\ed@margin{#3:\new@number}\fi}
-\def\endnew@part#1% end
-{\ifshowednotes\ed@margin{#1:\new@number}\fi}
-\def\b@newpart@label{BegNP}\def\e@newpart@label{EndNP}
-\newcommand\newpartlabels[2]{\def\b@newpart@label{#1}\def\e@newpart@label{#2}}
-\newenvironment{Newpart}[1]{\new@part{#1}{New Part}\b@newpart@label}{}
-\newenvironment{newpart}[1]{\new@part{#1}{New Part}\b@newpart@label}{\endnew@part\e@newpart@label}
+\ifshowednotes\ed@foot{#1}{#2}{}\fi}
+{}
+\def\ed@part#1#2#3#4% text, mess, start, margin
+{\Ed@part{#1}{#2}{#3}\ifshowednotes\ed@margin{#4:\new@number}\fi}
+\def\ended@part#1{\endEd@part\ifshowednotes\ed@margin{#1:\new@number}\fi}
+\newcommand\b@newpart@label{BegNP}\newcommand\e@newpart@label{EndNP}
+\newcommand\b@newpart@margin{BNP}\newcommand\e@newpart@margin{ENP}
+\newcommand\newpartmargins[2]{\def\b@newpart@margin{#1}\def\e@newpart@margin{#2}}
+\newenvironment{Newpart}[1]{\Ed@part{#1}{New Part}\b@newpart@label}{\endEd@part}
+\newenvironment{newpart}[1]{\ed@part{#1}{New Part}\b@newpart@label\b@newpart@margin}{\ended@part\e@newpart@margin}
\newcommand\oldpartlabels[2]{\def\b@oldpart@label{#1}\def\e@oldpart@label{#2}}
-\def\b@oldpart@label{BegOP}\def\e@oldpart@label{EndOP}
+\newcommand\oldpartmargins[2]{\def\b@oldpart@margin{#1}\def\e@oldpart@margin{#2}}
+\newcommand\b@oldpart@label{BegOP}\newcommand\e@oldpart@label{EndOP}
+\newcommand\b@oldpart@margin{BOP}\newcommand\e@oldpart@margin{EOP}
\newenvironment{Oldpart}[1]%
-{\new@part{#1}{Old Part}\b@oldpart@label\ifshowednotes\color{gray}\fi}{}
+{\Ed@part{#1}{Old Part}\b@oldpart@label\ifshowednotes\color{gray}\fi}
+{\endEd@part}
\newenvironment{oldpart}[1]%
-{\new@part{#1}{Old Part}\b@oldpart@label\ifshowednotes\color{gray}\fi}
-{\endnew@part\e@oldpart@label}
-\newcommand\todolabel[1]{\def\todo@label{#1}}
-\def\todo@label{ToDo}
-\newcommand{\Todo}[2][]{\Ed@note{#2}\todo@label{#1}\ifshowednotes\bgroup\sffamily\else\comment\fi}
-\def\endTodo{\ifshowednotes\egroup\else\endcomment\fi}
-\newcommand{\todo}[2][]{\ed@note{#2}\todo@label{#1}\ifshowednotes\bgroup\sffamily\else\comment\fi}
-\def\endtodo{\endTodo}
-\def\Todolist#1{% the comment
-\ifshowednotes\message{todolist!}{{\sffamily To Do: #1}}\bgroup\sffamily\begin{compactenum}%
+{\ed@part{#1}{Old Part}\b@oldpart@label\b@oldpart@margin\ifshowednotes\color{gray}\fi}
+{\ended@part\e@oldpart@margin}
+\newcommand\todolabels[2]{\def\b@todo@label{#1}\def\e@todo@label{#2}}
+\newcommand\todomargins[2]{\def\b@todo@margin{#1}\def\e@todo@margin{#2}}
+\newcommand\b@todo@label{ToDo}\newcommand\e@todo@label{Done}
+\newcommand\b@todo@margin{ToDo}\newcommand\e@todo@margin{Done}
+\newenvironment{Todo}[1]%
+{\Ed@part{#1}{To Do}\b@todo@label\ifshowednotes\bgroup\ednoteshape\else\comment\fi}
+{\endEd@part\e@todo@label\ifshowednotes\egroup\else\endcomment\fi}
+\newenvironment{todo}[1]%
+{\ed@part{#1}{To Do}\b@todo@label\b@todo@margin\ifshowednotes\bgroup\ednoteshape\else\comment\fi}
+{\ended@part\e@todo@margin\ifshowednotes\egroup\else\endcomment\fi}
+\newenvironment{Todolist}[1]{% the comment
+\ifshowednotes\message{todolist!}{{\ednoteshape To Do: #1}}\bgroup\ednoteshape\begin{compactenum}%
\else\comment%
\fi}
-\def\endTodolist{\ifshowednotes\end{compactenum}\egroup\else\endcomment\fi}
-\def\todolist#1{\ifshowednotes\ed@margin{{\sffamily ToDo}}\Todolist{#1}\fi}
-\def\endtodolist{\endTodolist}
+{\ifshowednotes\end{compactenum}\egroup\else\endcomment\fi}
+\newenvironment{todolist}[1]{\ifshowednotes\ed@margin{{\ednoteshape ToDo}}\Todolist{#1}\fi}
+{\endTodolist}
\newenvironment{musings}{\ifshowednotes\color{blue}\fi}{}
-\def\@ednotemessage{\ifnum\value{ednote}>0\typeout{}%
+\def\ed@stubURI{}
+\newcommand\edstuURI[1]{\gdef\ed@stubURI{#1}}
+\newif\ifhref\hreffalse
+\AtBeginDocument{\@ifpackageloaded{hyperref}{\hreftrue}{\hreffalse}}
+\newenvironment{edstub}[2][]
+{\def\@test{#1}\begin{center}\huge\color{red}
+\ifx\@test\@empty The following blue text \else #1 \fi is only a provisional stub\\\Large
+the Office document
+\ifx\ed@stubURI\@empty{#2}\else\ifhref\href{\ed@stubURI}{#2}\else{#2}\fi\fi\
+contains more text\\which will be merged for the final document
+ \end{center}\color{blue}}
+{}
+\newcommand\@ednotemessage{\ifnum\value{ednote}>0\typeout{}%
\typeout{There are still \arabic{ednote} EdNotes, New/Oldparts, and Issues to resolve!}%
\typeout{}\fi}
\AtEndDocument{\@ednotemessage}
-\def\ednotemessage{\PackageWarning{ed}{The `\ednotemessage' macro is obsolete, the message
+\newcommand\ednotemessage{\PackageWarning{ed}{The `\ednotemessage' macro is obsolete, the message
is generated automatically now.}}
-\long\def\edexplanation{\todolist{we will use the ednote system to communicate}
+\newcommand\edexplanation{\todolist{we will use the ednote system to communicate}
\item use the {\tt{\char92ednote\char123author: some explanatory text\char125}}
like a footnote to say what you have done or what should still be
done\ednote{MiKo: this is an example of an ednote}. Ednotes are numbered and