Re: Options of packages loaded by modules/Lyx

2015-12-01 Thread Richard Heck
On 12/01/2015 02:41 PM, Guillaume Munch wrote:
> Dear David,
>
>> Adding another \usepackage[myOptions]{todonotes} to my preamble causes
>> an options clash. I tried to
>>
>> *) Set the options globally by passing them to the document class (as
>> suggested by LaTex). No error, but also no effect.
>> *) Use \PassOptionsToPackage. No error, but also no effect. I think this
>> command must be used *before* loading the package, which I can't do as
>> the module's preamble additions are done *before* the user's additions.
>
> There's a dirty, but quite general hack that I have often used in the
> past. In "class options", add:
>
>   ]{myClass}\PassOptionsToPackage{myOptions}{todonotes}%
>
> I'd be happy to hear about a better solution...

That really is a hack!!

>> A possible solution would be to change the module itself. But I don't
>> like this solution much because it would have a system wide effect where
>> I only want it to affect the document. (Also, I don't want to change the
>> moule on all systems I use.)
>>
>
> It is possible to redefine insets in "Local Format". I'm curious as
> well to hear whether something can be done there to pass new package
> options. If not, would it make sense to implement a
> PassOptionToPackage layout command?

What happens if you just do:

AddToPremable
\PassOptionsToPackage...
EndPreamble

in local layout? I'll guess it may not work, since this line will be
output too late

If so, then a PassOptionToPackage tag would be a very good idea. These
could be output very early, yes?


Richard



output PDF to evince rather than okular

2015-12-01 Thread Joel VanderWerf
I upgraded from 2.1.4 to 2.2.0alpha2 (on ubuntu 15.10), and the PDF 
output program changed from evince to okular.


In 2.1.4, the PDF output used evince (which I prefer). And when I run 
2.1.4 now, it *still* uses evince (so this is probably not due to a 
systemwide change).


On 2.2.0alpha2, the PDF output uses okular.

I tried to adjust Prefs/Output/PDF Command, but cannot seem to change 
the program used for PDFs.


At first, the drop-down setting	was blank (this was true in my settings 
for both LyX versions). After selecting


 synctex view -i $$n:0:$$t -o $$o -x "evince -i %{page+1} $$o"

(and applying/saving/restarting lyx), lyx still uses okular.

Anything I can try to switch back to evince?

Thanks!

(ps. I *love* the improvements to instant preview in 2.2.0 -- it almost 
means I don't need a PDF viewer.)


Splitting long eqution

2015-12-01 Thread Steve Burnham
I have a long numbered formula that I am trying to split into two lines. I
am using 2.1.4 on OSX 10.11. Following the instructions in the wiki (
http://wiki.lyx.org/Examples/FormulaOnMultipleLines) I should be able to
hit control+enter to begin a multiline equation, move the cursor to where I
want a new line and hit control+enter again. This command appears to be
disabled for some reason. I have found however that if I type Command+enter
a new line is inserted and I can type the remaining portion of the
equation. The problem is that this new line also gets a new equation number
when it should all be part of the same equation. See attached minimal
working example. Thanks,


-Steve


minimal.lyx
Description: Binary data


Re: Options of packages loaded by modules/Lyx

2015-12-01 Thread David
> 
> Thanks for these interesting approaches, Richard! In this regard, it
> would also be nice if one could point Lyx to module files that are
> located outside ~/.lyx
> This way I could save the module file together with my document (in a
> git repo) and have it ready wherever I need it.
> 

Or maybe an include tag does exist, something like

IncludeFile
path/to/myModulue.module
End

?



Re: Options of packages loaded by modules/Lyx

2015-12-01 Thread David
Am 01.12.2015 um 20:41 schrieb Guillaume Munch:

> 
> There's a dirty, but quite general hack that I have often used in the
> past. In "class options", add:
> 
>   ]{myClass}\PassOptionsToPackage{myOptions}{todonotes}%
> 
> I'd be happy to hear about a better solution...
> 

That's clever ;)



Re: Options of packages loaded by modules/Lyx

2015-12-01 Thread Guillaume Munch

Le 01/12/2015 20:04, Richard Heck a écrit :

On 12/01/2015 02:41 PM, Guillaume Munch wrote:

Dear David,


Adding another \usepackage[myOptions]{todonotes} to my preamble causes
an options clash. I tried to

*) Set the options globally by passing them to the document class (as
suggested by LaTex). No error, but also no effect.
*) Use \PassOptionsToPackage. No error, but also no effect. I think this
command must be used *before* loading the package, which I can't do as
the module's preamble additions are done *before* the user's additions.


