texlive[58998] Master/texmf-dist: todonotes (26apr21)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 27 15:32:15 CEST 2021


Revision: 58998
          http://tug.org/svn/texlive?view=revision&revision=58998
Author:   karl
Date:     2021-04-27 15:32:15 +0200 (Tue, 27 Apr 2021)
Log Message:
-----------
todonotes (26apr21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.pdf
    trunk/Master/texmf-dist/doc/latex/todonotes/examples/externalize.pdf
    trunk/Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.pdf
    trunk/Master/texmf-dist/doc/latex/todonotes/todonotes.pdf
    trunk/Master/texmf-dist/source/latex/todonotes/todonotes.dtx
    trunk/Master/texmf-dist/tex/latex/todonotes/todonotes.sty

Modified: trunk/Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/todonotes/examples/externalize.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/todonotes/todonotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/todonotes/todonotes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/todonotes/todonotes.dtx	2021-04-27 13:31:57 UTC (rev 58997)
+++ trunk/Master/texmf-dist/source/latex/todonotes/todonotes.dtx	2021-04-27 13:32:15 UTC (rev 58998)
@@ -20,7 +20,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{todonotes}
 %<*package>
-    [2020/08/18 v1.1.3 Todonotes source and documentation.]
+    [2021/04/26 v1.1.4 Todonotes source and documentation.]
 %</package>
 %
 %<*driver>
@@ -27,7 +27,7 @@
 \documentclass{ltxdoc}
 \usepackage{wrapfig}
 \usepackage[colorlinks, linkcolor=black, urlcolor=blue]{hyperref}
-\usepackage[colorinlistoftodos]{todonotes}[2020/08/18]
+\usepackage[colorinlistoftodos, loadshadowlibrary]{todonotes}[2021/04/26]
 \usepackage{amsmath}
 \usepackage{setspace}
 \usepackage{soul}
@@ -45,7 +45,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{721}
+% \CheckSum{731}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -207,6 +207,8 @@
 % \changes{1.1.2}{2019/01/24}{Fix issue 36 and 37.}
 % \changes{1.1.3}{2020/08/18}{Fix issue 48 and make colors used in the last todo 
 %             globally available.}
+% \changes{1.1.4}{2021/04/26}{Fix issue 51 by avoid loading the tikz shadows 
+%             library by default.}
 % \GetFileInfo{todonotes.dtx}   
 %
 % \DoNotIndex{\newcommand,\newenvironment}
@@ -394,9 +396,15 @@
 % |caption=val| option for the todo command, where the given value
 % |val| is inserted in the inserted todonote.
 % 
+% \DescribeMacro{loadshadowlibrary}
+% If given, the |shadows| tikz library will be loaded. This is required 
+% for adding shadows to the inserted todonotes.
+%
 % \DescribeMacro{shadow}
-% If the |shadow| option is given, the inserted todonotes will be
-% displayed with a gray shadow.
+% If the |shadow| option is given, the inserted todonotes will by 
+% default be displayed with a gray shadow.
+% For this to work, the package option |loadshadowlibrary| must be 
+% provided.
 % I expect that the option will trigger problems with tikz versions
 % prior to 2.0.
 %
@@ -1251,7 +1259,6 @@
 \RequirePackage{xcolor}
 \RequirePackage{tikz}
 \usetikzlibrary{positioning}
-\usetikzlibrary{shadows}
 \RequirePackage{calc}
 %    \end{macrocode}
 % Implement a function for setting up the todonotes package.
@@ -1480,8 +1487,14 @@
 %    \end{macrocode}
 % Add option for shadows behind the inserted notes
 %    \begin{macrocode}
+\newif\if at todonotes@shadowlibraryloaded
+\@todonotes at shadowlibraryloadedfalse
+\DeclareOptionX{loadshadowlibrary}{%
+	\usetikzlibrary{shadows}%
+	\@todonotes at shadowlibraryloadedtrue}
 \newcommand{\@todonotes at shadowenabledbydefault}{noshadow}
-\DeclareOptionX{shadow}{\renewcommand{\@todonotes at shadowenabledbydefault}{shadow}}
+\DeclareOptionX{shadow}{%
+	\renewcommand{\@todonotes at shadowenabledbydefault}{shadow}}
 %    \end{macrocode}
 % Add option for the default width of the figure inserted with
 % |\missingfigure|.
@@ -1723,12 +1736,19 @@
 % Add shadows to the inserted todonotes.
 %    \begin{macrocode}
 \if at todonotes@useshadow%
+\if at todonotes@shadowlibraryloaded%
 \tikzstyle{notestyle} = [notestyleraw,%
     general shadow={shadow xshift=0.5ex, shadow yshift=-0.5ex,%
         opacity=1,fill=black!50}]%
 \else%
+\PackageWarning{todonotes}{Trying to put a shadow below a todonote, 
+	but the loadshadowlibrary option was not given when loading 
+	the todonotes package}
 \tikzstyle{notestyle} = [notestyleraw]%
 \fi%
+\else%
+\tikzstyle{notestyle} = [notestyleraw]%
+\fi%
 %    \end{macrocode}
 % Update notestyles
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/tex/latex/todonotes/todonotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/todonotes/todonotes.sty	2021-04-27 13:31:57 UTC (rev 58997)
+++ trunk/Master/texmf-dist/tex/latex/todonotes/todonotes.sty	2021-04-27 13:32:15 UTC (rev 58998)
@@ -22,7 +22,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{todonotes}
-    [2020/08/18 v1.1.3 Todonotes source and documentation.]
+    [2021/04/26 v1.1.4 Todonotes source and documentation.]
 
 \ProvidesPackage{todonotes}[2018/11/22]
 \RequirePackage{ifthen}
@@ -30,7 +30,6 @@
 \RequirePackage{xcolor}
 \RequirePackage{tikz}
 \usetikzlibrary{positioning}
-\usetikzlibrary{shadows}
 \RequirePackage{calc}
 \newcommand\setuptodonotes[1]{\presetkeys{todonotes}{#1}{}}
 \newcommand{\@todonotes at text}{}%
@@ -183,8 +182,14 @@
     {textsize}{\renewcommand{\@todonotes at textsize}{#1}}
 \define at key{todonotes.sty}%
     {size}{\renewcommand{\@todonotes at textsize}{#1}}
+\newif\if at todonotes@shadowlibraryloaded
+\@todonotes at shadowlibraryloadedfalse
+\DeclareOptionX{loadshadowlibrary}{%
+\usetikzlibrary{shadows}%
+\@todonotes at shadowlibraryloadedtrue}
 \newcommand{\@todonotes at shadowenabledbydefault}{noshadow}
-\DeclareOptionX{shadow}{\renewcommand{\@todonotes at shadowenabledbydefault}{shadow}}
+\DeclareOptionX{shadow}{%
+\renewcommand{\@todonotes at shadowenabledbydefault}{shadow}}
 \define at key{todonotes.sty}%
     {figwidth}{\renewcommand{\@todonotes at figwidth}{#1}}
 \define at key{todonotes.sty}%
@@ -326,12 +331,19 @@
 \renewcommand{\@todonotes at caption}{#2}%
 \setkeys{todonotes}{#1}%
 \if at todonotes@useshadow%
+\if at todonotes@shadowlibraryloaded%
 \tikzstyle{notestyle} = [notestyleraw,%
     general shadow={shadow xshift=0.5ex, shadow yshift=-0.5ex,%
         opacity=1,fill=black!50}]%
 \else%
+\PackageWarning{todonotes}{Trying to put a shadow below a todonote,
+but the loadshadowlibrary option was not given when loading
+the todonotes package}
 \tikzstyle{notestyle} = [notestyleraw]%
 \fi%
+\else%
+\tikzstyle{notestyle} = [notestyleraw]%
+\fi%
 \tikzstyle{notestyleleft} = [%
     notestyle,%
     left]%



More information about the tex-live-commits mailing list.