Re: [LyX master] UserGuide.lyx: translations

2013-05-23 Thread Kornel Benko
Am Donnerstag, 23. Mai 2013 um 01:26:10, schrieb Uwe Stöhr uwesto...@lyx.org
 commit bcabe09612dddeb82750f52851468a5231aeb170
 Author: Uwe Stöhr uwesto...@lyx.org
 Date:   Thu May 23 01:25:54 2013 +0200
 
 UserGuide.lyx: translations
 
 - to fix the mysterious compilation problems on some machines
 
 diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx

But this is NOT OK. The lyx-file is not to blame.
We need at least a test-case for this behaviour.

Kornel

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


Re: Re: [LyX master] UserGuide.lyx: first step of revision

2013-05-23 Thread Kornel Benko
Am Donnerstag, 23. Mai 2013 um 01:57:32, schrieb Uwe Stöhr uwesto...@web.de
 Am 22.05.2013 08:16, schrieb Kornel Benko:
 
  Removing \foreignlanguage{ngerman} (as it is on 2.0.x) makes it 
  compilable. This is a regression.
 
 But I already removed \foreignlanguage{ngerman}. The German docs were 
 always identical in branch 
 and master.
 
 regards Uwe

I mean \foreignlanguage{ngerman} in the .tex file, not in .lyx-file.

Kornel

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


Re: RFC - offer users to set preferred float paragraph style

2013-05-23 Thread Vincent van Ravesteijn

Op 23-5-2013 2:15, Uwe Stöhr schreef:

Am 22.05.2013 07:38, schrieb Vincent van Ravesteijn:

The setting is somewhat between the the document settings and the 
preferences. The idea is to
change only the way NEW floats are inserted. Existing floats will 
not be changed by this setting.


If you would have read what I and Jurgen wrote before, this is 
exactly what we do NOT want.


I read his post carefully. I think I made it clear with my example why 
I don't agree with you here and why Ithink that 2 different features 
are needed. What do you think is wrong in my example?




Your example is not very good. What you describe in the example can be 
done perfectly with what Jurgen proposed.


For the reason that in many cases one or a few floats needs to have 
another alignment than all other floats, my setting does not change 
existing floats. 


This is not a valid reason. Jurgen's options changes existing floats, 
but only those that have the default alignment. If you've manually 
changed the alignment to be left aligned, the float will not be touched. 
So, this is not a justification for a setting that only influences new 
floats.


I really do not want an option that says how new floats are aligned. I 
do not expect this to be a property of the document. I have explained 
before why. If you do not agree, then discuss our arguments. Of course, 
for every possible workflow, one can think of an example that will work 
perfectly.


Vincent



Re: Re: Re: [LyX master] UserGuide.lyx: first step of revision

2013-05-23 Thread Kornel Benko
Am Donnerstag, 23. Mai 2013 um 08:41:21, schrieb Kornel Benko kor...@lyx.org
 Am Donnerstag, 23. Mai 2013 um 01:57:32, schrieb Uwe Stöhr uwesto...@web.de
  Am 22.05.2013 08:16, schrieb Kornel Benko:
  
   Removing \foreignlanguage{ngerman} (as it is on 2.0.x) makes it 
   compilable. This is a regression.
  
  But I already removed \foreignlanguage{ngerman}. The German docs were 
  always identical in branch 
  and master.
  
  regards Uwe
 
 I mean \foreignlanguage{ngerman} in the .tex file, not in .lyx-file.
 
   Kornel

And, BTW, it still is not compilable.

Kornel

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


Re: Re: Re: Re: [LyX master] UserGuide.lyx: first step of revision

2013-05-23 Thread Kornel Benko
Am Donnerstag, 23. Mai 2013 um 09:09:50, schrieb Kornel Benko kor...@lyx.org
 Am Donnerstag, 23. Mai 2013 um 08:41:21, schrieb Kornel Benko kor...@lyx.org
  Am Donnerstag, 23. Mai 2013 um 01:57:32, schrieb Uwe Stöhr 
  uwesto...@web.de
   Am 22.05.2013 08:16, schrieb Kornel Benko:
   
Removing \foreignlanguage{ngerman} (as it is on 2.0.x) makes it 
compilable. This is a regression.
   
   But I already removed \foreignlanguage{ngerman}. The German docs were 
   always identical in branch 
   and master.
   
   regards Uwe
  
  I mean \foreignlanguage{ngerman} in the .tex file, not in .lyx-file.
  
  Kornel
 
 And, BTW, it still is not compilable.
 
Forget it. I was too fast. I got two dialog-windows claimin something with 
'Auflistung' is
OK. But in the end, de/UserGuide compiles.

Still, I think, someone (Jürgen?) should look into this.

Kornel

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


Re: RFC - offer users to set preferred float paragraph style

2013-05-23 Thread Guenter Milde
On 2013-05-23, Vincent van Ravesteijn wrote:
 Op 23-5-2013 2:15, Uwe Stöhr schreef:
 Am 22.05.2013 07:38, schrieb Vincent van Ravesteijn:

...

 For the reason that in many cases one or a few floats needs to have 
 another alignment than all other floats, my setting does not change 
 existing floats. 

 This is not a valid reason. Jurgen's options changes existing floats, 
 but only those that have the default alignment. If you've manually 
 changed the alignment to be left aligned, the float will not be touched. 

I also prefer one configuration setting changing the default alignment,
independent of the age of floats.

Günter



Re: r40969 - www-user/trunk/farm/cookbook/LyX

2013-05-23 Thread Richard Heck

On 05/22/2013 09:49 PM, Pavel Sanda wrote:

rgh...@lyx.org wrote:

Author: rgheck
Date: Thu May 23 00:38:52 2013
New Revision: 40969
URL: http://www.lyx.org/trac/changeset/40969
  

Modified: www-user/trunk/farm/cookbook/LyX/credits.inc
==
--- www-user/trunk/farm/cookbook/LyX/credits.incWed May 22 08:23:14 
2013(r40968)
+++ www-user/trunk/farm/cookbook/LyX/credits.incThu May 23 00:38:52 
2013(r40969)
@@ -17,7 +17,7 @@
  } else
  $output=$output. dtb${name}/b;
  
-$msg = preg_replace(/\n */, \n  , ltrim($msg));

+$msg = ereg_replace(\n *, \n  , ltrim($msg));

Easter egg!!! Richard, did you check our main web pages after this commit? P


Uh, no, but I see the problem. I'm not sure why it was preg before. It's 
ereg in generate_contributions.py, both in branch and in trunk. Someone 
must have fixed it directly in credits.inc.


Richard



Re: [LyX master] Add support for package options in layout files. E.g.: PackageOption tipa safe will load tipa with the safe option, if we load it.

2013-05-23 Thread Vincent van Ravesteijn

Op 23-5-2013 15:35, Richard Heck schreef:

The branch, master, has been updated.

- Log -

commit 1230372566dc571fbf76adca00453d2c6009d52b
Author: Richard Heck rgh...@lyx.org
Date:   Thu May 23 09:25:40 2013 -0400

 Add support for package options in layout files. E.g.:
PackageOption tipa safe will load tipa with the
  safe option, if we load it.




Does this require a file format bump ?

Vincent



Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck

On 05/18/2013 03:02 AM, Liviu Andronic wrote:

Dear all,
JMarc and I decided to go ahead with the Chunk inset for the literate
modules in 2.1, and now we're only missing the lyx2lyx conversion
routines.

Now the patch is available on the bug tracker (
http://www.lyx.org/trac/ticket/8588 : litinsets.inc and
sweave-knitr-noweb-inset-chunk.patch), and we ask for a kind soul to
provide the lyx2lyx bits. We need to take any sequence of Chunk
layouts and replace them by a Chunk inset. If the Chunk has some
alignments parameters, they should be given to the Standard layout
paragraph that holds the Chunk layout.


Can you post an example file I can use for testing?

Richard



Re: [PATCH] Layout files for ACM SIGS style

2013-05-23 Thread Richard Heck

On 05/15/2013 01:36 PM, Gioele Barabucci wrote:

Hello,

I made two layout files for the ACM SIGS proceedings styles [1].

I hope that they can be included in the standard LyX sources so that other 
people will be able to use those styles without resorting very old and 
incomplete files that can be found around the net.

The patches contain three files:

* a common `acmsigs.inc` file with all the stiles;
* a layout specific to the normal, strict style `acm_proc_article-sp`;
* a layout specific to the tighter, alternate style `sig-alternate`.


I am about to post these. It's not essential, I think, for layout files, 
but if you'd like to be listed as a contributor to LyX, please post a 
message to the list saying something like: I hereby license my 
contributions to LyX under the General Public License, Version 2 or any 
later version.


Richard



Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
Hello Richard,


On Thu, May 23, 2013 at 3:55 PM, Richard Heck rgh...@lyx.org wrote:
 provide the lyx2lyx bits. We need to take any sequence of Chunk
 layouts and replace them by a Chunk inset. If the Chunk has some
 alignments parameters, they should be given to the Standard layout
 paragraph that holds the Chunk layout.

 Can you post an example file I can use for testing?

I attach an old-style knitr.lyx file containing a chunk style with 2+2
code in it. And a new-style knitr-new.lyx equivalent, this time with a
chunk inset containing 2+2.

Let me know if you need anything else. Thanks ,
Liviu


knitr.lyx
Description: Binary data


knitr-new.lyx
Description: Binary data


Mac-style paragraph movement

2013-05-23 Thread BH
This has bothered me for a while (since 2007! --
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg60084.html), so I
finally decided to do something about it

On Mac, moving down a paragraph should place the cursor at the end of the
current paragraph (unless it's already there, in which case it should move
to the end of the next paragraph). The attached patch does this, honoring
the Use Mac-style for cursor moving between words preference setting,
which I've renamed Use Mac-style cursor movement.

In doing this, I changed the preference setting name
(mac_like_word_movement to mac_like_cursor_movement) to better reflect its
function, and I altered the description of this preference setting in the
dialog. (It probably wouldn't hurt if translations for that description
didn't get changed.)

The only thing I'm not reasonably sure about is the accelerator key in the
Preferences dialog (since these don't show up on Mac). I chose Use
Mac-style ..., since a wasn't used as an accelerator elsewhere in the
dialog.

BH


mac-cursor.diff
Description: Binary data


Re: Mac-style paragraph movement

2013-05-23 Thread Richard Heck

On 05/23/2013 11:11 AM, BH wrote:
This has bothered me for a while (since 2007! -- 
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg60084.html), so 
I finally decided to do something about it


On Mac, moving down a paragraph should place the cursor at the end of 
the current paragraph (unless it's already there, in which case it 
should move to the end of the next paragraph). The attached patch does 
this, honoring the Use Mac-style for cursor moving between words 
preference setting, which I've renamed Use Mac-style cursor movement.


In doing this, I changed the preference setting name 
(mac_like_word_movement to mac_like_cursor_movement) to better reflect 
its function, and I altered the description of this preference setting 
in the dialog. (It probably wouldn't hurt if translations for that 
description didn't get changed.)


The only thing I'm not reasonably sure about is the accelerator key in 
the Preferences dialog (since these don't show up on Mac). I chose 
Use Mac-style ..., since a wasn't used as an accelerator 
elsewhere in the dialog.


There will need to be some prefs2prefs done for this. You will need to 
bump the LYXRC format in LyXRC.cpp, and then write the appropriate 
routine in lib/scripts/prefs2prefs_prefs.py. The latter should be 
trivial, since the simple_renaming() function should do the trick. See 
its use in the language_package() function.


The patch looks safe to me, though probably some other Mac person should 
have a look.


Richard



Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck


So the relevant bits of these files look like:

\begin_layout Chunk
TEST=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
@
\end_layout

and:

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout
2+2
\end_layout

\end_inset


\end_layout

Is it correct, then, to remove the first and last chunks, and leave only 
the middle bit?


Richard



Re: Mac-style paragraph movement

2013-05-23 Thread BH
You mean like this? (New diff attached.)

BH


On Thu, May 23, 2013 at 11:17 AM, Richard Heck rgh...@lyx.org wrote:

 On 05/23/2013 11:11 AM, BH wrote:

 This has bothered me for a while (since 2007! --
 http://www.mail-archive.com/**lyx-us...@lists.lyx.org/**msg60084.htmlhttp://www.mail-archive.com/lyx-users@lists.lyx.org/msg60084.html),
 so I finally decided to do something about it

 On Mac, moving down a paragraph should place the cursor at the end of the
 current paragraph (unless it's already there, in which case it should move
 to the end of the next paragraph). The attached patch does this, honoring
 the Use Mac-style for cursor moving between words preference setting,
 which I've renamed Use Mac-style cursor movement.

 In doing this, I changed the preference setting name
 (mac_like_word_movement to mac_like_cursor_movement) to better reflect its
 function, and I altered the description of this preference setting in the
 dialog. (It probably wouldn't hurt if translations for that description
 didn't get changed.)

 The only thing I'm not reasonably sure about is the accelerator key in
 the Preferences dialog (since these don't show up on Mac). I chose Use
 Mac-style ..., since a wasn't used as an accelerator elsewhere in the
 dialog.


 There will need to be some prefs2prefs done for this. You will need to
 bump the LYXRC format in LyXRC.cpp, and then write the appropriate routine
 in lib/scripts/prefs2prefs_prefs.**py. The latter should be trivial,
 since the simple_renaming() function should do the trick. See its use in
 the language_package() function.

 The patch looks safe to me, though probably some other Mac person should
 have a look.

 Richard




mac-cursor2.diff
Description: Binary data


Re: Mac-style paragraph movement

2013-05-23 Thread Stephan Witt
Am 23.05.2013 um 17:35 schrieb BH bewih...@gmail.com:

 You mean like this? (New diff attached.)
 
 BH
 
 
 On Thu, May 23, 2013 at 11:17 AM, Richard Heck rgh...@lyx.org wrote:
 On 05/23/2013 11:11 AM, BH wrote:
 This has bothered me for a while (since 2007! -- 
 http://www.mail-archive.com/lyx-users@lists.lyx.org/msg60084.html), so I 
 finally decided to do something about it
 
 On Mac, moving down a paragraph should place the cursor at the end of the 
 current paragraph (unless it's already there, in which case it should move to 
 the end of the next paragraph). The attached patch does this, honoring the 
 Use Mac-style for cursor moving between words preference setting, which 
 I've renamed Use Mac-style cursor movement.
 
 In doing this, I changed the preference setting name (mac_like_word_movement 
 to mac_like_cursor_movement) to better reflect its function, and I altered 
 the description of this preference setting in the dialog. (It probably 
 wouldn't hurt if translations for that description didn't get changed.)
 
 The only thing I'm not reasonably sure about is the accelerator key in the 
 Preferences dialog (since these don't show up on Mac). I chose Use 
 Mac-style ..., since a wasn't used as an accelerator elsewhere in the 
 dialog.
 
 There will need to be some prefs2prefs done for this. You will need to bump 
 the LYXRC format in LyXRC.cpp, and then write the appropriate routine in 
 lib/scripts/prefs2prefs_prefs.py. The latter should be trivial, since the 
 simple_renaming() function should do the trick. See its use in the 
 language_package() function.
 
 The patch looks safe to me, though probably some other Mac person should have 
 a look.

Ok, I've tested it and it works. 

The development/MacOSX/lyxrc.dist.in file should be changed too, shouldn't it?

Stephan

Re: Mac-style paragraph movement

2013-05-23 Thread BH
On Thu, May 23, 2013 at 11:52 AM, Stephan Witt st.w...@gmx.net wrote:

 Ok, I've tested it and it works.

 The development/MacOSX/lyxrc.dist.in file should be changed too,
 shouldn't it?

 Stephan


Yes. Here's a third patch.

BH


mac-cursor3.diff
Description: Binary data


Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
Richard,
I'm sorry but I gave you an imperfect equivalent for the inset
example. The attached knitr-new.lyx is better, and also uses the
argument inset. The relevant bits are:

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout

TEST
\end_layout

\end_inset

2+2
\end_layout

\end_inset


\end_layout


The code below is the old-style equivalent of the above.


On Thu, May 23, 2013 at 5:17 PM, Richard Heck rgh...@lyx.org wrote:
 \begin_layout Chunk
 TEST=
 \end_layout

 \begin_layout Chunk
 2+2
 \end_layout

 \begin_layout Chunk
 @
 \end_layout


 Is it correct, then, to remove the first and last chunks, and leave only the
 middle bit?

I do not have a good understanding of the LyX file format. Maybe JMarc
knows better?

Liviu


knitr-new.lyx
Description: Binary data


Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck


So we take what's in the first Chunk paragraph, strip off the  and = 
delimiters, and put that into the argument of the Chunk inset. Then we 
take everything up to the last Chunk paragraph, put that as a sequence 
of paragraphs into the Chunk inset, and discard the last Chunk 
paragraph. Yes?


Richard


On 05/23/2013 12:11 PM, Liviu Andronic wrote:

Richard,
I'm sorry but I gave you an imperfect equivalent for the inset
example. The attached knitr-new.lyx is better, and also uses the
argument inset. The relevant bits are:

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout

TEST
\end_layout

\end_inset

2+2
\end_layout

\end_inset


\end_layout


The code below is the old-style equivalent of the above.


On Thu, May 23, 2013 at 5:17 PM, Richard Heck rgh...@lyx.org wrote:

\begin_layout Chunk
TEST=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
@
\end_layout

Is it correct, then, to remove the first and last chunks, and leave only the
middle bit?


I do not have a good understanding of the LyX file format. Maybe JMarc
knows better?

Liviu




Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
On Thu, May 23, 2013 at 6:14 PM, Richard Heck rgh...@lyx.org wrote:

 So we take what's in the first Chunk paragraph, strip off the  and =
 delimiters, and put that into the argument of the Chunk inset.

Yes. Often after stripping the contents will be an empty string ().
Then I think there is no need to include the Chunk argument inset.


 Then we take
 everything up to the last Chunk paragraph, put that as a sequence of
 paragraphs into the Chunk inset, and discard the last Chunk paragraph. Yes?

That is my understanding, too. I attach a new pair of examples that
contain multiple lines of code. Old Style version:
\begin_layout Chunk
TEST=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
3+3
\end_layout

\begin_layout Chunk
@
\end_layout


New Inset version:
\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout
TEST
\end_layout

\end_inset

2+2
\end_layout

\begin_layout Plain Layout

3+3
\end_layout

\end_inset


\end_layout


Liviu


 Richard



 On 05/23/2013 12:11 PM, Liviu Andronic wrote:

 Richard,
 I'm sorry but I gave you an imperfect equivalent for the inset
 example. The attached knitr-new.lyx is better, and also uses the
 argument inset. The relevant bits are:

 \begin_layout Standard
 \begin_inset Flex Chunk
 status open

 \begin_layout Plain Layout

 \begin_inset Argument 1
 status open

 \begin_layout Plain Layout

 TEST
 \end_layout

 \end_inset

 2+2
 \end_layout

 \end_inset


 \end_layout


 The code below is the old-style equivalent of the above.


 On Thu, May 23, 2013 at 5:17 PM, Richard Heck rgh...@lyx.org wrote:

 \begin_layout Chunk
 TEST=
 \end_layout

 \begin_layout Chunk
 2+2
 \end_layout

 \begin_layout Chunk
 @
 \end_layout

 Is it correct, then, to remove the first and last chunks, and leave only
 the
 middle bit?

 I do not have a good understanding of the LyX file format. Maybe JMarc
 knows better?

 Liviu





-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


knitr.lyx
Description: Binary data


knitr-new.lyx
Description: Binary data


Re: Mac-style paragraph movement

2013-05-23 Thread Stephan Witt
Am 23.05.2013 um 18:11 schrieb BH bewih...@gmail.com:

 On Thu, May 23, 2013 at 11:52 AM, Stephan Witt st.w...@gmx.net wrote:
 Ok, I've tested it and it works.
 
 The development/MacOSX/lyxrc.dist.in file should be changed too, shouldn't it?
 
 Stephan
 
 Yes. Here's a third patch.
 
 BH

Thank you. This works for me (out of the box). I'm fine with it.

Stephan

Re: Mac-style paragraph movement

2013-05-23 Thread Richard Heck

On 05/23/2013 12:28 PM, Stephan Witt wrote:

Am 23.05.2013 um 18:11 schrieb BH bewih...@gmail.com:


On Thu, May 23, 2013 at 11:52 AM, Stephan Witt st.w...@gmx.net wrote:
Ok, I've tested it and it works.

The development/MacOSX/lyxrc.dist.in file should be changed too, shouldn't it?

Stephan

Yes. Here's a third patch.

BH

Thank you. This works for me (out of the box). I'm fine with it.


You want to commit it, Stephan? I don't think Bennett has rights

rh



Stephan





Re: Mac-style paragraph movement

2013-05-23 Thread Jean-Marc Lasgouttes

Le 23/05/2013 18:11, BH a écrit :

Yes. Here's a third patch.


A couple of things to fix before committing:

1/ you should handle paragraph-up too.

2/ I would replace getPar(cur.pit()).size() with something like 
cur.lastpos(). Of course, this does not really work for the other 
instance, but I suspect that the code can be simplified by computing the 
new cursor first, and calling setCursor later.


Nice patch otherwise :)

JMarc


Contribution license

2013-05-23 Thread Gioele Barabucci
I hereby license my contributions to LyX under the General Public 
License, Version 2 or any later version.


--
Gioele Barabucci gio...@svario.it


Re: Mac-style paragraph movement

2013-05-23 Thread BH
On Thu, May 23, 2013 at 1:47 PM, Jean-Marc Lasgouttes lasgout...@lyx.orgwrote:

 Le 23/05/2013 18:11, BH a écrit :

  Yes. Here's a third patch.


 A couple of things to fix before committing:

 1/ you should handle paragraph-up too.


Not sure what you have in mind here: paragraph-up on Mac works just like on
other platforms (doesn't it?), so I intentionally didn't touch that part of
the code.


 2/ I would replace getPar(cur.pit()).size() with something like
 cur.lastpos().


That makes sense. As I was trying to understand the code, I initially used
what I found in cursorBackward when moving to the previous paragraph, only
later realizing that cur.lastpos() returns the last position in the current
paragraph. New patch (#4) attached.


 Of course, this does not really work for the other instance, but I suspect
 that the code can be simplified by computing the new cursor first, and
 calling setCursor later.


(What other instance? You mean paragraph-up?)


 Nice patch otherwise :)


Thanks!


mac-cursor4.diff
Description: Binary data


Re: Xfig external file import bug.

2013-05-23 Thread Georg Baum
Julien Rioux wrote:

 On 08/04/2013 3:20 PM, Georg Baum wrote:
 If nobody beats me to it I'll have a look, but since I am very short on
 time currently this may only be in about two weeks.


 Georg


 
 Ping!

Sorry, I forgot this one, and now I am short on time again. It would be very 
nice if you could create a bug entry including the test cases and cc me, 
then I won't forget again.


Georg



Re: LyX 2.1 beta 1: due in two weeks

2013-05-23 Thread Georg Baum
Vincent van Ravesteijn wrote:

 Development of new features and/or fixes that can wait for LyX 2.1.x, or
 2.2.0, can take place in the new features repository.

IMHO it would be very good to concentrate on 2.1.0 and not to work on 2.2 or 
2.1.x stuff at all until 2.1.0 is released. Otherwise it will be very 
difficult to do a timely release.

 Please let me know if you have any remarks.

What is the status of the bugs targeted to 2.1.0? Is the current list OK, or 
do we still need to postpone some?


Georg



Re: [LyX master] Pass local font to arguments and assure pass_thru is inherited

2013-05-23 Thread Scott Kostyshak
On Mon, May 20, 2013 at 6:33 AM, Jürgen Spitzmüller sp...@lyx.org wrote:
 Scott Kostyshak wrote:
 Git bisect suggests that this broke the Hebrew Intro.lyx compilation.
 Attached is the diff of the exported LaTeX (pdflatex) files.

 Any ideas?

 The actual problem is fixed, I reverted wrong parts of said commit. But I'm
 not sure argument insets will still have the correct font and encoding now.
 This is rather nasty stuff.

At commit a78bed06, export works fine, but starting with the next
commit (a8a2bd46), export is broken again. I think this is because if
you export to pdflatex the file has encoding latin1 whereas before it
had encoding utf-8.

Scott


Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck


I have posted a lyx2lyx conversion routine to the bug report
http://www.lyx.org/trac/ticket/8588#comment:23
Please test and let me know if there are problems. If so, please post 
the file causing the problems here, stripped down to be as minimal as 
possible.


I have not yet written the REversion routine. I'll do that after this is 
right.


Richard


On 05/23/2013 12:25 PM, Liviu Andronic wrote:

On Thu, May 23, 2013 at 6:14 PM, Richard Heck rgh...@lyx.org wrote:

So we take what's in the first Chunk paragraph, strip off the  and =
delimiters, and put that into the argument of the Chunk inset.


Yes. Often after stripping the contents will be an empty string ().
Then I think there is no need to include the Chunk argument inset.



Then we take
everything up to the last Chunk paragraph, put that as a sequence of
paragraphs into the Chunk inset, and discard the last Chunk paragraph. Yes?


That is my understanding, too. I attach a new pair of examples that
contain multiple lines of code. Old Style version:
\begin_layout Chunk
TEST=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
3+3
\end_layout

\begin_layout Chunk
@
\end_layout


New Inset version:
\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout
TEST
\end_layout

\end_inset

2+2
\end_layout

\begin_layout Plain Layout

3+3
\end_layout

\end_inset


\end_layout


Liviu



Richard



On 05/23/2013 12:11 PM, Liviu Andronic wrote:

Richard,
I'm sorry but I gave you an imperfect equivalent for the inset
example. The attached knitr-new.lyx is better, and also uses the
argument inset. The relevant bits are:

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout

TEST
\end_layout

\end_inset

2+2
\end_layout

\end_inset


\end_layout


The code below is the old-style equivalent of the above.


On Thu, May 23, 2013 at 5:17 PM, Richard Heck rgh...@lyx.org wrote:

\begin_layout Chunk
TEST=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
@
\end_layout

Is it correct, then, to remove the first and last chunks, and leave only
the
middle bit?


I do not have a good understanding of the LyX file format. Maybe JMarc
knows better?

Liviu









Re: [LyX master] Pass local font to arguments and assure pass_thru is inherited

2013-05-23 Thread Scott Kostyshak
On Thu, May 23, 2013 at 4:03 PM, Scott Kostyshak skost...@lyx.org wrote:
 On Mon, May 20, 2013 at 6:33 AM, Jürgen Spitzmüller sp...@lyx.org wrote:
 Scott Kostyshak wrote:
 Git bisect suggests that this broke the Hebrew Intro.lyx compilation.
 Attached is the diff of the exported LaTeX (pdflatex) files.

 Any ideas?

 The actual problem is fixed, I reverted wrong parts of said commit. But I'm
 not sure argument insets will still have the correct font and encoding now.
 This is rather nasty stuff.

 At commit a78bed06, export works fine, but starting with the next
 commit (a8a2bd46), export is broken again. I think this is because if
 you export to pdflatex the file has encoding latin1 whereas before it
 had encoding utf-8.

Sorry, this response was supposed to be to the Chinese Tutorial email
thread. I will copy it there.

The Hebrew Intro now exports fine for me. Thanks.

Scott


Re: regression: Chinese tutorial no longer exports (missing babel and language option)

2013-05-23 Thread Scott Kostyshak
On Mon, May 20, 2013 at 5:08 AM, Jürgen Spitzmüller sp...@lyx.org wrote:
 Scott Kostyshak wrote:
 The commit that git bisect lead me to and the diff between the
 pdflatex .tex files of before and after the following commit (which is
 the same as the diff between the output from before and current trunk)
 is pasted below. After adding the English class option and adding
 babel to the preamble, the export works fine. Is this what should be
 done to the document or is it an internal issue?

At commit a78bed06, export of the Chinese Tutorial works fine, but
starting with the next
commit (a8a2bd46), export is broken again. I think this is because if
you export to pdflatex the file has encoding latin1 whereas before it
had encoding utf-8.

Scott


Re: Mac-style paragraph movement

2013-05-23 Thread Jean-Marc Lasgouttes

Le 23/05/13 20:24, BH a écrit :

1/ you should handle paragraph-up too.

Not sure what you have in mind here: paragraph-up on Mac works just like
on other platforms (doesn't it?), so I intentionally didn't touch that
part of the code.


I stand corrected.


Of course, this does not really work for the other instance, but I
suspect that the code can be simplified by computing the new cursor
first, and calling setCursor later.


(What other instance? You mean paragraph-up?)


No, the getPar(cur.pit() + 1).size().

What happens when we are already at the last paragraph, BTW?

JMarc


Re: Mac-style paragraph movement

2013-05-23 Thread Stephan Witt
Am 23.05.2013 um 23:00 schrieb Jean-Marc Lasgouttes lasgout...@lyx.org:

 Le 23/05/13 20:24, BH a écrit :
1/ you should handle paragraph-up too.
 
 Not sure what you have in mind here: paragraph-up on Mac works just like
 on other platforms (doesn't it?), so I intentionally didn't touch that
 part of the code.
 
 I stand corrected.
 
Of course, this does not really work for the other instance, but I
suspect that the code can be simplified by computing the new cursor
first, and calling setCursor later.
 
 
 (What other instance? You mean paragraph-up?)
 
 No, the getPar(cur.pit() + 1).size().
 
 What happens when we are already at the last paragraph, BTW?


It jumps to the end of this paragraph here.

I've tried the mac-cursor4.diff patch. I tested it with the Users Guide and the 
Beamer Doc.
I'm fine with it.

Stephan

Re: [LyX master] UserGuide.lyx: translations

2013-05-23 Thread Kornel Benko
Am Donnerstag, 23. Mai 2013 um 01:26:10, schrieb Uwe Stöhr 
> commit bcabe09612dddeb82750f52851468a5231aeb170
> Author: Uwe Stöhr 
> Date:   Thu May 23 01:25:54 2013 +0200
> 
> UserGuide.lyx: translations
> 
> - to fix the mysterious compilation problems on some machines
> 
> diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx

But this is NOT OK. The lyx-file is not to blame.
We need at least a test-case for this behaviour.

Kornel

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


Re: Re: [LyX master] UserGuide.lyx: first step of revision

2013-05-23 Thread Kornel Benko
Am Donnerstag, 23. Mai 2013 um 01:57:32, schrieb Uwe Stöhr 
> Am 22.05.2013 08:16, schrieb Kornel Benko:
> 
> > Removing "\foreignlanguage{ngerman}" (as it is on 2.0.x) makes it 
> > compilable. This is a regression.
> 
> But I already removed "\foreignlanguage{ngerman}". The German docs were 
> always identical in branch 
> and master.
> 
> regards Uwe

I mean "\foreignlanguage{ngerman}" in the .tex file, not in .lyx-file.

Kornel

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


Re: RFC - offer users to set preferred float paragraph style

2013-05-23 Thread Vincent van Ravesteijn

Op 23-5-2013 2:15, Uwe Stöhr schreef:

Am 22.05.2013 07:38, schrieb Vincent van Ravesteijn:

The setting is somewhat between the the document settings and the 
preferences. The idea is to
change only the way NEW floats are inserted. Existing floats will 
not be changed by this setting.


If you would have read what I and Jurgen wrote before, this is 
exactly what we do NOT want.


I read his post carefully. I think I made it clear with my example why 
I don't agree with you here and why Ithink that 2 different features 
are needed. What do you think is wrong in my example?




Your example is not very good. What you describe in the example can be 
done perfectly with what Jurgen proposed.


For the reason that in many cases one or a few floats needs to have 
another alignment than all other floats, my setting does not change 
existing floats. 


This is not a valid reason. Jurgen's options changes existing floats, 
but only those that have the "default" alignment. If you've manually 
changed the alignment to be left aligned, the float will not be touched. 
So, this is not a justification for a setting that only influences new 
floats.


I really do not want an option that says how new floats are aligned. I 
do not expect this to be a property of the document. I have explained 
before why. If you do not agree, then discuss our arguments. Of course, 
for every possible workflow, one can think of an example that will work 
perfectly.


Vincent



Re: Re: Re: [LyX master] UserGuide.lyx: first step of revision

2013-05-23 Thread Kornel Benko
Am Donnerstag, 23. Mai 2013 um 08:41:21, schrieb Kornel Benko 
> Am Donnerstag, 23. Mai 2013 um 01:57:32, schrieb Uwe Stöhr 
> > Am 22.05.2013 08:16, schrieb Kornel Benko:
> > 
> > > Removing "\foreignlanguage{ngerman}" (as it is on 2.0.x) makes it 
> > > compilable. This is a regression.
> > 
> > But I already removed "\foreignlanguage{ngerman}". The German docs were 
> > always identical in branch 
> > and master.
> > 
> > regards Uwe
> 
> I mean "\foreignlanguage{ngerman}" in the .tex file, not in .lyx-file.
> 
>   Kornel

And, BTW, it still is not compilable.

Kornel

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


Re: Re: Re: Re: [LyX master] UserGuide.lyx: first step of revision

2013-05-23 Thread Kornel Benko
Am Donnerstag, 23. Mai 2013 um 09:09:50, schrieb Kornel Benko 
> Am Donnerstag, 23. Mai 2013 um 08:41:21, schrieb Kornel Benko 
> > Am Donnerstag, 23. Mai 2013 um 01:57:32, schrieb Uwe Stöhr 
> > 
> > > Am 22.05.2013 08:16, schrieb Kornel Benko:
> > > 
> > > > Removing "\foreignlanguage{ngerman}" (as it is on 2.0.x) makes it 
> > > > compilable. This is a regression.
> > > 
> > > But I already removed "\foreignlanguage{ngerman}". The German docs were 
> > > always identical in branch 
> > > and master.
> > > 
> > > regards Uwe
> > 
> > I mean "\foreignlanguage{ngerman}" in the .tex file, not in .lyx-file.
> > 
> > Kornel
> 
> And, BTW, it still is not compilable.
> 
Forget it. I was too fast. I got two dialog-windows claimin something with 
'Auflistung' is
OK. But in the end, de/UserGuide compiles.

Still, I think, someone (Jürgen?) should look into this.

Kornel

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


Re: RFC - offer users to set preferred float paragraph style

2013-05-23 Thread Guenter Milde
On 2013-05-23, Vincent van Ravesteijn wrote:
> Op 23-5-2013 2:15, Uwe Stöhr schreef:
>> Am 22.05.2013 07:38, schrieb Vincent van Ravesteijn:

...

>> For the reason that in many cases one or a few floats needs to have 
>> another alignment than all other floats, my setting does not change 
>> existing floats. 

> This is not a valid reason. Jurgen's options changes existing floats, 
> but only those that have the "default" alignment. If you've manually 
> changed the alignment to be left aligned, the float will not be touched. 

I also prefer one configuration setting changing the "default" alignment,
independent of the "age" of floats.

Günter



Re: r40969 - www-user/trunk/farm/cookbook/LyX

2013-05-23 Thread Richard Heck

On 05/22/2013 09:49 PM, Pavel Sanda wrote:

rgh...@lyx.org wrote:

Author: rgheck
Date: Thu May 23 00:38:52 2013
New Revision: 40969
URL: http://www.lyx.org/trac/changeset/40969
  

Modified: www-user/trunk/farm/cookbook/LyX/credits.inc
==
--- www-user/trunk/farm/cookbook/LyX/credits.incWed May 22 08:23:14 
2013(r40968)
+++ www-user/trunk/farm/cookbook/LyX/credits.incThu May 23 00:38:52 
2013(r40969)
@@ -17,7 +17,7 @@
  } else
  $output=$output. "${name}";
  
-$msg = preg_replace("/\n */", "\n  ", ltrim($msg));

+$msg = ereg_replace("\n *", "\n  ", ltrim($msg));

Easter egg!!! Richard, did you check our main web pages after this commit? P


Uh, no, but I see the problem. I'm not sure why it was preg before. It's 
ereg in generate_contributions.py, both in branch and in trunk. Someone 
must have fixed it directly in credits.inc.


Richard



Re: [LyX master] Add support for package options in layout files. E.g.: PackageOption tipa safe will load tipa with the "safe" option, if we load it.

2013-05-23 Thread Vincent van Ravesteijn

Op 23-5-2013 15:35, Richard Heck schreef:

The branch, master, has been updated.

- Log -

commit 1230372566dc571fbf76adca00453d2c6009d52b
Author: Richard Heck 
Date:   Thu May 23 09:25:40 2013 -0400

 Add support for package options in layout files. E.g.:
PackageOption tipa safe will load tipa with the
  "safe" option, if we load it.




Does this require a file format bump ?

Vincent



Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck

On 05/18/2013 03:02 AM, Liviu Andronic wrote:

Dear all,
JMarc and I decided to go ahead with the Chunk inset for the literate
modules in 2.1, and now we're only missing the lyx2lyx conversion
routines.

Now the patch is available on the bug tracker (
http://www.lyx.org/trac/ticket/8588 : litinsets.inc and
sweave-knitr-noweb-inset-chunk.patch), and we ask for a kind soul to
provide the lyx2lyx bits. We need to take any sequence of Chunk
layouts and replace them by a Chunk inset. If the Chunk has some
alignments parameters, they should be given to the Standard layout
paragraph that holds the Chunk layout.


Can you post an example file I can use for testing?

Richard



Re: [PATCH] Layout files for ACM SIGS style

2013-05-23 Thread Richard Heck

On 05/15/2013 01:36 PM, Gioele Barabucci wrote:

Hello,

I made two layout files for the ACM SIGS proceedings styles [1].

I hope that they can be included in the standard LyX sources so that other 
people will be able to use those styles without resorting very old and 
incomplete files that can be found around the net.

The patches contain three files:

* a common `acmsigs.inc` file with all the stiles;
* a layout specific to the normal, strict style `acm_proc_article-sp`;
* a layout specific to the tighter, alternate style `sig-alternate`.


I am about to post these. It's not essential, I think, for layout files, 
but if you'd like to be listed as a contributor to LyX, please post a 
message to the list saying something like: "I hereby license my 
contributions to LyX under the General Public License, Version 2 or any 
later version."


Richard



Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
Hello Richard,


On Thu, May 23, 2013 at 3:55 PM, Richard Heck  wrote:
>> provide the lyx2lyx bits. We need to take any sequence of Chunk
>> layouts and replace them by a Chunk inset. If the Chunk has some
>> alignments parameters, they should be given to the Standard layout
>> paragraph that holds the Chunk layout.
>
> Can you post an example file I can use for testing?
>
I attach an old-style knitr.lyx file containing a chunk style with 2+2
code in it. And a new-style knitr-new.lyx equivalent, this time with a
chunk inset containing 2+2.

Let me know if you need anything else. Thanks ,
Liviu


knitr.lyx
Description: Binary data


knitr-new.lyx
Description: Binary data


Mac-style paragraph movement

2013-05-23 Thread BH
This has bothered me for a while (since 2007! --
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg60084.html), so I
finally decided to do something about it

On Mac, moving down a paragraph should place the cursor at the end of the
current paragraph (unless it's already there, in which case it should move
to the end of the next paragraph). The attached patch does this, honoring
the "Use Mac-style for cursor moving between words" preference setting,
which I've renamed "Use Mac-style cursor movement".

In doing this, I changed the preference setting name
(mac_like_word_movement to mac_like_cursor_movement) to better reflect its
function, and I altered the description of this preference setting in the
dialog. (It probably wouldn't hurt if translations for that description
didn't get changed.)

The only thing I'm not reasonably sure about is the accelerator key in the
Preferences dialog (since these don't show up on Mac). I chose "Use
M ...", since "a" wasn't used as an accelerator elsewhere in the
dialog.

BH


mac-cursor.diff
Description: Binary data


Re: Mac-style paragraph movement

2013-05-23 Thread Richard Heck

On 05/23/2013 11:11 AM, BH wrote:
This has bothered me for a while (since 2007! -- 
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg60084.html), so 
I finally decided to do something about it


On Mac, moving down a paragraph should place the cursor at the end of 
the current paragraph (unless it's already there, in which case it 
should move to the end of the next paragraph). The attached patch does 
this, honoring the "Use Mac-style for cursor moving between words" 
preference setting, which I've renamed "Use Mac-style cursor movement".


In doing this, I changed the preference setting name 
(mac_like_word_movement to mac_like_cursor_movement) to better reflect 
its function, and I altered the description of this preference setting 
in the dialog. (It probably wouldn't hurt if translations for that 
description didn't get changed.)


The only thing I'm not reasonably sure about is the accelerator key in 
the Preferences dialog (since these don't show up on Mac). I chose 
"Use M ...", since "a" wasn't used as an accelerator 
elsewhere in the dialog.


There will need to be some prefs2prefs done for this. You will need to 
bump the LYXRC format in LyXRC.cpp, and then write the appropriate 
routine in lib/scripts/prefs2prefs_prefs.py. The latter should be 
trivial, since the simple_renaming() function should do the trick. See 
its use in the language_package() function.


The patch looks safe to me, though probably some other Mac person should 
have a look.


Richard



Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck


So the relevant bits of these files look like:

\begin_layout Chunk
<>=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
@
\end_layout

and:

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout
2+2
\end_layout

\end_inset


\end_layout

Is it correct, then, to remove the first and last chunks, and leave only 
the middle bit?


Richard



Re: Mac-style paragraph movement

2013-05-23 Thread BH
You mean like this? (New diff attached.)

BH


On Thu, May 23, 2013 at 11:17 AM, Richard Heck  wrote:

> On 05/23/2013 11:11 AM, BH wrote:
>
>> This has bothered me for a while (since 2007! --
>> http://www.mail-archive.com/**lyx-us...@lists.lyx.org/**msg60084.html),
>> so I finally decided to do something about it
>>
>> On Mac, moving down a paragraph should place the cursor at the end of the
>> current paragraph (unless it's already there, in which case it should move
>> to the end of the next paragraph). The attached patch does this, honoring
>> the "Use Mac-style for cursor moving between words" preference setting,
>> which I've renamed "Use Mac-style cursor movement".
>>
>> In doing this, I changed the preference setting name
>> (mac_like_word_movement to mac_like_cursor_movement) to better reflect its
>> function, and I altered the description of this preference setting in the
>> dialog. (It probably wouldn't hurt if translations for that description
>> didn't get changed.)
>>
>> The only thing I'm not reasonably sure about is the accelerator key in
>> the Preferences dialog (since these don't show up on Mac). I chose "Use
>> M ...", since "a" wasn't used as an accelerator elsewhere in the
>> dialog.
>>
>
> There will need to be some prefs2prefs done for this. You will need to
> bump the LYXRC format in LyXRC.cpp, and then write the appropriate routine
> in lib/scripts/prefs2prefs_prefs.**py. The latter should be trivial,
> since the simple_renaming() function should do the trick. See its use in
> the language_package() function.
>
> The patch looks safe to me, though probably some other Mac person should
> have a look.
>
> Richard
>
>


mac-cursor2.diff
Description: Binary data


Re: Mac-style paragraph movement

2013-05-23 Thread Stephan Witt
Am 23.05.2013 um 17:35 schrieb BH :

> You mean like this? (New diff attached.)
> 
> BH
> 
> 
> On Thu, May 23, 2013 at 11:17 AM, Richard Heck  wrote:
> On 05/23/2013 11:11 AM, BH wrote:
> This has bothered me for a while (since 2007! -- 
> http://www.mail-archive.com/lyx-users@lists.lyx.org/msg60084.html), so I 
> finally decided to do something about it
> 
> On Mac, moving down a paragraph should place the cursor at the end of the 
> current paragraph (unless it's already there, in which case it should move to 
> the end of the next paragraph). The attached patch does this, honoring the 
> "Use Mac-style for cursor moving between words" preference setting, which 
> I've renamed "Use Mac-style cursor movement".
> 
> In doing this, I changed the preference setting name (mac_like_word_movement 
> to mac_like_cursor_movement) to better reflect its function, and I altered 
> the description of this preference setting in the dialog. (It probably 
> wouldn't hurt if translations for that description didn't get changed.)
> 
> The only thing I'm not reasonably sure about is the accelerator key in the 
> Preferences dialog (since these don't show up on Mac). I chose "Use 
> M ...", since "a" wasn't used as an accelerator elsewhere in the 
> dialog.
> 
> There will need to be some prefs2prefs done for this. You will need to bump 
> the LYXRC format in LyXRC.cpp, and then write the appropriate routine in 
> lib/scripts/prefs2prefs_prefs.py. The latter should be trivial, since the 
> simple_renaming() function should do the trick. See its use in the 
> language_package() function.
> 
> The patch looks safe to me, though probably some other Mac person should have 
> a look.

Ok, I've tested it and it works. 

The development/MacOSX/lyxrc.dist.in file should be changed too, shouldn't it?

Stephan

Re: Mac-style paragraph movement

2013-05-23 Thread BH
On Thu, May 23, 2013 at 11:52 AM, Stephan Witt  wrote:

> Ok, I've tested it and it works.
>
> The development/MacOSX/lyxrc.dist.in file should be changed too,
> shouldn't it?
>
> Stephan


Yes. Here's a third patch.

BH


mac-cursor3.diff
Description: Binary data


Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
Richard,
I'm sorry but I gave you an imperfect equivalent for the inset
example. The attached knitr-new.lyx is better, and also uses the
argument inset. The relevant bits are:

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout

TEST
\end_layout

\end_inset

2+2
\end_layout

\end_inset


\end_layout


The code below is the old-style equivalent of the above.


On Thu, May 23, 2013 at 5:17 PM, Richard Heck  wrote:
> \begin_layout Chunk
> <>=
> \end_layout
>
> \begin_layout Chunk
> 2+2
> \end_layout
>
> \begin_layout Chunk
> @
> \end_layout
>

> Is it correct, then, to remove the first and last chunks, and leave only the
> middle bit?
>
I do not have a good understanding of the LyX file format. Maybe JMarc
knows better?

Liviu


knitr-new.lyx
Description: Binary data


Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck


So we take what's in the first Chunk paragraph, strip off the << and >>= 
delimiters, and put that into the argument of the Chunk inset. Then we 
take everything up to the last Chunk paragraph, put that as a sequence 
of paragraphs into the Chunk inset, and discard the last Chunk 
paragraph. Yes?


Richard


On 05/23/2013 12:11 PM, Liviu Andronic wrote:

Richard,
I'm sorry but I gave you an imperfect equivalent for the inset
example. The attached knitr-new.lyx is better, and also uses the
argument inset. The relevant bits are:

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout

TEST
\end_layout

\end_inset

2+2
\end_layout

\end_inset


\end_layout


The code below is the old-style equivalent of the above.


On Thu, May 23, 2013 at 5:17 PM, Richard Heck  wrote:

\begin_layout Chunk
<>=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
@
\end_layout

Is it correct, then, to remove the first and last chunks, and leave only the
middle bit?


I do not have a good understanding of the LyX file format. Maybe JMarc
knows better?

Liviu




Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
On Thu, May 23, 2013 at 6:14 PM, Richard Heck  wrote:
>
> So we take what's in the first Chunk paragraph, strip off the << and >>=
> delimiters, and put that into the argument of the Chunk inset.
>
Yes. Often after stripping the contents will be an empty string ("").
Then I think there is no need to include the Chunk argument inset.


> Then we take
> everything up to the last Chunk paragraph, put that as a sequence of
> paragraphs into the Chunk inset, and discard the last Chunk paragraph. Yes?
>
That is my understanding, too. I attach a new pair of examples that
contain multiple lines of code. Old Style version:
\begin_layout Chunk
<>=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
3+3
\end_layout

\begin_layout Chunk
@
\end_layout


New Inset version:
\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout
TEST
\end_layout

\end_inset

2+2
\end_layout

\begin_layout Plain Layout

3+3
\end_layout

\end_inset


\end_layout


Liviu


> Richard
>
>
>
> On 05/23/2013 12:11 PM, Liviu Andronic wrote:
>>
>> Richard,
>> I'm sorry but I gave you an imperfect equivalent for the inset
>> example. The attached knitr-new.lyx is better, and also uses the
>> argument inset. The relevant bits are:
>>
>> \begin_layout Standard
>> \begin_inset Flex Chunk
>> status open
>>
>> \begin_layout Plain Layout
>>
>> \begin_inset Argument 1
>> status open
>>
>> \begin_layout Plain Layout
>>
>> TEST
>> \end_layout
>>
>> \end_inset
>>
>> 2+2
>> \end_layout
>>
>> \end_inset
>>
>>
>> \end_layout
>>
>>
>> The code below is the old-style equivalent of the above.
>>
>>
>> On Thu, May 23, 2013 at 5:17 PM, Richard Heck  wrote:
>>>
>>> \begin_layout Chunk
>>> <>=
>>> \end_layout
>>>
>>> \begin_layout Chunk
>>> 2+2
>>> \end_layout
>>>
>>> \begin_layout Chunk
>>> @
>>> \end_layout
>>>
>>> Is it correct, then, to remove the first and last chunks, and leave only
>>> the
>>> middle bit?
>>>
>> I do not have a good understanding of the LyX file format. Maybe JMarc
>> knows better?
>>
>> Liviu
>
>



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


knitr.lyx
Description: Binary data


knitr-new.lyx
Description: Binary data


Re: Mac-style paragraph movement

2013-05-23 Thread Stephan Witt
Am 23.05.2013 um 18:11 schrieb BH :

> On Thu, May 23, 2013 at 11:52 AM, Stephan Witt  wrote:
> Ok, I've tested it and it works.
> 
> The development/MacOSX/lyxrc.dist.in file should be changed too, shouldn't it?
> 
> Stephan
> 
> Yes. Here's a third patch.
> 
> BH

Thank you. This works for me (out of the box). I'm fine with it.

Stephan

Re: Mac-style paragraph movement

2013-05-23 Thread Richard Heck

On 05/23/2013 12:28 PM, Stephan Witt wrote:

Am 23.05.2013 um 18:11 schrieb BH :


On Thu, May 23, 2013 at 11:52 AM, Stephan Witt  wrote:
Ok, I've tested it and it works.

The development/MacOSX/lyxrc.dist.in file should be changed too, shouldn't it?

Stephan

Yes. Here's a third patch.

BH

Thank you. This works for me (out of the box). I'm fine with it.


You want to commit it, Stephan? I don't think Bennett has rights

rh



Stephan





Re: Mac-style paragraph movement

2013-05-23 Thread Jean-Marc Lasgouttes

Le 23/05/2013 18:11, BH a écrit :

Yes. Here's a third patch.


A couple of things to fix before committing:

1/ you should handle paragraph-up too.

2/ I would replace getPar(cur.pit()).size() with something like 
cur.lastpos(). Of course, this does not really work for the other 
instance, but I suspect that the code can be simplified by computing the 
new cursor first, and calling setCursor later.


Nice patch otherwise :)

JMarc


Contribution license

2013-05-23 Thread Gioele Barabucci
I hereby license my contributions to LyX under the General Public 
License, Version 2 or any later version.


--
Gioele Barabucci 


Re: Mac-style paragraph movement

2013-05-23 Thread BH
On Thu, May 23, 2013 at 1:47 PM, Jean-Marc Lasgouttes wrote:

> Le 23/05/2013 18:11, BH a écrit :
>
>  Yes. Here's a third patch.
>>
>
> A couple of things to fix before committing:
>
> 1/ you should handle paragraph-up too.
>

Not sure what you have in mind here: paragraph-up on Mac works just like on
other platforms (doesn't it?), so I intentionally didn't touch that part of
the code.


> 2/ I would replace getPar(cur.pit()).size() with something like
> cur.lastpos().


That makes sense. As I was trying to understand the code, I initially used
what I found in cursorBackward when moving to the previous paragraph, only
later realizing that cur.lastpos() returns the last position in the current
paragraph. New patch (#4) attached.


> Of course, this does not really work for the other instance, but I suspect
> that the code can be simplified by computing the new cursor first, and
> calling setCursor later.
>

(What "other instance"? You mean paragraph-up?)


> Nice patch otherwise :)
>

Thanks!


mac-cursor4.diff
Description: Binary data


Re: Xfig external file import bug.

2013-05-23 Thread Georg Baum
Julien Rioux wrote:

> On 08/04/2013 3:20 PM, Georg Baum wrote:
>> If nobody beats me to it I'll have a look, but since I am very short on
>> time currently this may only be in about two weeks.
>>
>>
>> Georg
>>
>>
> 
> Ping!

Sorry, I forgot this one, and now I am short on time again. It would be very 
nice if you could create a bug entry including the test cases and cc me, 
then I won't forget again.


Georg



Re: LyX 2.1 beta 1: due in two weeks

2013-05-23 Thread Georg Baum
Vincent van Ravesteijn wrote:

> Development of new features and/or fixes that can wait for LyX 2.1.x, or
> 2.2.0, can take place in the new features repository.

IMHO it would be very good to concentrate on 2.1.0 and not to work on 2.2 or 
2.1.x stuff at all until 2.1.0 is released. Otherwise it will be very 
difficult to do a timely release.

> Please let me know if you have any remarks.

What is the status of the bugs targeted to 2.1.0? Is the current list OK, or 
do we still need to postpone some?


Georg



Re: [LyX master] Pass local font to arguments and assure pass_thru is inherited

2013-05-23 Thread Scott Kostyshak
On Mon, May 20, 2013 at 6:33 AM, Jürgen Spitzmüller  wrote:
> Scott Kostyshak wrote:
>> Git bisect suggests that this broke the Hebrew Intro.lyx compilation.
>> Attached is the diff of the exported LaTeX (pdflatex) files.
>>
>> Any ideas?
>
> The actual problem is fixed, I reverted wrong parts of said commit. But I'm
> not sure argument insets will still have the correct font and encoding now.
> This is rather nasty stuff.

At commit a78bed06, export works fine, but starting with the next
commit (a8a2bd46), export is broken again. I think this is because if
you export to pdflatex the file has encoding latin1 whereas before it
had encoding utf-8.

Scott


Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck


I have posted a lyx2lyx conversion routine to the bug report
http://www.lyx.org/trac/ticket/8588#comment:23
Please test and let me know if there are problems. If so, please post 
the file causing the problems here, stripped down to be as minimal as 
possible.


I have not yet written the REversion routine. I'll do that after this is 
right.


Richard


On 05/23/2013 12:25 PM, Liviu Andronic wrote:

On Thu, May 23, 2013 at 6:14 PM, Richard Heck  wrote:

So we take what's in the first Chunk paragraph, strip off the << and >>=
delimiters, and put that into the argument of the Chunk inset.


Yes. Often after stripping the contents will be an empty string ("").
Then I think there is no need to include the Chunk argument inset.



Then we take
everything up to the last Chunk paragraph, put that as a sequence of
paragraphs into the Chunk inset, and discard the last Chunk paragraph. Yes?


That is my understanding, too. I attach a new pair of examples that
contain multiple lines of code. Old Style version:
\begin_layout Chunk
<>=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
3+3
\end_layout

\begin_layout Chunk
@
\end_layout


New Inset version:
\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout
TEST
\end_layout

\end_inset

2+2
\end_layout

\begin_layout Plain Layout

3+3
\end_layout

\end_inset


\end_layout


Liviu



Richard



On 05/23/2013 12:11 PM, Liviu Andronic wrote:

Richard,
I'm sorry but I gave you an imperfect equivalent for the inset
example. The attached knitr-new.lyx is better, and also uses the
argument inset. The relevant bits are:

\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout

TEST
\end_layout

\end_inset

2+2
\end_layout

\end_inset


\end_layout


The code below is the old-style equivalent of the above.


On Thu, May 23, 2013 at 5:17 PM, Richard Heck  wrote:

\begin_layout Chunk
<>=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
@
\end_layout

Is it correct, then, to remove the first and last chunks, and leave only
the
middle bit?


I do not have a good understanding of the LyX file format. Maybe JMarc
knows better?

Liviu









Re: [LyX master] Pass local font to arguments and assure pass_thru is inherited

2013-05-23 Thread Scott Kostyshak
On Thu, May 23, 2013 at 4:03 PM, Scott Kostyshak  wrote:
> On Mon, May 20, 2013 at 6:33 AM, Jürgen Spitzmüller  wrote:
>> Scott Kostyshak wrote:
>>> Git bisect suggests that this broke the Hebrew Intro.lyx compilation.
>>> Attached is the diff of the exported LaTeX (pdflatex) files.
>>>
>>> Any ideas?
>>
>> The actual problem is fixed, I reverted wrong parts of said commit. But I'm
>> not sure argument insets will still have the correct font and encoding now.
>> This is rather nasty stuff.
>
> At commit a78bed06, export works fine, but starting with the next
> commit (a8a2bd46), export is broken again. I think this is because if
> you export to pdflatex the file has encoding latin1 whereas before it
> had encoding utf-8.

Sorry, this response was supposed to be to the Chinese Tutorial email
thread. I will copy it there.

The Hebrew Intro now exports fine for me. Thanks.

Scott


Re: regression: Chinese tutorial no longer exports (missing babel and language option)

2013-05-23 Thread Scott Kostyshak
On Mon, May 20, 2013 at 5:08 AM, Jürgen Spitzmüller  wrote:
> Scott Kostyshak wrote:
>> The commit that git bisect lead me to and the diff between the
>> pdflatex .tex files of before and after the following commit (which is
>> the same as the diff between the output from before and current trunk)
>> is pasted below. After adding the English class option and adding
>> babel to the preamble, the export works fine. Is this what should be
>> done to the document or is it an internal issue?

At commit a78bed06, export of the Chinese Tutorial works fine, but
starting with the next
commit (a8a2bd46), export is broken again. I think this is because if
you export to pdflatex the file has encoding latin1 whereas before it
had encoding utf-8.

Scott


Re: Mac-style paragraph movement

2013-05-23 Thread Jean-Marc Lasgouttes

Le 23/05/13 20:24, BH a écrit :

1/ you should handle paragraph-up too.

Not sure what you have in mind here: paragraph-up on Mac works just like
on other platforms (doesn't it?), so I intentionally didn't touch that
part of the code.


I stand corrected.


Of course, this does not really work for the other instance, but I
suspect that the code can be simplified by computing the new cursor
first, and calling setCursor later.


(What "other instance"? You mean paragraph-up?)


No, the getPar(cur.pit() + 1).size().

What happens when we are already at the last paragraph, BTW?

JMarc


Re: Mac-style paragraph movement

2013-05-23 Thread Stephan Witt
Am 23.05.2013 um 23:00 schrieb Jean-Marc Lasgouttes :

> Le 23/05/13 20:24, BH a écrit :
>>1/ you should handle paragraph-up too.
>> 
>> Not sure what you have in mind here: paragraph-up on Mac works just like
>> on other platforms (doesn't it?), so I intentionally didn't touch that
>> part of the code.
> 
> I stand corrected.
> 
>>Of course, this does not really work for the other instance, but I
>>suspect that the code can be simplified by computing the new cursor
>>first, and calling setCursor later.
>> 
>> 
>> (What "other instance"? You mean paragraph-up?)
> 
> No, the getPar(cur.pit() + 1).size().
> 
> What happens when we are already at the last paragraph, BTW?


It jumps to the end of this paragraph here.

I've tried the mac-cursor4.diff patch. I tested it with the Users Guide and the 
Beamer Doc.
I'm fine with it.

Stephan