There's a dirty, but quite general hack that I have often used in the
past. In "class options", add:

   ]{myClass}\PassOptionsToPackage{myOptions}{todonotes}%

I'd be happy to hear about a better solution...


That really is a hack!!


Yeah sorry about that.

(Please please do not attempt anything at preventing such things because
I have no alternative for the moment.)




A possible solution would be to change the module itself. But I don't
like this solution much because it would have a system wide effect where
I only want it to affect the document. (Also, I don't want to change the
moule on all systems I use.)



It is possible to redefine insets in "Local Format". I'm curious as
well to hear whether something can be done there to pass new package
options. If not, would it make sense to implement a
PassOptionToPackage layout command?


What happens if you just do:

 AddToPremable
 \PassOptionsToPackage...
 EndPreamble

in local layout? I'll guess it may not work, since this line will be
output too late


Yes, it's too late.



If so, then a PassOptionToPackage tag would be a very good idea. These
could be output very early, yes?


I do like the idea of a PassOptionToPackage tag.

But in regards to my hack, I could completely get rid of it only if we
had an AddToEarlyPreamble section the adds lines before the
LyX-generated preamble.

Some options like \zoomfactor even want to be output before the document
class, and I think some command had also to be moved to before the
documentclass recently. Maybe we need a general solution for such issues.



Re: Options of packages loaded by modules/Lyx

2015-12-01 Thread David Rörich
Am 01.12.2015 um 20:36 schrieb Richard Heck:
> On 11/30/2015 04:33 AM, David wrote:
>> Dear list,
>>
>> is it possible to change package options of packages that are loaded by
>> modules? Specifically, I tried to set the options of the todonotes
>> package which I use in conjunction with the "TODO Notes" module [1].
>> This module loads the package without passing any options to it.
>> Specifically, it adds
>>
>> \RequirePackage{todonotes}
>>
>> to the preamble.
>>
>> Adding another \usepackage[myOptions]{todonotes} to my preamble causes
>> an options clash. I tried to
>>
>> *) Set the options globally by passing them to the document class (as
>> suggested by LaTex). No error, but also no effect.
>> *) Use \PassOptionsToPackage. No error, but also no effect. I think this
>> command must be used *before* loading the package, which I can't do as
>> the module's preamble additions are done *before* the user's additions.
>>
>> A possible solution would be to change the module itself. But I don't
>> like this solution much because it would have a system wide effect where
>> I only want it to affect the document. (Also, I don't want to change the
>> moule on all systems I use)
>>
>> What other options do I have?
> Copy todonotes.module to todonotes2.module. Open it and make whatever
> changes you
> wish (I'd make some change to the first line and description so you know
> which is which),
> then reconfigure LyX so it is seen and use the modified version in this
> paper.
>
> Alternatively, copy the contents of todonotes.module to Local Layout and
> make your
> changes there. Then remove the ToDo Notes module from the list of used
> modules.
>
> Richard
>

Thanks for these interesting approaches, Richard! In this regard, it
would also be nice if one could point Lyx to module files that are
located outside ~/.lyx
This way I could save the module file together with my document (in a
git repo) and have it ready wherever I need it.

Contrary to what I wrote before, passing the options as global options
to the document class *does* work. On my first try, I didn't see the
effect because I use the tikzexternalize package and todonotes renders
its notes with Tikz. This prevented rerendering.

David



signature.asc
Description: OpenPGP digital signature


Lyx 2.2.0 alpha

2015-12-01 Thread Michael Berger

Dear Scott,
I am currently using LyX 2.1.2 with openSUSE 13.2 / KDE.
If at all, how do you think will my documents be effected if reloaded 
with the new version 2.2?
I am especially referring to linguistic glosses in view of the so many 
great (but significant) improvements implemented by Jürgen Spitzmüller. 
Will I have to rewrite them?


Thanks and regards,
Michael Berger


Re: Options of packages loaded by modules/Lyx

