texlive[51522] Master/texmf-dist: zebra-goodies (1jul19)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 1 23:09:12 CEST 2019


Revision: 51522
          http://tug.org/svn/texlive?view=revision&revision=51522
Author:   karl
Date:     2019-07-01 23:09:12 +0200 (Mon, 01 Jul 2019)
Log Message:
-----------
zebra-goodies (1jul19)

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

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/zebra-goodies/zebra-goodies.pdf
    trunk/Master/texmf-dist/source/latex/zebra-goodies/
    trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.dtx
    trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.ins

Modified: trunk/Master/texmf-dist/doc/latex/zebra-goodies/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zebra-goodies/README.md	2019-07-01 19:36:22 UTC (rev 51521)
+++ trunk/Master/texmf-dist/doc/latex/zebra-goodies/README.md	2019-07-01 21:09:12 UTC (rev 51522)
@@ -1,23 +1,23 @@
 # zebra-goodies
 
-A collection of handy macros for paper writing in my group. Do remove this
-package once the paper is finished.
+A collection of handy macros for note taking, like `todo` and `comment`. This is
+not intended for general cases. Use it at your own risk.
 
-This is not intended for general cases. Use it at your own risk.
-
 ## Options
 
-* `draft`: boolean option, whether to show the notes. Enabled by default. Example to disable it:
+- `draft`: boolean option, whether to show the notes. Enabled by default. Example to disable it:
+    ```latex
+    \usepackage[draft=false]{zebra-goodies}
+    % or use the complementary option "final"
+    \usepackage[final]{zebra-goodies}
+    ```
+- `microtype`: boolean option, whether to load package `microtype`. Enabled by default.
 
-```latex
-\usepackage[draft=false]{zebra-goodies}
-```
-
-* `microtype`: boolean option, whether to load package `microtype`. Enabled by default.
-
 ## Take Notes
 
