texlive[46004] Master/texmf-dist: zebra-goodies (7dec17)

commits+karl at tug.org commits+karl at tug.org
Thu Dec 7 00:56:23 CET 2017


Revision: 46004
          http://tug.org/svn/texlive?view=revision&revision=46004
Author:   karl
Date:     2017-12-07 00:56:22 +0100 (Thu, 07 Dec 2017)
Log Message:
-----------
zebra-goodies (7dec17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/zebra-goodies/README.md
    trunk/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty

Modified: trunk/Master/texmf-dist/doc/latex/zebra-goodies/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zebra-goodies/README.md	2017-12-06 23:56:06 UTC (rev 46003)
+++ trunk/Master/texmf-dist/doc/latex/zebra-goodies/README.md	2017-12-06 23:56:22 UTC (rev 46004)
@@ -17,7 +17,7 @@
 
 ## Take Notes
 
-Add comments, todos, anything you like during revise in a colorful way. The package also summarizes the revise notes at the end of the document. Predefined commands are as follows:
+Add comments, todos, notes anything you like during revise in a colorful way. The package also summarizes the revise notes at the end of the document. Predefined commands are as follows:
 
 ```latex
 \todo[<who>]{bla bla}
@@ -27,9 +27,19 @@
 \placeholder[<who>]{bla bla}
 ```
 
-To define new note commands:
+If any of them does not work, it is probaboly it has been defined by other packages. We will not override the definition, so you have to turn to its full version as follows:
 
 ```latex
+\zebratodo[<who>]{bla bla}
+\zebrafixed[<who>]{bla bla}
+\zebracomment[<who>]{bla bla}
+\zebranote[<who>]{bla bla}
+\zebraplaceholder[<who>]{bla bla}
+```
+
+## Define new Notes
+
+```latex
 % \zebranewnote{<note name>}{<xcolor color>}
 \zebranewnote{question}{red!80}
 

Modified: trunk/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty	2017-12-06 23:56:06 UTC (rev 46003)
+++ trunk/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty	2017-12-06 23:56:22 UTC (rev 46004)
@@ -9,7 +9,7 @@
 %%
 %% and version 1.3c or later is part of all distributions of LaTeX
 %% version 2008/05/04 or later.
-\ProvidesPackage{zebra-goodies}[2017/11/26 0.2.0 LaTeX goodies for paper writing.]
+\ProvidesPackage{zebra-goodies}[2017/12/6 0.3.0 LaTeX goodies for paper writing.]
 
 \RequirePackage{kvoptions}
 \SetupKeyvalOptions{
@@ -66,16 +66,15 @@
 \newcommand{\zebr at prepend}[2]{%
   \ifx\relax#2\relax\relax\else#1#2\fi}
 
+\global\def\zebr at noteslist{}
 \def\zebranewnote#1#2{%
-  \@ifundefined{#1}{\zebr at newnote{#1}{#2}}{%
-    \PackageWarning{zebra}{zebra already defines note: '#1'}}}
-\global\def\zebr at noteslist{}
-\def\zebr at newnote#1#2{%
   \g at addto@macro\zebr at noteslist{,#1}%
   \expandafter\newcounter\expandafter{zebr at num@#1}
   \expandafter\newcommand\csname zebr at color@#1\endcsname{#2}
-  \expandafter\newcommand\csname #1\endcsname[2][]{%
-    \zebr at note{#1}{#2}{\zebr at prepend{@}{##1}}{##2}}}
+  \expandafter\newcommand\csname zebra#1\endcsname[2][]{% we suppose it is not defined yet
+    \zebr at note{#1}{#2}{\zebr at prepend{@}{##1}}{##2}}
+  \@ifundefined{#1}{\expandafter\def\csname #1\endcsname{\csname zebra#1\endcsname}}{%
+    \PackageWarning{zebra}{'\textbackslash{#1}' has been taken. Use '\textbackslash{zebra#1}' instead.}}}
 
 \def\zebr at listnotes{%
   \ifzebr at draft\zebr at listnotes@\fi}
@@ -86,7 +85,7 @@
   \@for\temp at b:=\temp at noteslist\do{%
     \expandafter\ifnum\expandafter\value\expandafter{zebr at num@\temp at b} > 0%
       \def\temp at c{\expandafter\csname thezebr at num@\temp at b\endcsname}
-      \edef\temp at d{\noexpand\textcolor{\expandafter\csname zebr at color@\temp at b\endcsname}{\temp at b} \noexpand &  \temp at c \noexpand\\}
+      \edef\temp at d{\noexpand\textcolor{\expandafter\csname zebr at color@\temp at b\endcsname}{\temp at b} \noexpand &  \temp at c\noexpand\\}
       \expandafter\g at addto@macro\expandafter\temp at a\expandafter{\temp at d}%
     \fi}
   \ifx\temp at a\@empty\else%



More information about the tex-live-commits mailing list