2015-12-01 Thread Scott Kostyshak
On Mon, Nov 30, 2015 at 09:03:08PM +0100, David Rörich wrote:
> Dear list,
> 

Just a note that this was cross-posted here:
http://tex.stackexchange.com/questions/280938/can-i-change-options-of-packages-loaded-by-a-lyx-module

Scott


signature.asc
Description: PGP signature


threeparttablex with longtable

2015-12-01 Thread Tyler Grummett
Hello Lyx,


Im having a problem when using threeparttablex with longtables. In order to see 
the table I am working with, I have chosen to use ERT code to 
\begin{ThreePartTable} and then \begin{TableNotes}  \end{TableNotes} etc 
then ive inserted a table and made it a long table.


Everything works if you just put in the ERT code \end{ThreePartTable}, but then 
there are no actual table notes. I cant work out where to put the ERT code 
\insertTableNotes. According to the documentation, it needs to be inside the 
longtable, but I cant work out how to do it without getting an error 
\misaligned etc.


Please help.


Tyler


*

Tyler Grummett ( BBSc, BSc(Hons I))
PhD Candidate
Brain Signals Laboratory
Flinders University
Rm 5A301
Ext 66125


Re: output PDF to evince rather than okular

2015-12-01 Thread Scott Kostyshak
On Tue, Dec 01, 2015 at 02:12:49PM -0800, Joel VanderWerf wrote:
> I upgraded from 2.1.4 to 2.2.0alpha2 (on ubuntu 15.10), and the PDF output
> program changed from evince to okular.
> 
> In 2.1.4, the PDF output used evince (which I prefer). And when I run 2.1.4
> now, it *still* uses evince (so this is probably not due to a systemwide
> change).
> 
> On 2.2.0alpha2, the PDF output uses okular.

Not surprising. This is likely due to different preferences. Because we
wanted the 2.2.0alpha2 installation to be completely different, it is
good that it is not using the preferences from before.

You can try copying manually the preferences file used for 2.1.4. To see
where your user directory is, go to Help > About. Copy the file named
"preferences" from your 2.1.4 location to the 2.2.0alpha2 location.

> I tried to adjust Prefs/Output/PDF Command, but cannot seem to change the
> program used for PDFs.
> 
> At first, the drop-down setting   was blank (this was true in my settings 
> for
> both LyX versions). After selecting

Can you please send a screenshot of where it is blank? I would like to
debug this. I cannot reproduce-- for me, both Evince and Okular are
shown.