-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:
+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,7 +27,9 @@
 \placeholder[<who>]{bla bla}
 ```
 
-If any of them does not work, it is very likely that it has been defined by other packages. We will not override the definition, so you have to turn to its full version as follows:
+If any of them does not work, it is very likely that 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}

Added: trunk/Master/texmf-dist/doc/latex/zebra-goodies/zebra-goodies.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/zebra-goodies/zebra-goodies.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zebra-goodies/zebra-goodies.pdf	2019-07-01 19:36:22 UTC (rev 51521)
+++ trunk/Master/texmf-dist/doc/latex/zebra-goodies/zebra-goodies.pdf	2019-07-01 21:09:12 UTC (rev 51522)

Property changes on: trunk/Master/texmf-dist/doc/latex/zebra-goodies/zebra-goodies.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.dtx	2019-07-01 21:09:12 UTC (rev 51522)
@@ -0,0 +1,583 @@
+% \iffalse meta-comment
+%<*internal>
+\iffalse
+%</internal>
+%<*dummy>
+I'd like to keep this part here for later use.
+%</dummy>
+%<*internal>
+\fi
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+  \expandafter\begingroup
+\fi
+%</internal>
+%<*install>
+\input l3docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+Copyright (C) 2016-2019, Ruini Xue <xueruini at gmail.com>
+
+It may be distributed and/or modified under the conditions of
+the LaTeX Project Public License (LPPL), either version 1.3c of
+this license or (at your option) any later version.  The latest
+version of this license is in the file:
+
+   http://www.latex-project.org/lppl.txt
+\endpreamble
+\postamble
+
+This work is "maintained" (as per LPPL maintenance status) by
+  Ruini Xue.
+
+This work consists of the file  zebra-goodies.dtx
+          and the derived files zebra-goodies.ins,
+                                zebra-goodies.pdf and
+                                zebra-goodies.sty.
+
+\endpostamble
+\usedir{tex/latex/zebra-goodies}
+\generate{
+  \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
+%</install>
+%<install>\endbatchfile
+%<*internal>
+\usedir{source/latex/zebra-goodies}
+\generate{
+  \file{\jobname.ins}{\from{\jobname.dtx}{install}}
+}
+%\nopreamble\nopostamble
+%\usedir{doc/latex/zebra-goodies}
+%\generate{
+%  \file{README.md}{\from{\jobname.dtx}{dummy}}
+%}
+\ifx\fmtname\nameofplainTeX
+  \expandafter\endbatchfile
+\else
+  \expandafter\endgroup
+\fi
+%</internal>
+%<*driver|package>
+%\RequirePackage{xparse}
+%</driver|package>
+%<*driver>
+\documentclass[full]{l3doc}
+\usepackage[scaled=0.93]{helvet}
+\usepackage[final]{listings}
+\usepackage{zebra-goodies}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+  \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%\makeatletter
+%
+%^^A For creating examples with nice highlighting of code, and so
+%^^A on; based on the system used in the listings source (lstsample).
+%\lst at RequireAspects{writefile}
+%\newsavebox{\LaTeXdemo at box}
+%\lstnewenvironment{LaTeXdemo}[1][code and example]{^^A
+%  \global\let\lst at intname\@empty
+%  \expandafter\let\expandafter\LaTeXdemo at end
+%    \csname LaTeXdemo@#1 at end\endcsname
+%  \@nameuse{LaTeXdemo@#1}^^A
+%}{^^A
+%  \LaTeXdemo at end
+%}
+%\newcommand*\LaTeXdemo at new[3]{^^A
+%  \expandafter\newcommand\expandafter*\expandafter
+%    {\csname LaTeXdemo@#1\endcsname}{#2}^^A
+%  \expandafter\newcommand\expandafter*\expandafter
+%    {\csname LaTeXdemo@#1 at end\endcsname}{#3}^^A
+%}
+%\newcommand*\LaTeXdemo at common{^^A
+%  \setkeys{lst}{
+%    basicstyle      = \small\ttfamily,
+%    %basewidth       = 0.51em,
+%    frame           = l,
+%    backgroundcolor = \color{gray!5},
+%    gobble          = 3,
+%    keywordstyle    = \bfseries\color{blue},
+%    language        = [LaTeX]{TeX},
+%    moretexcs       = {
+%      todo            ,
+%      note            ,
+%      comment         ,
+%      fixed           ,
+%      placeholder     ,
+%      zebratodo       ,
+%      zebranote       ,
+%      zebracomment    ,
+%      zebrafixed      ,
+%      zebraplaceholder,
+%      zebranewnote
+%    }
+%  }^^A
+%}
+%\newcommand*\LaTeXdemo at input{^^A
+%  \MakePercentComment
+%  \catcode`\^^M=10\relax
+%  \small
+%  \begingroup
+%    \setkeys{lst}{
+%      SelectCharTable=\lst at ReplaceInput{\^\^I}{\lst at ProcessTabulator}
+%    }^^A
+%    \leavevmode
+%      \input{\jobname.tmp}^^A
+%  \endgroup
+%  \MakePercentIgnore
+%}
+%\LaTeXdemo at new{code and example}{^^A
+%  \setbox\LaTeXdemo at box=\hbox\bgroup
+%    \lst at BeginAlsoWriteFile{\jobname.tmp}^^A
+%    \LaTeXdemo at common
+%}{^^A
+%    \lst at EndWriteFile
+%  \egroup
+%  \begin{center}
+%    \ifdim\wd\LaTeXdemo at box>0.48\linewidth\relax
+%      \hbox to\linewidth{\box\LaTeXdemo at box\hss}^^A
+%        \begin{minipage}{\linewidth}
+%          \LaTeXdemo at input
+%        \end{minipage}
+%    \else
+%      \begin{minipage}{0.48\linewidth}
+%        \LaTeXdemo at input
+%      \end{minipage}
+%      \hfill
+%      \begin{minipage}{0.48\linewidth}
+%        \hbox to\linewidth{\box\LaTeXdemo at box\hss}^^A
+%      \end{minipage}
+%    \fi
+%  \end{center}
+%}
+%\LaTeXdemo at new{code only}{^^A
+%  \LaTeXdemo at common
+%}{^^A
+%}
+%
+%\providecommand*\opt[1]{\texttt{#1}}
+%
+%\makeatother
+%
+%\GetFileInfo{\jobname.sty}
+%
+%\changes{v0.1.0}{2017/07/05}{Initial public release}
+%\changes{v0.2.0}{2017/11/26}{Fix \pkg{xcolor} conflict}
+%\changes{v0.3.0}{2017/12/06}{Detect command conflicts}
+%\changes{v0.4.0}{2019/06/29}{Show note number for easy reference}
+%\changes{v0.5.0}{2019/06/29}{Use darker color for label}
+%\changes{v0.6.0}{2019/06/30}{Use gray background for label}
+%
+%\title{^^A
+%  \pkg{zebra-goodies} --- Easy Notes Taking^^A
+%    \thanks{^^A
+%      This file describes version \fileversion, last revised
+%      \filedate.^^A
+%    }^^A
+%}
+%\author{^^A
+%  Ruini Xue\thanks{E-mail: xueruini at gmail.com}^^A
+%}
+%\date{Released \filedate}
+%
+%\maketitle
+%
+%\begin{abstract}
+%  The \pkg{zebra-goodies} package defines a collection of handy macros for
+%  taking notes during document writing. It is designed to be very simple and
+%  good enough for writing common documents independently or collaboratively.
+%  Several commands, \cs{todo}, \cs{comment}, \cs{note}, \cs{fixed} and
+%  \cs{placeholder}, are provided for quick start. It is also possible to add
+%  new note taking commands with \cs{zebranewnote}.
+%\end{abstract}
+%
+%\tableofcontents
+%
+%\begin{documentation}
+%
+%\section{Introduction}
+%
+% There are quite a few note taking and todo packages available. However, I do
+% not like the interfaces they provided. Some of them create a huge, complex
+% and complicated feature set trying to fit all use cases, while others abuse
+% the margin par to show too many colorful boxes and long text, even worse, some
+% packages link the annotations and the original text with arrows, which results
+% in a really unreadable document.
+%
+% So, I need a simple and good enough note taking package. With ``simple'', I
+% want the commands to be intuitive and equipped with just necessary arguments.
+% With ``good enough'', the document's appearance could be changed a bit to
+% present the notes for easy reading but not too much. Additionally, all notes
+% should be addressed once the file is in final state. As a kind reminder, a
+% summary table presents the notes statistics according to note types at the end
+% of the document.
+%
+% With these objectives in mind, \pkg{zebra-goodies} is created and improved
+% along with my writing activities. Apparently, this package is designed with a
+% heavy personal bias. It is not supposed to be general and perfect.
+%
+%\section{Installation}
+%
+%\changes{v0.7.0}{2019/07/01}{Move to docstrip}
+%
+% The package is supplied in \file{dtx} format and as a pre-extracted zip file.
+% The later is most convenient for most users: simply unzip this in your local
+% texmf directory and run \texttt{texhash} to update the database of file
+% locations, or just unzip the files into your working directory. If you want to
+% unpack the \file{dtx} yourself, running \texttt{tex \jobname.dtx} will extract
+% the package whereas \texttt{latex \jobname.dtx} will extract it and also
+% typeset the documentation.\footnote{Actually, \texttt{latexmk \jobname.dtx} is
+% much better.}
+%
+%\section{Using the package}
+%
+% The package should be loaded as normal in the preamble. The package
+% recognises a number of options, which can also be used in the document
+% body. These are described later in this document.
+%\begin{LaTeXdemo}[code only]
+%  \usepackage[<options>]{zebra-goodies}
+%\end{LaTeXdemo}
+%
+%\subsection{Notes Macros}
+%\begin{function}{\todo}
+%  \begin{syntax}
+%    \cs{todo}\oarg{name}\marg{note content}
+%  \end{syntax}
+%\end{function}
+%
+%  The basic function provided by \pkg{zebra-goodies} is the \cs{todo} macro.
+%  This is used to insert a piece of \texttt{todo} note right here, taking a
+%  mandatory argument, the \meta{note content} of the \texttt{todo}, and an
+%  optional argument, the \meta{name} who should be responsible for this note.
+%  For example, the author wants \meta{name} to address this todo. This is very
+%  helpful during collaboration. The todo note will be typesetted in a
+%  predefined color and quoted in the current paragraph along with the famous
+%  symbol in margin par.
+%
+% \begin{LaTeXdemo}
+%   A very simple example of a todo note \todo{how should we go to the lake?},
+%   and the result will be presented right below the code snippet. Please
+%   compare the code and the result.
+% \end{LaTeXdemo}
+%
+% And, the following example shows how to set the assignees:
+%
+% \begin{LaTeXdemo}
+%   Another one with an assignee is like \todo[tom]{you should buy the ticket},
+%   and you will find the same type of notes are numbered. And the assignees are
+%   being \texttt{@}-ed right before the text. And another one with many
+%   assignees \todo[lucy,jessie]{prepare the foo}.
+% \end{LaTeXdemo}
+
+%  Since \pkg{zebra-goodies} uses running texts, so \cs{todo} also works in
+%  title macros like \cs{section} and \cs{caption}.
+%
+%  \begin{LaTeXdemo}[code only]
+%    \section{Introduction\todo[jerry]{please figure out a better name}}
+%    \begin{figure}
+%      \centering
+%      \caption{Speed vs distance. \todo[need to insert the figure]}
+%    \end{figure}
+%  \end{LaTeXdemo}
+%
+%\begin{function}{\note}
+%  \begin{syntax}
+%    \cs{note}\oarg{name}\marg{note text}
+%  \end{syntax}
+%\end{function}
+%\begin{function}{\comment}
+%  \begin{syntax}
+%    \cs{comment}\oarg{name}\marg{comment text}
+%  \end{syntax}
+%\end{function}
+%\begin{function}{\fixed}
+%  \begin{syntax}
+%    \cs{fixed}\oarg{name}\marg{fixed text}
+%  \end{syntax}
+%\end{function}
+%\begin{function}{\placeholder}
+%  \begin{syntax}
+%    \cs{placeholder}\oarg{name}\marg{placeholder text}
+%  \end{syntax}
+%\end{function}
+%  All these commands share the same syntax as \cs{todo}, so do the behaviour.
+%  They are defined just for convenience for different cases. Nothing magic are
+%  behind.
+%
+%  If any of them does not work, it is very likely that they are defined by
+%  other packages. In order to avoid unnecessary confusion, \cs{zebra-goodies}
+%  will not \cs{renewcommand} them in case they are defined. So, it comes to
+%  their internal counterparts.
+%  \begin{LaTeXdemo}
+%    A very simple example of a todo note \note{how should we go to the lake?}
+%    and another one with an assignee is like \zebracomment[tom]{you should buy
+%    the ticket}. As you noticed, \cs{zebracomment} is used instead \cs{comment}
+%    here is because \cs{comment} has been defined by \pkg{l3doc}. Let's move on
+%    to other macros. and another one with many assignees
+%    \placeholder[lucy,jessie]{prepare the foo} and the issue has been
+%    \fixed[John]{good job!}. We'd like to add more lines to separate the bend
+%    symbols. Finally, let's try to use the full version like this, I am going
+%    to add a \todo{a new todo} and a extended note to be put in another line
+%    with useless words as you known like this, this and that and eventually we
+%    come to the \note[who]{note}.
+%  \end{LaTeXdemo}
+%
+%  With these macros, it is very simple to good enough for note taking.
+%
+%\begin{function}{\zebratodo}
+%  \begin{syntax}
+%    \cs{zebratodo}\oarg{name}\marg{note text}
+%  \end{syntax}
+%
+%  \cs{todo} will not be defined if it has been defined by other packages,
+%  please use its internal alias, \cs{zebratodo}. This is how the other notes
+%  macros are defined.
+%\end{function}
+%\begin{function}{\zebranote}
+%  \begin{syntax}
+%    \cs{zebranote}\oarg{name}\marg{note text}
+%  \end{syntax}
+%\end{function}
+%\begin{function}{\zebracomment}
+%  \begin{syntax}
+%    \cs{zebracomment}\oarg{name}\marg{comment text}
+%  \end{syntax}
+%\end{function}
+%\begin{function}{\zebrafixed}
+%  \begin{syntax}
+%    \cs{zebrafixed}\oarg{name}\marg{fixed text}
+%  \end{syntax}
+%\end{function}
+%\begin{function}{\zebraplaceholder}
+%  \begin{syntax}
+%    \cs{zebraplaceholder}\oarg{name}\marg{placeholder text}
+%  \end{syntax}
+%\end{function}
+%
+%\begin{function}{\zebranewnote}
+%  \begin{syntax}
+%    \cs{zebranewnote}\marg{note name}\marg{xcolor color spec}
+%  \end{syntax}
+%  You will eventually need a new note type for whatever reasons.
+%  \cs{zebranewnote} needs two arguments to create a new note type. \meta{note
+%  name} will be used as the note's macro as \cs{todo}, while the \meta{xcolor
+%  color spec} defines in what color the new note show be. The color is defined
+%  with \pkg{xcolor}.
+%  \begin{LaTeXdemo}
+%    % \zebranewnote{question}{red!80}
+%
+%    When it moves to the next step, we should be fine. %\question[who]{what's this?}
+%  \end{LaTeXdemo}
+%\end{function}
+%
+%\subsection{Package Options}
+%
+%\DescribeOption{draft}
+%\DescribeOption{final}
+
+% These two options are complementary to each other. When no explicit mode is
+% given, \opt{draft} is \texttt{true}, in which case all notes will be
+% typesetted as well as the the summary table at end of the document. By setting
+% \opt{draft} to \texttt{false} or \opt{final}, notes will not be presented.
+%
+%\DescribeOption{microtype}
+% Enable the great \pkg{microtype} package or not. Default: \texttt{true}. I
+% personally love this package very much.
+%
+%\section{Predefined Colors}
+%
+% This is for personal use. I often use \pkg{pgfplots} to create plots, however,
+% I do not like the default color. So several are define:
+% \begin{itemize}
+% \item \texttt{zebrablue}
+% \item \texttt{zebrared}
+% \item \texttt{zebrayellow}
+% \item \texttt{zebrapurple}
+% \item \texttt{zebragreen}
+% \end{itemize}
+%
+%\end{documentation}
+%
+%\begin{implementation}
+%
+%\section{Implementation}
+%
+%    \begin{macrocode}
+%<*package>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%<@@=zebra_goodies>
+%    \end{macrocode}
+%
+% Version data to start with.
+%    \begin{macrocode}
+\ProvidesPackage{zebra-goodies}
+[2019/07/01 0.7.0 Easy Notes Taking]
+%\ProvidesExplPackage{zebra-goodies}{2019/07/01}{0.7.0}{Easy Notes Taking}
+%    \end{macrocode}
+%
+%\subsection{Package options}
+%
+% Two package options \opt{draft} and \opt{microtype} are created.
+%    \begin{macrocode}
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{
+  family=zebra,
+  prefix=zebr@,
+  setkeys=\kvsetkeys}
+\DeclareBoolOption{draft}
+\DeclareComplementaryOption{final}{draft}
+\DeclareBoolOption{microtype}
+\setkeys{zebra}{draft,microtype}
+\ProcessKeyvalOptions{zebra}
+\ifzebr at microtype
+  \RequirePackage{microtype}
+\fi
+\RequirePackage{xcolor}
+\RequirePackage{tikzpagenodes}
+\RequirePackage{marginnote}
+\@ifundefined{dbend}{\RequirePackage{manfnt}}{}
+%    \end{macrocode}
+%
+% \subsection{Main notes macros}
+% Various helper macros are defined before reaching out to the \cs{todo} commands.
+%
+% First, the margin note code is from
+% \href{http://tex.stackexchange.com/questions/247449/making-marginnote-to-appear-either-side-of-twocolumn-twoside-document-part-ii}{StackExchage.com} with a bit modification.
+%    \begin{macrocode}
+\newlength{\zebr at tempdima}
+\newcount{\zebr at tikzpage}
+\newcommand*{\zebr at marginnote}[1]{%
+  \begin{tikzpicture}[remember picture, overlay]%
+    \pgfextractx{\zebr at tempdima}{\pgfpointanchor{current page text area}{center}}%
+    \global\zebr at tempdima=\zebr at tempdima
+    \global\zebr at tikzpage=\oddpage at page
+  \end{tikzpicture}%
+  \begingroup
+    \ifdim\zebr at tempdima>0pt \reversemarginpar\fi
+    \marginnote{#1}%
+  \endgroup% resets \reversemarginpar
+}
+%    \end{macrocode}
+%
+% Then, two meta macros are used to create new types of note.
+%    \begin{macrocode}
+\def\zebr at note{%
+  \ifzebr at draft\expandafter\zebr at note@\else\expandafter\@gobblefour\fi}
+%    \end{macrocode}
+%
+% \cs{zebr at note@} is the core macro to typeset the note. The syntax is:
+% \begin{syntax}
+%    \cs{zebr at note@}\marg{note name}\marg{color}\marg{assignee}\marg{note text}
+% \end{syntax}
+%    \begin{macrocode}
+\newcommand{\zebr at note@}[4]{%
+  \zebr at marginnote{\textcolor{#2}{\dbend}}%
+  \expandafter\stepcounter{zebr at num@#1}%
+  \textcolor{#2}{[\colorbox[gray]{0.97}{%
+      \textcolor{#2!70!black}{%
+        \textsc{\MakeLowercase{\MakeUppercase#1}}
+        {\expandafter\csname thezebr at num@#1\endcsname}\texttt{#3}:}} #4]}}
+\newcommand{\zebr at prepend}[2]{%
+  \ifx\relax#2\relax\relax\else#1#2\fi}
+%    \end{macrocode}
+%
+% \begin{macro}{\zebranewnote}
+% All note types are created with \cs{zebranewnote}.
+%    \begin{macrocode}
+\global\def\zebr at noteslist{}
+\def\zebranewnote#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 zebra#1\endcsname[2][]{%
+    \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.}}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\todo}
+% \begin{macro}{\note}
+% \begin{macro}{\fixed}
+% \begin{macro}{\comment}
+% \begin{macro}{\placeholder}
+% They are defined with \cs{zebranewnote}. The colors are picked up from the default
+% ones from \pkg{xcolor}.
+%    \begin{macrocode}
+\zebranewnote{todo}{purple}
+\zebranewnote{fixed}{teal}
+\zebranewnote{comment}{blue}
+\zebranewnote{note}{violet}
+\zebranewnote{placeholder}{gray}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%\subsection{Print summary at end of the document}
+%
+% A summary table will be inserted automatically at end of the document for easy
+% checking. Each note type is presend in a line with its associated color.
+%
+%    \begin{macrocode}
+\def\zebr at listnotes{%
+  \ifzebr at draft\zebr at listnotes@\fi}
+\def\zebr at listnotes@{%
+  \def\temp at a{}
+  \edef\temp at noteslist{\expandafter\@gobble\zebr at noteslist}
+  \@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\\}
+      \expandafter\g at addto@macro\expandafter\temp at a\expandafter{\temp at d}%
+    \fi}
+  \ifx\temp at a\@empty\else%
+    \noindent\dotfill\par
+    \section*{Zebra Notes}
+    \par \medskip
+    \begin{center}
+      \begin{tabular}{lr}
+        \hline
+        \textbf{Type} & \textbf{Number} \\\hline
+        \temp at a
+        \hline
+      \end{tabular}
+    \end{center}
+  \fi}
+\AtEndDocument{\zebr at listnotes}
+%    \end{macrocode}
+%
+%\subsection{Personal Colors}
+%\label{sec:colors}
+% For colors are defined for plots.
+%    \begin{macrocode}
+\definecolor{zebrablue}{HTML}{4F81BD}
+\definecolor{zebrared}{HTML}{C0504D}
+\definecolor{zebragreen}{HTML}{9BBB00}
+\definecolor{zebrapurple}{HTML}{9F4C7C}
+\definecolor{zebrayellow}{HTML}{D9CD2E}
+\definecolor{zebragreen2}{HTML}{00E000}
+%    \end{macrocode}
+%    \begin{macrocode}
+%</package>
+%    \end{macrocode}
+%
+%\end{implementation}
+%
+%\PrintChanges
+%\PrintIndex


Property changes on: trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/zebra-goodies/zebra-goodies.ins	2019-07-01 21:09:12 UTC (rev 51522)
@@ -0,0 +1,57 @@
+%%
+%% This is file `zebra-goodies.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% zebra-goodies.dtx  (with options: `install')
+%% Copyright (C) 2016-2019, Ruini Xue <xueruini at gmail.com>
+%% 
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version.  The latest
+%% version of this license is in the file:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+\input l3docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+Copyright (C) 2016-2019, Ruini Xue <xueruini at gmail.com>
+
+It may be distributed and/or modified under the conditions of
+the LaTeX Project Public License (LPPL), either version 1.3c of
+this license or (at your option) any later version.  The latest
+version of this license is in the file:
+
+   http://www.latex-project.org/lppl.txt
+\endpreamble
+\postamble
+
+This work is "maintained" (as per LPPL maintenance status) by
+  Ruini Xue.
+
+This work consists of the file  zebra-goodies.dtx
+          and the derived files zebra-goodies.ins,
+                                zebra-goodies.pdf and
+                                zebra-goodies.sty.
+
+\endpostamble
+\usedir{tex/latex/zebra-goodies}
+\generate{
+  \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
+\endbatchfile
+
+
+%% 
+%% This work is "maintained" (as per LPPL maintenance status) by
+%%   Ruini Xue.
+%% 
+%% This work consists of the file  zebra-goodies.dtx
+%%           and the derived files zebra-goodies.ins,
+%%                                 zebra-goodies.pdf and
+%%                                 zebra-goodies.sty.
+%% 
+%%
+%% End of file `zebra-goodies.ins'.

Modified: trunk/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty	2019-07-01 19:36:22 UTC (rev 51521)
+++ trunk/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty	2019-07-01 21:09:12 UTC (rev 51522)
@@ -1,16 +1,22 @@
-%% Copyright (C) 2017-2019 by Ruini Xue <xueruini at gmail.com>
 %%
-%% This file may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3a
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in:
+%% This is file `zebra-goodies.sty',
+%% generated with the docstrip utility.
 %%
-%% http://www.latex-project.org/lppl.txt
+%% The original source files were:
 %%
-%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2008/05/04 or later.
-\ProvidesPackage{zebra-goodies}[2019/06/30 0.6.0 LaTeX goodies for paper writing.]
+%% zebra-goodies.dtx  (with options: `package')
+%% Copyright (C) 2016-2019, Ruini Xue <xueruini at gmail.com>
+%% 
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version.  The latest
+%% version of this license is in the file:
+%% 
+%%    http://www.latex-project.org/lppl.txt
 
+
+\ProvidesPackage{zebra-goodies}
+[2019/07/01 0.7.0 Easy Notes Taking]
 \RequirePackage{kvoptions}
 \SetupKeyvalOptions{
   family=zebra,
@@ -17,11 +23,10 @@
   prefix=zebr@,
   setkeys=\kvsetkeys}
 \DeclareBoolOption{draft}
+\DeclareComplementaryOption{final}{draft}
 \DeclareBoolOption{microtype}
 \setkeys{zebra}{draft,microtype}
 \ProcessKeyvalOptions{zebra}
-
-% comment this if you do not need.
 \ifzebr at microtype
   \RequirePackage{microtype}
 \fi
@@ -28,17 +33,9 @@
 \RequirePackage{xcolor}
 \RequirePackage{tikzpagenodes}
 \RequirePackage{marginnote}
-\RequirePackage{manfnt}
-
-%%%%%%%%%%%%%%%%%%
-% zebra-note
-%%%%%%%%%%%%%%%%%%
-
-% From: http://tex.stackexchange.com/questions/247449/making-marginnote-to-appear-either-side-of-twocolumn-twoside-document-part-ii
-% I did a little edit.
+\@ifundefined{dbend}{\RequirePackage{manfnt}}{}
 \newlength{\zebr at tempdima}
 \newcount{\zebr at tikzpage}
-
 \newcommand*{\zebr at marginnote}[1]{%
   \begin{tikzpicture}[remember picture, overlay]%
     \pgfextractx{\zebr at tempdima}{\pgfpointanchor{current page text area}{center}}%
@@ -50,35 +47,35 @@
     \marginnote{#1}%
   \endgroup% resets \reversemarginpar
 }
-
 \def\zebr at note{%
   \ifzebr at draft\expandafter\zebr at note@\else\expandafter\@gobblefour\fi}
-
-% #1: note name
-% #2: color
-% #3: assignee
-% #4: note text
 \newcommand{\zebr at note@}[4]{%
   \zebr at marginnote{\textcolor{#2}{\dbend}}%
   \expandafter\stepcounter{zebr at num@#1}%
-  \textcolor{#2}{[\colorbox[gray]{0.97}{\textcolor{#2!70!black}{\textsc{\MakeLowercase{\MakeUppercase#1}} {\expandafter\csname thezebr at num@#1\endcsname}\texttt{#3}:}} #4]}}
-
+  \textcolor{#2}{[\colorbox[gray]{0.97}{%
+      \textcolor{#2!70!black}{%
+        \textsc{\MakeLowercase{\MakeUppercase#1}}
+        {\expandafter\csname thezebr at num@#1\endcsname}\texttt{#3}:}} #4]}}
 \newcommand{\zebr at prepend}[2]{%
   \ifx\relax#2\relax\relax\else#1#2\fi}
-
 \global\def\zebr at noteslist{}
 \def\zebranewnote#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 zebra#1\endcsname[2][]{% we suppose it is not defined yet
+  \expandafter\newcommand\csname zebra#1\endcsname[2][]{%
     \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.}}}
-
+  \@ifundefined{#1}{%
+    \expandafter\def\csname #1\endcsname{\csname zebra#1\endcsname}}{%
+    \PackageWarning{zebra}{'\textbackslash{#1}' has been taken.
+      Use '\textbackslash{zebra#1}' instead.}}}
+\zebranewnote{todo}{purple}
+\zebranewnote{fixed}{teal}
+\zebranewnote{comment}{blue}
+\zebranewnote{note}{violet}
+\zebranewnote{placeholder}{gray}
 \def\zebr at listnotes{%
   \ifzebr at draft\zebr at listnotes@\fi}
-
 \def\zebr at listnotes@{%
   \def\temp at a{}
   \edef\temp at noteslist{\expandafter\@gobble\zebr at noteslist}
@@ -85,7 +82,9 @@
   \@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%
@@ -99,22 +98,9 @@
         \temp at a
         \hline
       \end{tabular}
-      \par \medskip
-      \textbf{Do fix all of them before submitting.}
     \end{center}
   \fi}
-
 \AtEndDocument{\zebr at listnotes}
-
-\zebranewnote{todo}{purple}
-\zebranewnote{fixed}{teal}
-\zebranewnote{comment}{blue}
-\zebranewnote{note}{violet}
-\zebranewnote{placeholder}{gray}
-
-%%%%%%%%%%%%%%
-% zebra-color
-%%%%%%%%%%%%%%
 \definecolor{zebrablue}{HTML}{4F81BD}
 \definecolor{zebrared}{HTML}{C0504D}
 \definecolor{zebragreen}{HTML}{9BBB00}
@@ -121,5 +107,14 @@
 \definecolor{zebrapurple}{HTML}{9F4C7C}
 \definecolor{zebrayellow}{HTML}{D9CD2E}
 \definecolor{zebragreen2}{HTML}{00E000}
-
-\endinput
+%% 
+%% This work is "maintained" (as per LPPL maintenance status) by
+%%   Ruini Xue.
+%% 
+%% This work consists of the file  zebra-goodies.dtx
+%%           and the derived files zebra-goodies.ins,
+%%                                 zebra-goodies.pdf and
+%%                                 zebra-goodies.sty.
+%% 
+%%
+%% End of file `zebra-goodies.sty'.



More information about the tex-live-commits mailing list