summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
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
parentda5a8ebcbef768e7565429bb04feb998d3da0869 (diff)
ed (29jan12)
git-svn-id: svn://tug.org/texlive/trunk@25231 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/ed/Makefile7
-rw-r--r--Master/texmf-dist/doc/latex/ed/ed.pdfbin262893 -> 291503 bytes
-rw-r--r--Master/texmf-dist/source/latex/ed/ed.dtx198
-rw-r--r--Master/texmf-dist/tex/latex/ed/ed.sty115
4 files changed, 224 insertions, 96 deletions
diff --git a/Master/texmf-dist/doc/latex/ed/Makefile b/Master/texmf-dist/doc/latex/ed/Makefile
new file mode 100644
index 00000000000..6a0a1e5b6d7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ed/Makefile
@@ -0,0 +1,7 @@
+PREFIX = ../../lib
+PACKAGE = ed
+DTX.sty.base = ed
+
+include $(PREFIX)/Makefile.vars
+include $(PREFIX)/Makefile.in
+
diff --git a/Master/texmf-dist/doc/latex/ed/ed.pdf b/Master/texmf-dist/doc/latex/ed/ed.pdf
index 8af2b476228..0aaa84fe261 100644
--- a/Master/texmf-dist/doc/latex/ed/ed.pdf
+++ b/Master/texmf-dist/doc/latex/ed/ed.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/ed/ed.dtx b/Master/texmf-dist/source/latex/ed/ed.dtx
index 1828ae7b478..918756b1c36 100644
--- a/Master/texmf-dist/source/latex/ed/ed.dtx
+++ b/Master/texmf-dist/source/latex/ed/ed.dtx
@@ -12,7 +12,7 @@
%
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-%<package>\ProvidesPackage{ed}[2011/01/16 v1.7 Editorial Notes]
+%<package>\ProvidesPackage{ed}[2012/01/29 v1.8 Editorial Notes]
%
%<*driver>
\documentclass[twoside]{ltxdoc}
@@ -27,16 +27,17 @@
\usepackage{textcomp,url,a4wide}
\usepackage[show]{ed}
\usepackage[eso-foot,today,draft]{svninfo}
+\usepackage{hyperref}
%\makeindex
\begin{document}
-\svnInfo $Id: ed.dtx 21009 2011-01-15 09:07:26Z kohlhase $
+\svnInfo $Id: ed.dtx 23125 2012-01-29 12:15:08Z kohlhase $
\svnKeyword $HeadURL: https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/ed/ed.dtx $
\DocInput{ed.dtx}
\end{document}
%</driver>
% \fi
%
-%\CheckSum{311}
+%\CheckSum{409}
%
% \changes{v1.0}{2005/06/23}{First Version with Documentation}
% \changes{v1.1}{2005/10/03}{Added capitalized variants}
@@ -48,6 +49,7 @@
% \changes{v1.6}{2009/06/24}{deprecated issue for edissue to get around name clashes.}
% \changes{v1.6}{2009/10/29}{made ednotemessage automatic}
% \changes{v1.7}{2011/01/16}{adding final/draft options}
+% \changes{v1.8}{2012/01/29}{adding \texttt{edstub} environment}
%
% \GetFileInfo{ed.sty}
%
@@ -66,6 +68,8 @@
% are suppressed.
% \end{abstract}
%
+% \tableofcontents\newpage
+%
% \section{Introduction}\label{sec:intro}
%
% When collaborating on a document with multiple authors, communication about the status
@@ -86,6 +90,8 @@
%
% \section{The User Interface}\label{sec:user-interface}
%
+% \subsection{Package Options}
+%
% As usual in {\LaTeX}, the package is loaded by |\usepackage[|\meta{options}|]{ed}|,
% where |[|\meta{options}|]| is optional and gives a comma separated list of options. The
% |ed| package takes the options \DescribeMacro{show}|show| and
@@ -156,7 +162,35 @@
% convenient in situations (e.g. inside boxes or minipages) that allow footnotes, but no
% margin notes.
%
-% \subsection{Generating Statistics and Explanations}
+% \subsection{Stubs and External Files}
+%
+% In some collaborative editing situations not all participants are willing to write
+% {\LaTeX}, but insist on developing their proposal parts in some other word procesing
+% software. The |ed| class offers the \DescribeEnv{edstub}|edstub| environment:
+%
+% |\begin{edstub}[|\meta{exp}|]{|\meta{file}|}| marks the content of the environment as
+% provisional (e.g. by turning it blue) and lists an external file (\meta{file}) as the
+% original. Here, \meta{exp} is an optional reformulation of the default desription
+% ``The following blue text''. The following stub
+%
+% \begin{edstub}{stub.doc}
+% here are some provisional ideas
+% \end{edstub}
+%
+% is generated by
+%
+% \begin{verbatim}
+% \begin{edstub}{stub.doc}
+% here are some provisional ideas
+% \end{edstub}
+% \end{verbatim}
+%
+% For hyperlinking \meta{file} the \DescribeMacro{edstubURI}|edstubURI| can be used to set
+% a URI: After setting |\edstubURI{|\meta{URI}|}| with a non-empty URI, \meta{file} is
+% hyperlinked to \meta{URI}|/|\meta{file}. If \meta{file} is in the same directory as the
+% current document, use |\edstubURI{.}|.
+%
+% \subsection{Generating Statistics and Explanations}
%
% \DescribeMacro{\ednotemessage} Up to version 1.6, the |ed| package had an explicit macro
% |\ednotemessage| that put just before the |\end||{document}| will generates a message
@@ -181,14 +215,15 @@
% following form: |\ednote{author: some explanatory text}| to specify the originator of the
% note.
%
-% \StopEventually{\newpage\PrintChanges}
-% \newpage
-%
+% \StopEventually{\newpage\PrintChanges}\newpage
%
% \section{The Implementation}
%
-% The implementation is rather standard. We first set up the options for the package. The
-% main switch is |\showednotes|, which governs the visibility of the annotations.
+% The implementation is rather standard. We first set up the options for the package.
+%
+% \subsection{Package Options}
+%
+% The main switch is |\showednotes|, which governs the visibility of the annotations.
% \begin{macrocode}
%<*package>
\newif\ifshowednotes\showednotesfalse
@@ -216,11 +251,14 @@
% \end{macrocode}
% This ends the package setup code, so we can come to the implementation of the
% functionality of the package.
+%
+% \subsection{Annotation Macros}
+%
% \begin{macro}{\ednoteshape}
% We start with the configuration part, predefining
% |\epdnoteshape| to be sans serif.
% \begin{macrocode}
-\def\ednoteshape{\sffamily}
+\newcommand\ednoteshape{\sffamily}
% \end{macrocode}
% \end{macro}
%
@@ -234,25 +272,32 @@
% by the interface macros to give the annotations. It takes three arguments: A comment
% text that goes into the footnote, a type descriptor, and an identifiers.
% \begin{macrocode}
-\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}}
+\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}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ed@footnote}
+% extends the |\ed@foot| to a complete footnote
+% \begin{macrocode}
+\newcommand\ed@footnote[3]{\footnotemark[\arabic{ednote}]\ed@foot{#1}{#2}{#3}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ed@margin}
% The internal macro |\ed@margin| makes a |\marginpar| annotation if allowed.
% \begin{macrocode}
-\def\ed@margin#1{\ifmargins\marginpar{#1}\fi}
+\newcommand\ed@margin[1]{\ifmargins\marginpar{#1}\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Ed@note}
% Another internal macro |\Ed@note| adds label management to |\ed@foot|
% \begin{macrocode}
-\def\Ed@note#1#2#3% text, type, label
+\newcommand\Ed@note[3]% text, type, label
{\addtocounter{ednote}{1}\message{#2!}%
-\ifshowednotes\footnotemark[\arabic{ednote}]\ed@foot{#1}{#2}{#3}\fi}
+\ifshowednotes\ed@footnote{#1}{#2}{#3}\fi}
% \end{macrocode}
% \end{macro}
%
@@ -260,15 +305,17 @@
% |\ed@note| is a variant of |\Ed@note| that also makes an identifying mark in the
% margin.
% \begin{macrocode}
-\def\ed@note#1#2#3% text, type, label
-{\Ed@note{#1}{#2}{#3}\ifshowednotes\ed@margin{#2:\arabic{ednote}}\fi}
+\newcommand\ed@note[4]% text, type, label, margin
+{\Ed@note{#1}{#2}{#3}\ifshowednotes\ed@margin{#4:\arabic{ednote}}\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ednotelabel}
% \begin{macrocode}
-\def\ednote@label{EdNote}
+\newcommand\ednote@label{EdNote}
+\newcommand\ednote@margin{EdN}
\newcommand\ednotelabel[1]{\def\ednote@label{#1}}
+\newcommand\ednotemargin[1]{\def\ednote@margin{#1}}
% \end{macrocode}
% \end{macro}
%
@@ -277,72 +324,87 @@
% functionality of |\Ednote| and |\ednote|:
% \begin{macrocode}
\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}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tweaklabel}
% \begin{macrocode}
\newcommand\tweaklabel[1]{\def\tweak@label{#1}}
-\def\tweak@label{Tweak}
+\newcommand\tweak@label{Tweak}
+\newcommand\tweakmargin[1]{\def\tweak@margin{#1}}
+\newcommand\tweak@margin{Tw}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tweak}
% and of course for |\tweak|:
% \begin{macrocode}
-\newcommand{\tweak}[2][]{\ed@note{#2}\tweak@label{#1}}
+\newcommand{\tweak}[2][]{\ed@note{#2}\tweak@label{#1}\tweak@margin}
\newcommand{\Tweak}[2][]{\Ed@note{#2}\tweak@label{#1}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\edissuelabel}
% \begin{macrocode}
-\def\edissue@label{Issue}
+\newcommand\edissue@label{Issue}
\newcommand\edissuelabel[1]{\def\edissue@label{#1}}
+\newcommand\edissue@margin{Is}
+\newcommand\edissuemargin[1]{\def\edissue@margin{#1}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\edissue}
% \begin{macrocode}
-\providecommand{\issue}[2][]{\ed@note{#2}\edissue@label{#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}}
% \end{macrocode}
% \end{macro}
%
-% \begin{environment}{new@part}
-% For the text status environments |newpart| and |oldpart| we also set up an internal
+% \begin{environment}{Ed@part}
+% For the text status environments |Newpart| and |Oldpart| we also set up an internal
% macro that does the work.
% \begin{macrocode}
-\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}
+\ifshowednotes\ed@foot{#1}{#2}{}\fi}
+{}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{ed@part}
+% and one that makes the marginpars.
+% \begin{macrocode}
+\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}
% \end{macrocode}
% \end{environment}
%
% \begin{environment}{newpartlabels}
% \begin{macrocode}
-\def\b@newpart@label{BegNP}\def\e@newpart@label{EndNP}
-\newcommand\newpartlabels[2]{\def\b@newpart@label{#1}\def\e@newpart@label{#2}}
+\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}}
% \end{macrocode}
% \end{environment}
%
% \begin{environment}{newpart}
% We instantiate it for the |newpart| environment
% \begin{macrocode}
-\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}
+\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}
% \end{macrocode}
% \end{environment}
%
% \begin{environment}{oldpartlabels}
% \begin{macrocode}
\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}
% \end{macrocode}
% \end{environment}
%
@@ -350,17 +412,20 @@
% and of course for the |oldpart| environment
% \begin{macrocode}
\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}
+{\ed@part{#1}{Old Part}\b@oldpart@label\b@oldpart@margin\ifshowednotes\color{gray}\fi}
+{\ended@part\e@oldpart@margin}
% \end{macrocode}
% \end{environment}
%
% \begin{environment}{todolabel}
% \begin{macrocode}
-\newcommand\todolabel[1]{\def\todo@label{#1}}
-\def\todo@label{ToDo}
+\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}
% \end{macrocode}
% \end{environment}
%
@@ -369,10 +434,12 @@
% package option). If we hide annotations, |todo| is set to |comment| from the
% |comment| package, otherwise the body is set in sans serif font for emphasis.
% \begin{macrocode}
-\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}
+\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}
% \end{macrocode}
% \end{environment}
%
@@ -381,13 +448,13 @@
% package option). If we hide annotations, |todolist| is set to |comment| from the
% |comment| package, otherwise it is set to an itemize.
% \begin{macrocode}
-\def\Todolist#1{% the comment
-\ifshowednotes\message{todolist!}{{\sffamily To Do: #1}}\bgroup\sffamily\begin{compactenum}%
+\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}
% \end{macrocode}
% \end{environment}
%
@@ -397,12 +464,37 @@
% \end{macrocode}
% \end{environment}
%
+% \begin{macro}{\edstubURI}
+% \begin{macrocode}
+\def\ed@stubURI{}
+\newcommand\edstuURI[1]{\gdef\ed@stubURI{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Stubs and External Files}
+%
+% \begin{environment}{edstub}
+% \begin{macrocode}
+\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}}
+{}
+% \end{macrocode}
+% \end{environment}
+%
+%
% \subsection{Generating Statistics and Explanations}
%
% \begin{macro}{\ednotemessage}
% The |\@ednotemessage| makes use of the counter |ednote| and generates a message.
% \begin{macrocode}
-\def\@ednotemessage{\ifnum\value{ednote}>0\typeout{}%
+\newcommand\@ednotemessage{\ifnum\value{ednote}>0\typeout{}%
\typeout{There are still \arabic{ednote} EdNotes, New/Oldparts, and Issues to resolve!}%
\typeout{}\fi}
% \end{macrocode}
@@ -415,7 +507,7 @@
% \begin{macro}{\ednotemessage}
% The old |\ednotemessage| is now deprecated
% \begin{macrocode}
-\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.}}
% \end{macrocode}
% \end{macro}
@@ -423,7 +515,7 @@
% \begin{macro}{\edexplanation}
% The |\edexplanation| macro makes use of the |todolist| environment.
% \begin{macrocode}
-\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
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