> (ps. I *love* the improvements to instant preview in 2.2.0 -- it almost
> means I don't need a PDF viewer.)

Thanks for the positive feedback!

Scott


signature.asc
Description: PGP signature


Re: Lyx 2.2.0 alpha

2015-12-01 Thread Richard Heck
On 12/01/2015 03:04 AM, Michael Berger wrote:
> Dear Scott,
> I am currently using LyX 2.1.2 with openSUSE 13.2 / KDE.
> If at all, how do you think will my documents be effected if reloaded
> with the new version 2.2?
> I am especially referring to linguistic glosses in view of the so many
> great (but significant) improvements implemented by Jürgen
> Spitzmüller. Will I have to rewrite them?

There should not be huge differences with this version. The changes to
Beamer in 2.1 were
much more substantial than anything in 2.2.

Of course, the best thing to do is make copies of the files you want to
try in 2.2

Richard



Re: Lyx 2.2.0 alpha

2015-12-01 Thread Scott Kostyshak
On Tue, Dec 01, 2015 at 08:25:02PM -0500, Richard Heck wrote:
> On 12/01/2015 03:04 AM, Michael Berger wrote:
> > Dear Scott,
> > I am currently using LyX 2.1.2 with openSUSE 13.2 / KDE.
> > If at all, how do you think will my documents be effected if reloaded
> > with the new version 2.2?
> > I am especially referring to linguistic glosses in view of the so many
> > great (but significant) improvements implemented by Jürgen
> > Spitzmüller. Will I have to rewrite them?
> 
> There should not be huge differences with this version. The changes to
> Beamer in 2.1 were
> much more substantial than anything in 2.2.
> 
> Of course, the best thing to do is make copies of the files you want to
> try in 2.2

Indeed the advantage of testing is that if something is broken, it is
likely we can fix it if you report it.

Scott


signature.asc
Description: PGP signature


Re: output PDF to evince rather than okular

2015-12-01 Thread Joel VanderWerf

On 12/01/2015 03:23 PM, Scott Kostyshak wrote:

On Tue, Dec 01, 2015 at 02:12:49PM -0800, Joel VanderWerf wrote:

I upgraded from 2.1.4 to 2.2.0alpha2 (on ubuntu 15.10), and the PDF output
program changed from evince to okular.

In 2.1.4, the PDF output used evince (which I prefer). And when I run 2.1.4
now, it *still* uses evince (so this is probably not due to a systemwide
change).

On 2.2.0alpha2, the PDF output uses okular.


Not surprising. This is likely due to different preferences. Because we
wanted the 2.2.0alpha2 installation to be completely different, it is
good that it is not using the preferences from before.

You can try copying manually the preferences file used for 2.1.4. To see
where your user directory is, go to Help > About. Copy the file named
"preferences" from your 2.1.4 location to the 2.2.0alpha2 location.


One of the first things I did after upgrading was to copy both of

  ~/.lyx/preferences
  ~/.lyx/bind/user.bind

into the right places in .lyx2.2pre.

Also, apparently the setting I have been tweaking is 
"forward_search_pdf", which may be different from the setting that 
Ctrl-R uses to launch the PDF viewer? I can't find anywhere else to 
choose between okular and evince, though.



I tried to adjust Prefs/Output/PDF Command, but cannot seem to change the
program used for PDFs.

At first, the drop-down setting was blank (this was true in my settings for
both LyX versions). After selecting


Can you please send a screenshot of where it is blank? I would like to
debug this. I cannot reproduce-- for me, both Evince and Okular are
shown.


Sorry, I was unclear. The *selected* value is blank. The pop-up has 
several choices. (And I can select them, and the selection persists.) 
See attached.


However, changing the selection (and pressing Apply each time) has no 
effect. Ctrl-R always runs Okular (in 2.2pre). Maybe this is my 
confusion about forward_search_pdf.


I just noticed that in lyx 2.1.4, the PDF program that Ctrl-R runs is 
always evince, even if I selected okular. Hm. Perhaps there is some 
error, and 2.2 falls back to okular, but 2.1 falls back to evince? (Both 
okular and evince are in /usr/bin, so it's not a PATH issue.)




Re: output PDF to evince rather than okular

2015-12-01 Thread Scott Kostyshak
On Tue, Dec 01, 2015 at 04:50:10PM -0800, Joel VanderWerf wrote:
> On 12/01/2015 03:23 PM, Scott Kostyshak wrote:

> >You can try copying manually the preferences file used for 2.1.4. To see
> >where your user directory is, go to Help > About. Copy the file named
> >"preferences" from your 2.1.4 location to the 2.2.0alpha2 location.
> 
> One of the first things I did after upgrading was to copy both of
> 
>   ~/.lyx/preferences
>   ~/.lyx/bind/user.bind
> 
> into the right places in .lyx2.2pre.
> 
> Also, apparently the setting I have been tweaking is "forward_search_pdf",
> which may be different from the setting that Ctrl-R uses to launch the PDF
> viewer? I can't find anywhere else to choose between okular and evince,
> though.
> 
> >>I tried to adjust Prefs/Output/PDF Command, but cannot seem to change the
> >>program used for PDFs.
> >>
> >>At first, the drop-down setting was blank (this was true in my settings 
> >>for
> >>both LyX versions). After selecting
> >
> >Can you please send a screenshot of where it is blank? I would like to
> >debug this. I cannot reproduce-- for me, both Evince and Okular are
> >shown.
> 
> Sorry, I was unclear. The *selected* value is blank. The pop-up has several
> choices. (And I can select them, and the selection persists.) See attached.

I see.

> However, changing the selection (and pressing Apply each time) has no
> effect. Ctrl-R always runs Okular (in 2.2pre). Maybe this is my confusion
> about forward_search_pdf.

I don't know anything about forward search.

> I just noticed that in lyx 2.1.4, the PDF program that Ctrl-R runs is always
> evince, even if I selected okular. Hm. Perhaps there is some error, and 2.2
> falls back to okular, but 2.1 falls back to evince? (Both okular and evince
> are in /usr/bin, so it's not a PATH issue.)

I don't know. I wonder what changed between 2.1.4 and 2.2.0. If you
wanted you could try 2.1.4's configure.py with 2.2.0. I do not recommend
this at all. My guess is something would go quite wrong.
Another thing to try would be to do a git bisect. You would need to
compile LyX though.

Or you can wait a few days and see if someone responds with a better
idea.

Scott


signature.asc
Description: PGP signature


Re: Splitting long eqution

2015-12-01 Thread Anders Ekberg
On 01 Dec 2015, at 00:16, Steve Burnham  wrote:I have a long numbered formula that I am trying to split into two lines. I am using 2.1.4 on OSX 10.11. Following the instructions in the wiki (http://wiki.lyx.org/Examples/FormulaOnMultipleLines) I should be able to hit control+enter to begin a multiline equation, move the cursor to where I want a new line and hit control+enter again. This command appears to be disabled for some reason. I have found however that if I type Command+enter a new line is inserted and I can type the remaining portion of the equation. The problem is that this new line also gets a new equation number when it should all be part of the same equation. See attached minimal working example. Thanks,-Steve
Steve, that will depend on where you insert your label, see the extended minimal example attached.All the best!Anders

minimal_extended.lyx
Description: Binary data


Options of packages loaded by modules/Lyx

2015-12-01 Thread David Rörich
(sorry if this is a double post)

Dear list,

is it possible to change package options of packages that are loaded by
modules? Specifically, I tried to set the options of the todonotes
package which I use in conjunction with the "TODO Notes" module [1].
This module loads the package without passing any options to it.
Specifically, it adds

\RequirePackage{todonotes}

to the preamble.

Adding another \usepackage[myOptions]{todonotes} to my preamble causes
an options clash. I tried to

*) Set the options globally by passing them to the document class (as
suggested by LaTex). No error, but also no effect.
*) Use \PassOptionsToPackage. No error, but also no effect. I think this
command must be used *before* loading the package, which I can't do as
the module's preamble additions are done *before* the user's additions.

A possible solution would be to change the module itself. But I don't
like this solution much because it would have a system wide effect where
I only want it to affect the document. (Also, I don't want to change the
moule on all systems I use)

What other options do I have?

Thanks,
David

[1] http://www.lyx.org/trac/raw-attachment/ticket/7546/todonotes.module



signature.asc
Description: OpenPGP digital signature


Options of packages loaded by modules/Lyx

2015-12-01 Thread David Rörich
Dear list,

is it possible to change package options of packages that are loaded by
modules? Specifically, I tried to set the options of the todonotes
package which I use in conjunction with the "TODO Notes" module [1].
This module loads the package without passing any options to it.
Specifically, it adds

\RequirePackage{todonotes}

to the preamble.

Adding another \usepackage[myOptions]{todonotes} to my preamble causes
an options clash. I tried to

*) Set the options globally by passing them to the document class (as
suggested by LaTex). No error, but also no effect.
*) Use \PassOptionsToPackage. No error, but also no effect. I think this
command must be used *before* loading the package, which I can't do as
the module's preamble additions are done *before* the user's additions.

