Re: Make all LyX notes visible on PDF

2016-09-23 Thread racoon

On 23.09.2016 16:41, racoon wrote:

On 23.09.2016 13:52, Guillaume Munch wrote:

Le 22/09/2016 à 13:34, racoon a écrit :

On 22.09.2016 14:29, Jürgen Spitzmüller wrote:



You should also list it here:
http://wiki.lyx.org/Layouts/Modules#toc2


It is not a module. So should I list the "hack" just as a comment there?



Note that my concern regarding the MultiPar change was only for a module
distributed with LyX.


I think there is a way to avoid the problem. Unfortunately only partially.

The pdfcomment package actually provides a way to insert line breaks in
comments by using \textCR. So one can just replace blank lines (\par) by
this command. Like this:

Preamble
  \usepackage{letltxmacro}
  \LetLtxMacro{\oldpdfcomment}{\pdfcomment}
  \renewcommand{\pdfcomment}[2][]{{%
\let\par\textCR
\oldpdfcomment[#1]{#2}%
  }}

  \LetLtxMacro{\oldpdfmarkupcomment}{\pdfmarkupcomment}
  \renewcommand{\pdfmarkupcomment}[3][]{{%
\let\par\textCR
\oldpdfmarkupcomment[#1]{#2}{#3}%
  }}
EndPreamble

Unfortunately, this solves the problem only partially since line breaks
are allowed only in comments and not in the markup (first mandatory
argument of \pdfmarkupcomment). But the markup is actually
lyxgrayedout's main argument. So this conflicts with its MultiPar.

Let me know what you think. And maybe you have suggestions for improvement.

If that works then I would suggest to do the same in the PDF Comments
module since it does not support line breaks within comments so far.


Just realized that Arguments seem not to support MultiPar. So it does 
not work at all for \pdfmarkupcomment... But still the suggestion stands 
for \pdfcomment and related ones.


Daniel



Re: Make all LyX notes visible on PDF

2016-09-23 Thread racoon

On 23.09.2016 13:52, Guillaume Munch wrote:

Le 22/09/2016 à 13:34, racoon a écrit :

On 22.09.2016 14:29, Jürgen Spitzmüller wrote:



You should also list it here:
http://wiki.lyx.org/Layouts/Modules#toc2


It is not a module. So should I list the "hack" just as a comment there?



Note that my concern regarding the MultiPar change was only for a module
distributed with LyX.


I think there is a way to avoid the problem. Unfortunately only partially.

The pdfcomment package actually provides a way to insert line breaks in 
comments by using \textCR. So one can just replace blank lines (\par) by 
this command. Like this:


Preamble
  \usepackage{letltxmacro}
  \LetLtxMacro{\oldpdfcomment}{\pdfcomment}
  \renewcommand{\pdfcomment}[2][]{{%
\let\par\textCR
\oldpdfcomment[#1]{#2}%
  }}

  \LetLtxMacro{\oldpdfmarkupcomment}{\pdfmarkupcomment}
  \renewcommand{\pdfmarkupcomment}[3][]{{%
\let\par\textCR
\oldpdfmarkupcomment[#1]{#2}{#3}%
  }}
EndPreamble

Unfortunately, this solves the problem only partially since line breaks 
are allowed only in comments and not in the markup (first mandatory 
argument of \pdfmarkupcomment). But the markup is actually 
lyxgrayedout's main argument. So this conflicts with its MultiPar.


Let me know what you think. And maybe you have suggestions for improvement.

If that works then I would suggest to do the same in the PDF Comments 
module since it does not support line breaks within comments so far.


Daniel



Re: Make all LyX notes visible on PDF

2016-09-23 Thread Guillaume Munch

Le 22/09/2016 à 13:34, racoon a écrit :

On 22.09.2016 14:29, Jürgen Spitzmüller wrote:



You should also list it here:
http://wiki.lyx.org/Layouts/Modules#toc2


It is not a module. So should I list the "hack" just as a comment there?



Note that my concern regarding the MultiPar change was only for a module 
distributed with LyX.





Re: Make all LyX notes visible on PDF

2016-09-23 Thread Jürgen Spitzmüller
Am Donnerstag, den 22.09.2016, 14:34 +0300 schrieb racoon:
> It is not a module. 

Why don't you make it a module? This will make usage much easier.

Jürgen

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


Re: Make all LyX notes visible on PDF

2016-09-22 Thread racoon

On 22.09.2016 14:29, Jürgen Spitzmüller wrote:

2016-09-22 13:20 GMT+02:00 racoon :

Sounds dangerous for a module (because of MultiPar), but it
looks like a
great hack. Having it on the wiki would be good start.


Okay, I think I found a good place:

https://wiki.lyx.org/Tips/ExportWithCommentsIncluded#toc4



You should also list it here:
http://wiki.lyx.org/Layouts/Modules#toc2


It is not a module. So should I list the "hack" just as a comment there?

Daniel


Re: Make all LyX notes visible on PDF

2016-09-22 Thread Jürgen Spitzmüller
2016-09-22 13:20 GMT+02:00 racoon :

> Sounds dangerous for a module (because of MultiPar), but it looks like a
>> great hack. Having it on the wiki would be good start.
>>
>
> Okay, I think I found a good place:
>
> https://wiki.lyx.org/Tips/ExportWithCommentsIncluded#toc4


You should also list it here:
http://wiki.lyx.org/Layouts/Modules#toc2

Jürgen


> Daniel
>


Re: Make all LyX notes visible on PDF

2016-09-22 Thread racoon

On 17.09.2016 00:40, Guillaume Munch wrote:

Le 16/09/2016 à 18:00, racoon a écrit :


The problem with replacing notes is that pdfcomments from the module are
not visible in the outliner.


Something I plan to implement as soon as I am done with my current patches.



So I had to work with notes themselves. LyX notes don't really have a
LaTeX command that is executed. So I ended up hijacking the Note:Comment
and setting LatexName to pdfcomment (and MultiPar to false).

Seems to work pretty fine so far. Maybe that could be even worth an
option or module in LyX?



Sounds dangerous for a module (because of MultiPar), but it looks like a
great hack. Having it on the wiki would be good start.


Okay, I think I found a good place:

https://wiki.lyx.org/Tips/ExportWithCommentsIncluded#toc4

Daniel


Re: Make all LyX notes visible on PDF

2016-09-17 Thread racoon

On 17.09.2016 00:40, Guillaume Munch wrote:

Le 16/09/2016 à 18:00, racoon a écrit :


The problem with replacing notes is that pdfcomments from the module are
not visible in the outliner.


Something I plan to implement as soon as I am done with my current patches.



So I had to work with notes themselves. LyX notes don't really have a
LaTeX command that is executed. So I ended up hijacking the Note:Comment
and setting LatexName to pdfcomment (and MultiPar to false).

Seems to work pretty fine so far. Maybe that could be even worth an
option or module in LyX?



Sounds dangerous for a module (because of MultiPar), but it looks like a
great hack. Having it on the wiki would be good start.


Of course I forgot to mention that LatexType has to be set to "command" 
instead of "environment".


Where would one put such a hack on the wiki?

Daniel




Re: Make all LyX notes visible on PDF

2016-09-16 Thread Guillaume Munch

Le 16/09/2016 à 18:00, racoon a écrit :


The problem with replacing notes is that pdfcomments from the module are
not visible in the outliner.


Something I plan to implement as soon as I am done with my current patches.



So I had to work with notes themselves. LyX notes don't really have a
LaTeX command that is executed. So I ended up hijacking the Note:Comment
and setting LatexName to pdfcomment (and MultiPar to false).

Seems to work pretty fine so far. Maybe that could be even worth an
option or module in LyX?



Sounds dangerous for a module (because of MultiPar), but it looks like a 
great hack. Having it on the wiki would be good start.





Re: Make all LyX notes visible on PDF

2016-09-16 Thread racoon

On 16.08.2016 21:24, Scott Kostyshak wrote:

On Tue, Aug 16, 2016 at 10:12:10AM +0200, racoon wrote:

On 16.08.2016 04:04, Scott Kostyshak wrote:

On Mon, Aug 15, 2016 at 08:34:39PM +0200, racoon wrote:

Hi,

Is there a way to make all my LyX notes visible as notes (or so) on the PDF?


You could probably redefine the note inset in local layout, or you could
use inset-forall to convert a LyX note to e.g. a Greyed Out inset.


Thanks! I'll give it a try. I guess would be a nice feature if one sends
one's drafts to someone who does not have LyX. Maybe I can even manage to
have the standard PDF comments from the PDF Comments module. Wouldn't it be
nice to have such a feature integrated directly into the module?


I think a general user-friendly feature to turn some insets into others
(perhaps which can be converted to which can be specified in the
definition of the layout).


I just came back to the problem and wanted to post a quick update.

The problem with replacing notes is that pdfcomments from the module are 
not visible in the outliner.


So I had to work with notes themselves. LyX notes don't really have a 
LaTeX command that is executed. So I ended up hijacking the Note:Comment 
and setting LatexName to pdfcomment (and MultiPar to false).


Seems to work pretty fine so far. Maybe that could be even worth an 
option or module in LyX?


Daniel



Re: Make all LyX notes visible on PDF

2016-08-16 Thread racoon

On 16.08.2016 20:28, Scott Kostyshak wrote:

I'm not sure if this is relevant, but the title seems like it. I did not
read it though:

http://tex.stackexchange.com/questions/14611/in-lyx-turn-greyed-out-text-into-comments


Thanks! I'll check it.

Daniel




Re: Make all LyX notes visible on PDF

2016-08-16 Thread Scott Kostyshak
I'm not sure if this is relevant, but the title seems like it. I did not
read it though:

http://tex.stackexchange.com/questions/14611/in-lyx-turn-greyed-out-text-into-comments

Scott


signature.asc
Description: PGP signature


Re: Make all LyX notes visible on PDF

2016-08-16 Thread Scott Kostyshak
On Tue, Aug 16, 2016 at 10:12:10AM +0200, racoon wrote:
> On 16.08.2016 04:04, Scott Kostyshak wrote:
> > On Mon, Aug 15, 2016 at 08:34:39PM +0200, racoon wrote:
> > > Hi,
> > > 
> > > Is there a way to make all my LyX notes visible as notes (or so) on the 
> > > PDF?
> > 
> > You could probably redefine the note inset in local layout, or you could
> > use inset-forall to convert a LyX note to e.g. a Greyed Out inset.
> 
> Thanks! I'll give it a try. I guess would be a nice feature if one sends
> one's drafts to someone who does not have LyX. Maybe I can even manage to
> have the standard PDF comments from the PDF Comments module. Wouldn't it be
> nice to have such a feature integrated directly into the module?

I think a general user-friendly feature to turn some insets into others
(perhaps which can be converted to which can be specified in the
definition of the layout).

Scott


signature.asc
Description: PGP signature


Re: Make all LyX notes visible on PDF

2016-08-16 Thread racoon

On 16.08.2016 04:04, Scott Kostyshak wrote:

On Mon, Aug 15, 2016 at 08:34:39PM +0200, racoon wrote:

Hi,

Is there a way to make all my LyX notes visible as notes (or so) on the PDF?


You could probably redefine the note inset in local layout, or you could
use inset-forall to convert a LyX note to e.g. a Greyed Out inset.


Thanks! I'll give it a try. I guess would be a nice feature if one sends 
one's drafts to someone who does not have LyX. Maybe I can even manage 
to have the standard PDF comments from the PDF Comments module. Wouldn't 
it be nice to have such a feature integrated directly into the module?


Daniel



Re: Make all LyX notes visible on PDF

2016-08-15 Thread Scott Kostyshak
On Mon, Aug 15, 2016 at 08:34:39PM +0200, racoon wrote:
> Hi,
> 
> Is there a way to make all my LyX notes visible as notes (or so) on the PDF?

You could probably redefine the note inset in local layout, or you could
use inset-forall to convert a LyX note to e.g. a Greyed Out inset.

Scott


signature.asc
Description: PGP signature