diff options
author | Karl Berry <karl@freefriends.org> | 2012-09-18 00:04:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-09-18 00:04:03 +0000 |
commit | 117c9494a1d801a829f6e898f493e2d18c6e07d3 (patch) | |
tree | d82670ca4769d15664a4eb752e39a8590781132d /Master/texmf-dist | |
parent | c1d60321ff8dce536932b6ae6a195ffdc082beab (diff) |
fixmetodonotes (17sep12)
git-svn-id: svn://tug.org/texlive/trunk@27685 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
3 files changed, 91 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/fixmetodonotes/README b/Master/texmf-dist/doc/latex/fixmetodonotes/README index 46d9aca6e1e..ae6c7e7118e 100644 --- a/Master/texmf-dist/doc/latex/fixmetodonotes/README +++ b/Master/texmf-dist/doc/latex/fixmetodonotes/README @@ -27,6 +27,36 @@ To show a list of pending notes, together with links to their pages, use The list of notes will be shown like a table of content or a list of figures. +### Creating new kinds of notes + +By default, `fixmetodonotes` provides three kinds of notes: `FIXME`, `TODO` and +`CITE`. + +It is possible to add declare new kinds of notes using the `\defnote` +command. Notes can be declared as _margin_ or _inline_ notes. It is also +possible to specify new ways to mark the text. + +To define a new kind of note marginal note `REMOVE` with crossed out text use + + \defnote{REMOVE}{margin}{\sout} + +Similarly, to define a red highlight marker `STYLE` use + + \defnote{STYLE}{inline}{\NOTES@colorline{red}} + + +### Automatic "DRAFT" watermark + +`fixmetodonotes` will add a "DRAFT" watermark to any page that has at least +one notes. + +When all the notes are removed from a page, the watermark will not be produced +at all. This means that it is possible to leave `fixmetodonotes` enabled even +in final versions of the documents. + +Use the `nowatermark` option to disable all watermarks. + + Installation ------------ @@ -46,6 +76,13 @@ git repository. git clone git://github.com/gioele/fixmetodonotes.git +Contact +------- + +The homepage of `fixmetodonotes` is <https://github.com/gioele/fixmetodonotes>. +You can send any issue or comment to <https://github.com/gioele/fixmetodonotes/issues>. + + Authors ------- diff --git a/Master/texmf-dist/source/latex/fixmetodonotes/fixmetodonotes.dtx b/Master/texmf-dist/source/latex/fixmetodonotes/fixmetodonotes.dtx index c0607a6e636..bd0942ec48a 100644 --- a/Master/texmf-dist/source/latex/fixmetodonotes/fixmetodonotes.dtx +++ b/Master/texmf-dist/source/latex/fixmetodonotes/fixmetodonotes.dtx @@ -1,10 +1,24 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fixmetodonote}[2012/06/14 v0.1] +\ProvidesPackage{fixmetodonotes}[2012/09/17 v0.2.1] + + +\newif\if@NOTES@enabled \@NOTES@enabledtrue + +\DeclareOption{enabled}{} % default +\DeclareOption{disabled}{\@NOTES@enabledfalse} + +\newif\if@watermark \@watermarktrue + +\DeclareOption{watermark}{} % default +\DeclareOption{nowatermark}{\@watermarkfalse} + +\ProcessOptions\relax + \RequirePackage{graphicx} \RequirePackage{color} \RequirePackage{transparent} -\RequirePackage{watermark} +\if@watermark\RequirePackage{watermark}\fi \RequirePackage{fix-cm} \RequirePackage[normalem]{ulem} \RequirePackage[titles]{tocloft} @@ -12,6 +26,10 @@ \newcommand{\listnotesname}{List of notes} \newlistof{note}{notes}{\listnotesname} +\if@NOTES@enabled\else + \renewcommand{\listofnote}{} +\fi + \newcommand{\@HUGE}{\fontsize{100}{120}\selectfont} \newcommand{\@wmstyle}{\color{red}\transparent{0.1}\@HUGE} \newcommand{\@wmtext}{\textsc{DRAFT}} @@ -45,12 +63,16 @@ \addcontentsline{notes}{note}{\protect\numberline{\thenote}{{#1}: {#2}}}% } +\newcommand{\NOTES@defnoteimpl}[4]{% + \NOTES@usemarker{#3}{#2}% + #4{#1}% + \NOTES@addtolist{#2}{#1}% + \if@watermark\@DRAFTwatermark\fi% +} + \newcommand{\defnote}[3]{% \global\expandafter\newcommand\csname #1\endcsname[1]{% - \NOTES@usemarker{#2}{#1}% - #3{##1}% - \NOTES@addtolist{#1}{##1}% - \@DRAFTwatermark% + \if@NOTES@enabled\NOTES@defnoteimpl{##1}{#1}{#2}{#3}\fi% }% } diff --git a/Master/texmf-dist/tex/latex/fixmetodonotes/fixmetodonotes.sty b/Master/texmf-dist/tex/latex/fixmetodonotes/fixmetodonotes.sty index e166dc1bf8c..8a7f8592a21 100644 --- a/Master/texmf-dist/tex/latex/fixmetodonotes/fixmetodonotes.sty +++ b/Master/texmf-dist/tex/latex/fixmetodonotes/fixmetodonotes.sty @@ -20,12 +20,24 @@ %% for more details. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fixmetodonote}[2012/06/14 v0.1] +\ProvidesPackage{fixmetodonotes}[2012/09/17 v0.2.1] + +\newif\if@NOTES@enabled \@NOTES@enabledtrue + +\DeclareOption{enabled}{} % default +\DeclareOption{disabled}{\@NOTES@enabledfalse} + +\newif\if@watermark \@watermarktrue + +\DeclareOption{watermark}{} % default +\DeclareOption{nowatermark}{\@watermarkfalse} + +\ProcessOptions\relax \RequirePackage{graphicx} \RequirePackage{color} \RequirePackage{transparent} -\RequirePackage{watermark} +\if@watermark\RequirePackage{watermark}\fi \RequirePackage{fix-cm} \RequirePackage[normalem]{ulem} \RequirePackage[titles]{tocloft} @@ -33,6 +45,10 @@ \newcommand{\listnotesname}{List of notes} \newlistof{note}{notes}{\listnotesname} +\if@NOTES@enabled\else + \renewcommand{\listofnote}{} +\fi + \newcommand{\@HUGE}{\fontsize{100}{120}\selectfont} \newcommand{\@wmstyle}{\color{red}\transparent{0.1}\@HUGE} \newcommand{\@wmtext}{\textsc{DRAFT}} @@ -65,12 +81,16 @@ \addcontentsline{notes}{note}{\protect\numberline{\thenote}{{#1}: {#2}}}% } +\newcommand{\NOTES@defnoteimpl}[4]{% + \NOTES@usemarker{#3}{#2}% + #4{#1}% + \NOTES@addtolist{#2}{#1}% + \if@watermark\@DRAFTwatermark\fi% +} + \newcommand{\defnote}[3]{% \global\expandafter\newcommand\csname #1\endcsname[1]{% - \NOTES@usemarker{#2}{#1}% - #3{##1}% - \NOTES@addtolist{#1}{##1}% - \@DRAFTwatermark% + \if@NOTES@enabled\NOTES@defnoteimpl{##1}{#1}{#2}{#3}\fi% }% } |