summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/todonotes/examples
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/todonotes/examples')
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.pdfbin0 -> 62871 bytes
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.tex38
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/examples/externalize.pdfbin0 -> 27659 bytes
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/examples/externalize.tex43
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.pdfbin0 -> 25180 bytes
-rw-r--r--Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.tex27
6 files changed, 108 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.pdf b/Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.pdf
new file mode 100644
index 00000000000..201460a83e0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.tex b/Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.tex
new file mode 100644
index 00000000000..df607835f85
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/todonotes/examples/alterAppearenceOfListOfTodos.tex
@@ -0,0 +1,38 @@
+\documentclass{book}
+
+\usepackage{todonotes}
+\usepackage{lipsum}
+\makeatletter
+\def\myaddcontentsline#1#2#3{%
+ \addtocontents{#1}{\protect\contentsline{#2}{#3}{see \thesection\ at p. \thepage}{}}}
+\renewcommand{\@todonotes@addElementToListOfTodos}{%
+ \if@todonotes@colorinlistoftodos%
+ \myaddcontentsline{tdo}{todo}{{%
+ \colorbox{\@todonotes@currentbackgroundcolor}%
+ {\textcolor{\@todonotes@currentbackgroundcolor}{o}}%
+ \ \@todonotes@caption}}%
+ \else%
+ \myaddcontentsline{tdo}{todo}{{\@todonotes@caption}}%
+ \fi}%
+\newcommand*\mylistoftodos{%
+ \begingroup
+ \setbox\@tempboxa\hbox{see 9.9 at p. 99}%
+ \renewcommand*\@tocrmarg{\the\wd\@tempboxa}%
+ \renewcommand*\@pnumwidth{\the\wd\@tempboxa}%
+ \listoftodos%
+ \endgroup
+}
+\makeatother
+
+\begin{document}
+\chapter{My first chapter}
+\section{A first section}
+\lipsum
+\todo{This is a note}
+\section{Another section}
+\lipsum
+\todo{This is another note}
+
+\tableofcontents
+\mylistoftodos
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/todonotes/examples/externalize.pdf b/Master/texmf-dist/doc/latex/todonotes/examples/externalize.pdf
new file mode 100644
index 00000000000..f9374bbedee
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/todonotes/examples/externalize.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/todonotes/examples/externalize.tex b/Master/texmf-dist/doc/latex/todonotes/examples/externalize.tex
new file mode 100644
index 00000000000..3d6776cb764
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/todonotes/examples/externalize.tex
@@ -0,0 +1,43 @@
+% comment out to define
+%\def\CompileTikZFigures{}
+
+\documentclass{article}
+\usepackage{xspace}
+\usepackage{tikz}
+\ifx\CompileTikZFigures\undefined
+ \usetikzlibrary{external}
+ \tikzexternalize[prefix=pics/tikz/]
+\fi
+
+\usepackage{todonotes}
+
+\ifx\CompileTikZFigures\undefined
+ \makeatletter
+ \renewcommand{\todo}[2][]{%
+ \tikzexternaldisable%
+ \@bsphack\@todo[#1]{#2}\@esphack\ignorespaces%
+ \tikzexternalenable%
+ \xspace%
+ }
+ \makeatother
+\else
+ \makeatletter
+ \renewcommand{\todo}[2][]{%
+ \@bsphack\@todo[#1]{#2}\@esphack\ignorespaces\xspace%
+ }
+ \makeatother
+\fi
+
+\begin{document}
+Example by Marek Rjelka.
+
+\verb+\CompileTikZFigures+ is
+\ifx\CompileTikZFigures\undefined%
+ un%
+\fi%
+defined.
+
+\bigskip
+Here goes some\todo{a comment} text.
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.pdf b/Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.pdf
new file mode 100644
index 00000000000..7250a372280
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.tex b/Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.tex
new file mode 100644
index 00000000000..86f7f970f89
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/todonotes/examples/saveColorByUsingLayers.tex
@@ -0,0 +1,27 @@
+\documentclass{article}
+\usepackage{todonotes}
+\usepackage{ocg-p}
+\newcommand{\TODO}[1]{
+\newsavebox\todoboxa
+\savebox\todoboxa{\begin{ocg}[printocg=never]{ToDo screen}{todo4screen}{1}
+\todo[inline]{#1}
+\end{ocg}}
+\newsavebox\todoboxb
+\savebox\todoboxb{\begin{ocg}[printocg=always]{ToDo print}{todo4print}{0}
+\todo[inline, color=white]{#1}
+\end{ocg}}
+\noindent\usebox\todoboxb\llap{\usebox\todoboxa}
+\global\let\todoboxa\relax
+\global\let\todoboxb\relax
+}
+
+\begin{document}
+
+\section{Hello world!}
+
+The todo inserted below is shown in color on the screen, but in black and white when sent to the printer.
+
+Example by Robert Rehner.
+
+\TODO{Example todo}
+\end{document}