parameter inlinepar

master
Daniel Krenn 8 years ago committed by Jacopo De Simoi
parent 3e9f4ef857
commit b5ea6386cd
  1. 30
      todonotes.dtx

@ -1515,6 +1515,13 @@
\define@key{todonotes}%
{inlinewidth}{\renewcommand{\@todonotes@inlinewidth}{#1}}
% \end{macrocode}
% Change if inline note is written to a separate line or not.
% \begin{macrocode}
\newif\if@todonotes@inlinepar
\@todonotes@inlinepartrue
\define@key{todonotes}{inlinepar}[]{\@todonotes@inlinepartrue}%
\define@key{todonotes}{noinlinepar}[]{\@todonotes@inlineparfalse}%
% \end{macrocode}
% Preset values of the options
% \begin{macrocode}
\presetkeys%
@ -1531,7 +1538,8 @@
figheight=\@todonotes@figheight,%
figcolor=\@todonotes@figcolor,%
line, list, size=\@todonotes@textsize,
inlinewidth=\linewidth}{}%
inlinewidth=\linewidth,
inlinepar}{}%
% \end{macrocode}
% \subsection{The main code part}
% Here is the actual macros defined.
@ -1691,24 +1699,32 @@
% \begin{macrocode}
\newcommand{\@todonotes@drawInlineNote}{%
\if@todonotes@dviStyle%
{\par\noindent\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
{\if@todonotes@inlinepar\par\noindent\fi%
\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle] {};
\end{tikzpicture}%
\if@todonotes@inlinepar\par\fi}%
\if@todonotes@authorgiven%
{\noindent \@todonotes@sizecommand \@todonotes@author:\,\@todonotes@text}%
\else%
{\noindent \@todonotes@sizecommand \@todonotes@text}%
\fi
{\par\noindent\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
{\if@todonotes@inlinepar\par\noindent\fi%
\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle] {};
\end{tikzpicture}%
\if@todonotes@inlinepar\par\fi}%
\else%
{\par\noindent\begin{tikzpicture}[remember picture]%
{\if@todonotes@inlinepar\par\noindent\fi%
\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle,font=\@todonotes@sizecommand]{%
\if@todonotes@authorgiven%
{\noindent \@todonotes@sizecommand \@todonotes@author:\,\@todonotes@text}%
\else%
{\noindent \@todonotes@sizecommand \@todonotes@text}%
\fi};%
\end{tikzpicture}\par}%
\end{tikzpicture}%
\if@todonotes@inlinepar\par\fi}%
\fi}%
% \end{macrocode}
% \end{macro}

Loading…
Cancel
Save