A possible solution would be to change the module itself. But I don't
like this solution much because it would have a system wide effect where
I only want it to affect the document. (Also, I don't want to change the
moule on all systems I use)

What other options do I have?

Thanks,
David

[1] http://www.lyx.org/trac/raw-attachment/ticket/7546/todonotes.module





signature.asc
Description: OpenPGP digital signature


Options of packages loaded by modules/Lyx

2015-12-01 Thread David
Dear list,

is it possible to change package options of packages that are loaded by
modules? Specifically, I tried to set the options of the todonotes
package which I use in conjunction with the "TODO Notes" module [1].
This module loads the package without passing any options to it.
Specifically, it adds

\RequirePackage{todonotes}

to the preamble.

Adding another \usepackage[myOptions]{todonotes} to my preamble causes
an options clash. I tried to

*) Set the options globally by passing them to the document class (as
suggested by LaTex). No error, but also no effect.
*) Use \PassOptionsToPackage. No error, but also no effect. I think this
command must be used *before* loading the package, which I can't do as
the module's preamble additions are done *before* the user's additions.

A possible solution would be to change the module itself. But I don't
like this solution much because it would have a system wide effect where
I only want it to affect the document. (Also, I don't want to change the
moule on all systems I use)

What other options do I have?

Thanks,
David

[1] http://www.lyx.org/trac/raw-attachment/ticket/7546/todonotes.module



Render inkscape text with latex

2015-12-01 Thread Rajil Saraswat
Hello,

I want the text used in svg images to be rendered using latex.
Inkscape provides instructions at
http://wiki.inkscape.org/wiki/index.php/LaTeX on how to do this with
Lyx. However this uses ERT and one loses the capability of seeing
previews within Lyx.

Is it possible to modify the SVG convertor with lyx to automatically
carry out the steps given on the inkscape wiki mentioned above?

Thanks


Re: Options of packages loaded by modules/Lyx

2015-12-01 Thread Richard Heck
On 11/30/2015 04:33 AM, David wrote:
> Dear list,
>
> is it possible to change package options of packages that are loaded by
> modules? Specifically, I tried to set the options of the todonotes
> package which I use in conjunction with the "TODO Notes" module [1].
> This module loads the package without passing any options to it.
> Specifically, it adds
>
> \RequirePackage{todonotes}
>
> to the preamble.
>
> Adding another \usepackage[myOptions]{todonotes} to my preamble causes
> an options clash. I tried to
>
> *) Set the options globally by passing them to the document class (as
> suggested by LaTex). No error, but also no effect.
> *) Use \PassOptionsToPackage. No error, but also no effect. I think this
> command must be used *before* loading the package, which I can't do as
> the module's preamble additions are done *before* the user's additions.
>
> A possible solution would be to change the module itself. But I don't
> like this solution much because it would have a system wide effect where
> I only want it to affect the document. (Also, I don't want to change the
> moule on all systems I use)
>
> What other options do I have?

Copy todonotes.module to todonotes2.module. Open it and make whatever
changes you
wish (I'd make some change to the first line and description so you know
which is which),
then reconfigure LyX so it is seen and use the modified version in this
paper.

Alternatively, copy the contents of todonotes.module to Local Layout and
make your
changes there. Then remove the ToDo Notes module from the list of used
modules.

Richard



Re: Lyx 2.2.0 alpha

2015-12-01 Thread Scott Kostyshak
On Tue, Dec 01, 2015 at 09:04:49AM +0100, Michael Berger wrote:
> Dear Scott,
> I am currently using LyX 2.1.2 with openSUSE 13.2 / KDE.
> If at all, how do you think will my documents be effected if reloaded with
> the new version 2.2?
> I am especially referring to linguistic glosses in view of the so many great
> (but significant) improvements implemented by Jürgen Spitzmüller. Will I
> have to rewrite them?
> 
> Thanks and regards,
> Michael Berger

Hi Michael,

In theory everything should work fine. But this is an alpha version so
"In theory" really does mean just that. I do not recommend using the
alpha version for serious work (although I do). If you do decide to
test, your feedback would be very valuable. Please back up all of your
documents.

Best,

Scott


signature.asc
Description: PGP signature


Re: Options of packages loaded by modules/Lyx

2015-12-01 Thread Guillaume Munch

Dear David,

Le 30/11/2015 10:22, David Rörich a écrit :

(sorry if this is a double post)


The lists now work again.



Adding another \usepackage[myOptions]{todonotes} to my preamble causes
an options clash. I tried to

*) Set the options globally by passing them to the document class (as
suggested by LaTex). No error, but also no effect.
*) Use \PassOptionsToPackage. No error, but also no effect. I think this
command must be used *before* loading the package, which I can't do as
the module's preamble additions are done *before* the user's additions.


There's a dirty, but quite general hack that I have often used in the 
past. In "class options", add:


  ]{myClass}\PassOptionsToPackage{myOptions}{todonotes}%

I'd be happy to hear about a better solution...



A possible solution would be to change the module itself. But I don't
like this solution much because it would have a system wide effect where
I only want it to affect the document. (Also, I don't want to change the
moule on all systems I use.)



It is possible to redefine insets in "Local Format". I'm curious as well 
to hear whether something can be done there to pass new package options. 
If not, would it make sense to implement a PassOptionToPackage layout 
command?