Re: TODO notes (double entries) in LyX 2.2.2 on Windows 10

2016-12-08 Thread Jürgen Spitzmüller
Am Mittwoch, den 07.12.2016, 22:14 -0500 schrieb Richard Heck:
> So it looks as if this is a bug in the LaTeX package, then, not in
> LyX?

Yes, the following code in the preamble fixes it:

\renewcommand{\@todonotes@drawMarginNote}{%
\if@todonotes@dviStyle%
\begin{tikzpicture}[remember picture]%
\draw node[notestyle] {};%
\end{tikzpicture}\\%
\begin{minipage}{\@todonotes@textwidth}%
\if@todonotes@authorgiven%
  \@todonotes@sizecommand \@todonotes@author \@todonotes@text%
\else%
  \@todonotes@sizecommand \@todonotes@text%
\fi%
\end{minipage}\\%
\begin{tikzpicture}[remember picture]%
\draw node[notestyle] (inNote) {};%
\end{tikzpicture}%
\else%
\let\originalHbadness\hbadness%
\hbadness 10%
\begin{tikzpicture}[remember picture,baseline=(X.base)]%
% Fix 1: consider \@todonotes@sizecommand here!
\node(X){\vphantom{\@todonotes@sizecommand X}};%
\draw node[notestyle,font=\@todonotes@sizecommand,anchor=north]
(inNote) at (X.north)%
% Fix 2: don't output \@todonotes@text twice
{};%{\@todonotes@text};%
\if@todonotes@authorgiven%
\draw node[notestyle,font=\@todonotes@sizecommand,anchor=no
rth] (inNote) at (X.north)%
{\@todonotes@sizecommand\@todonotes@author};%
\node(Y)[below=of X]{};%
\draw node[notestyle,font=\@todonotes@sizecommand,anchor=no
rth] (inNote) at (X.south)%
{\@todonotes@text};%
\else%
\draw node[notestyle,font=\@todonotes@sizecommand,anchor=no
rth] (inNote) at (X.north)%
{\@todonotes@text};%
\fi%
\end{tikzpicture}%
\hbadness \originalHbadness%
\fi}%

I'll do a bug report.

Jürgen

signature.asc
Description: This is a digitally signed message part


Re: TODO notes (double entries) in LyX 2.2.2 on Windows 10

2016-12-07 Thread Richard Heck
On 12/07/2016 08:14 PM, Cris Fuhrman wrote:
> My first email had an attachment of a lyx file (perhaps it didn't go
> through?)
>
> Anyway, it's definitely a bug in TODO notes... I even think I found
> the bug in the source
> at https://github.com/henrikmidtiby/todonotes/issues/22 (see my comment).

So it looks as if this is a bug in the LaTeX package, then, not in LyX?

Richard


>
> On Wed, Dec 7, 2016 at 6:43 PM, Richard Heck  > wrote:
>
> On 12/01/2016 11:14 AM, Cris Fuhrman wrote:
>> I've recently noticed an odd behavior of TODO Notes in LyX 2.2.2.
>> I enabled the fancyline option, and I saw I was getting two
>> lines. Upon further debugging (using author= and size=\tiny), I
>> can prove that it's actually generating two TODO notes at the
>> same place. Here's a screen grab:
>>
>> Inline image 1
>> I'm attaching the minimal example (used in LyX 2.2.2 under
>> Windows 10). I updated my MikTeX yesterday to see if it would go
>> away, but no luck. It's reproducible on BOTH my Windows 10
>> machines with LyX.
>>
>> I searched for todonotes modules (as I used it before prior to
>> LyX 2.2 before it was part of the distribution), but I couldn't
>> find anything in my LyX path directories that looked like a
>> duplicate. I'm not sure how this is happening.
>>
>> When I paste the LaTeX source from LyX (pasted below) into a
>> TeXstudio document, it works perfectly, so I don't think it's my
>> TeX installation.
>
> That's pretty strange. Can you post an example file?
>
> Richard
>
>



Re: TODO notes (double entries) in LyX 2.2.2 on Windows 10

2016-12-07 Thread Cris Fuhrman
My first email had an attachment of a lyx file (perhaps it didn't go
through?)

Anyway, it's definitely a bug in TODO notes... I even think I found the bug
in the source at https://github.com/henrikmidtiby/todonotes/issues/22 (see
my comment).

On Wed, Dec 7, 2016 at 6:43 PM, Richard Heck  wrote:

> On 12/01/2016 11:14 AM, Cris Fuhrman wrote:
>
> I've recently noticed an odd behavior of TODO Notes in LyX 2.2.2. I
> enabled the fancyline option, and I saw I was getting two lines. Upon
> further debugging (using author= and size=\tiny), I can prove that it's
> actually generating two TODO notes at the same place. Here's a screen grab:
>
> [image: Inline image 1]
> I'm attaching the minimal example (used in LyX 2.2.2 under Windows 10). I
> updated my MikTeX yesterday to see if it would go away, but no luck. It's
> reproducible on BOTH my Windows 10 machines with LyX.
>
> I searched for todonotes modules (as I used it before prior to LyX 2.2
> before it was part of the distribution), but I couldn't find anything in my
> LyX path directories that looked like a duplicate. I'm not sure how this is
> happening.
>
> When I paste the LaTeX source from LyX (pasted below) into a TeXstudio
> document, it works perfectly, so I don't think it's my TeX installation.
>
>
> That's pretty strange. Can you post an example file?
>
> Richard
>
>


Re: TODO notes (double entries) in LyX 2.2.2 on Windows 10

2016-12-07 Thread Richard Heck
On 12/01/2016 11:14 AM, Cris Fuhrman wrote:
> I've recently noticed an odd behavior of TODO Notes in LyX 2.2.2. I
> enabled the fancyline option, and I saw I was getting two lines. Upon
> further debugging (using author= and size=\tiny), I can prove that
> it's actually generating two TODO notes at the same place. Here's a
> screen grab:
>
> Inline image 1
> I'm attaching the minimal example (used in LyX 2.2.2 under Windows
> 10). I updated my MikTeX yesterday to see if it would go away, but no
> luck. It's reproducible on BOTH my Windows 10 machines with LyX.
>
> I searched for todonotes modules (as I used it before prior to LyX 2.2
> before it was part of the distribution), but I couldn't find anything
> in my LyX path directories that looked like a duplicate. I'm not sure
> how this is happening.
>
> When I paste the LaTeX source from LyX (pasted below) into a TeXstudio
> document, it works perfectly, so I don't think it's my TeX installation.

That's pretty strange. Can you post an example file?

Richard