diff --git a/todonotes.dtx b/todonotes.dtx index 503a186..04d8995 100644 --- a/todonotes.dtx +++ b/todonotes.dtx @@ -532,6 +532,13 @@ % \end{wrapfigure} % \end{verbatim} % +% \DescribeMacro{figheight} +% The |figheight=length| option changes the height of the inserted +% missing figure. +% \begin{verbatim} +% \missingfigure[figheight=6cm]{Testing a long text string} +% \end{verbatim} +% \missingfigure[figheight=6cm]{Testing} % % % \subsection{Options for the listoftodos command} @@ -1084,6 +1091,7 @@ \newcommand{\@todonotes@textwidth}{\marginparwidth} \newcommand{\@todonotes@textsize}{\normalsize} \newcommand{\@todonotes@figwidth}{\columnwidth} +\newcommand{\@todonotes@figheight}{4cm} % \end{macrocode} % \begin{macrocode} \AtBeginDocument{ @@ -1272,6 +1280,8 @@ % \begin{macrocode} \define@key{todonotes.sty}% {figwidth}{\renewcommand{\@todonotes@figwidth}{#1}} +\define@key{todonotes.sty}% + {figheight}{\renewcommand{\@todonotes@figheight}{#1}} % \end{macrocode} % Make the text width as an option. % \begin{macrocode} @@ -1384,11 +1394,14 @@ \@todonotes@captiongiventrue}% \define@key{todonotes}{nocaption}[]{\@todonotes@captiongivenfalse}% % \end{macrocode} -% Change the current figure width. +% Change the current figure width and height. % \begin{macrocode} \newcommand{\@todonotes@currentfigwidth}{\@todonotes@figwidth} \define@key{todonotes}% {figwidth}{\renewcommand{\@todonotes@currentfigwidth}{#1}} +\newcommand{\@todonotes@currentfigheight}{\@todonotes@figheight} +\define@key{todonotes}% + {figheight}{\renewcommand{\@todonotes@currentfigheight}{#1}} % \end{macrocode} % Preset values of the options % \begin{macrocode} @@ -1403,6 +1416,7 @@ nocaption,% noauthor,% figwidth=\@todonotes@figwidth,% + figheight=\@todonotes@figheight,% line, list, size=\@todonotes@textsize}{}% % \end{macrocode} % \subsection{The main code part} @@ -1685,7 +1699,7 @@ \noindent \begin{tikzpicture} \draw[fill=black!40, draw = white, line width=0pt] - (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, 4cm); + (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, \@todonotes@currentfigheight); \draw (2, -0.3) node[right, text width=\@todonotes@currentfigwidth-4.5cm] {#2}; \draw[red, fill=white, rounded corners = 5pt, line width=10pt]