Last active
December 21, 2015 06:49
-
-
Save a-ludi/6267240 to your computer and use it in GitHub Desktop.
This command adds two complemantary options `hide` and `show` to the `todonotes` package. If `hide` is given then the todo note itself will not be rendered, but a index entry will be created. **Usage:** while this is not part of the `todonote` package you can insert this snippet in your preample *after* the package has been loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\makeatletter | |
\if@todonotes@disabled% | |
\else | |
\newif\if@todonotes@localhide\@todonotes@localhidefalse% | |
\define@key{todonotes}{hide}[]{\@todonotes@localhidetrue}% | |
\define@key{todonotes}{show}[]{\@todonotes@localhidefalse}% | |
\renewcommand{\@todo}[2][]{% | |
\if@todonotes@prependcaptionglobal% | |
\@todonotes@prependcaptiontrue% | |
\else% | |
\@todonotes@prependcaptionfalse% | |
\fi% | |
\renewcommand{\@todonotes@text}{#2}% | |
\renewcommand{\@todonotes@caption}{#2}% | |
\setkeys{todonotes}{#1}% | |
\if@todonotes@localdisable% | |
\else% | |
\addtocounter{@todonotes@numberoftodonotes}{1}% | |
\if@todonotes@appendtolistoftodos% | |
\phantomsection% | |
\if@todonotes@captiongiven% | |
\else% | |
\renewcommand{\@todonotes@caption}{#2}% | |
\fi% | |
\@todonotes@addElementToListOfTodos% | |
\fi% | |
\if@todonotes@captiongiven% | |
\if@todonotes@prependcaption% | |
\renewcommand{\@todonotes@text}{\@todonotes@caption: #2}% | |
\fi% | |
\fi% | |
\if@todonotes@hidden | |
\@todonotes@localhidefalse | |
\else | |
\if@todonotes@inlinenote% | |
\@todonotes@drawInlineNote% | |
\else% | |
\@todonotes@drawMarginNoteWithLine% | |
\fi%\if@todonotes@inlinenote | |
\fi%\if@todonotes@hidden | |
\fi%\if@todonotes@localdisable | |
}%renewcommand{\@todo}[2][] | |
\fi%if@todonotes@disabled | |
\makeatother |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment