summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/zebra-goodies
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-01 21:09:12 +0000
committerKarl Berry <karl@freefriends.org>2019-07-01 21:09:12 +0000
commit2ee346b14369d34b308ad2924177c2761739f34a (patch)
tree85ab23d4f12c5abb141922c13a5c9be8cfdfdf13 /Master/texmf-dist/tex/latex/zebra-goodies
parentfd22735f3b8ab49102e995e98040d725b16739d9 (diff)
zebra-goodies (1jul19)
git-svn-id: svn://tug.org/texlive/trunk@51522 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/zebra-goodies')
-rw-r--r--Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty95
1 files changed, 45 insertions, 50 deletions
diff --git a/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty b/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty
index 02275880605..cc73bb12415 100644
--- a/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty
+++ b/Master/texmf-dist/tex/latex/zebra-goodies/zebra-goodies.sty
@@ -1,44 +1,41 @@
-%% Copyright (C) 2017-2019 by Ruini Xue <xueruini@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@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,
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@microtype
\RequirePackage{microtype}
\fi
\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@tempdima}
\newcount{\zebr@tikzpage}
-
\newcommand*{\zebr@marginnote}[1]{%
\begin{tikzpicture}[remember picture, overlay]%
\pgfextractx{\zebr@tempdima}{\pgfpointanchor{current page text area}{center}}%
@@ -50,42 +47,44 @@
\marginnote{#1}%
\endgroup% resets \reversemarginpar
}
-
\def\zebr@note{%
\ifzebr@draft\expandafter\zebr@note@\else\expandafter\@gobblefour\fi}
-
-% #1: note name
-% #2: color
-% #3: assignee
-% #4: note text
\newcommand{\zebr@note@}[4]{%
\zebr@marginnote{\textcolor{#2}{\dbend}}%
\expandafter\stepcounter{zebr@num@#1}%
- \textcolor{#2}{[\colorbox[gray]{0.97}{\textcolor{#2!70!black}{\textsc{\MakeLowercase{\MakeUppercase#1}} {\expandafter\csname thezebr@num@#1\endcsname}\texttt{#3}:}} #4]}}
-
+ \textcolor{#2}{[\colorbox[gray]{0.97}{%
+ \textcolor{#2!70!black}{%
+ \textsc{\MakeLowercase{\MakeUppercase#1}}
+ {\expandafter\csname thezebr@num@#1\endcsname}\texttt{#3}:}} #4]}}
\newcommand{\zebr@prepend}[2]{%
\ifx\relax#2\relax\relax\else#1#2\fi}
-
\global\def\zebr@noteslist{}
\def\zebranewnote#1#2{%
\g@addto@macro\zebr@noteslist{,#1}%
\expandafter\newcounter\expandafter{zebr@num@#1}
\expandafter\newcommand\csname zebr@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@note{#1}{#2}{\zebr@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@listnotes{%
\ifzebr@draft\zebr@listnotes@\fi}
-
\def\zebr@listnotes@{%
\def\temp@a{}
\edef\temp@noteslist{\expandafter\@gobble\zebr@noteslist}
\@for\temp@b:=\temp@noteslist\do{%
\expandafter\ifnum\expandafter\value\expandafter{zebr@num@\temp@b} > 0%
\def\temp@c{\expandafter\csname thezebr@num@\temp@b\endcsname}
- \edef\temp@d{\noexpand\textcolor{\expandafter\csname zebr@color@\temp@b\endcsname}{\temp@b} \noexpand & \temp@c\noexpand\\}
+ \edef\temp@d{\noexpand\textcolor{%
+ \expandafter\csname zebr@color@\temp@b\endcsname}{\temp@b}%
+ \noexpand & \temp@c\noexpand\\}
\expandafter\g@addto@macro\expandafter\temp@a\expandafter{\temp@d}%
\fi}
\ifx\temp@a\@empty\else%
@@ -99,27 +98,23 @@
\temp@a
\hline
\end{tabular}
- \par \medskip
- \textbf{Do fix all of them before submitting.}
\end{center}
\fi}
-
\AtEndDocument{\zebr@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}
\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'.