Re: spellcheck

2009-06-24 Thread Abdelrazak Younes

Steve Litt wrote:

On Tuesday 23 June 2009 05:21:28 am Abdelrazak Younes wrote:
  

Edwin Leuven wrote:


hi abdel,

since you're digging around in the spellcheck code:

if it's easy to add replace all to the spellcheck dialog you would make
at least 1 person very happy ;-)
  

Yes, I already thought about the very same feature ;-)
I'll try to if I manage to find enough time (I am currently abusing my
work time).

Abdel.



You know what would be reaally cool? In conjunction with the replace all 
button have an ask? checkbox so each replacement would:


1) highlight the instance of this particular misspelling
2) Ask whether to change it
3) Either change it and proceed to the next, or do nothing and proceed

Here's an example where it might be helpful:

Silly me, I spelled LyX lyx in my book about open source. I didn't know it 
til in the middle of spellcheck. But I can't change all lyx to LyX, 
because in a few spots I reference myfile.lyx, which should be all small 
letters. With an ask? checkbox, this is no problem.
  


I'll think about it, thanks for the suggestion. But If I'll do it, I'd 
rather have a Find Next button instead.


Abdel.



Re: r30244 - lyx-devel/trunk/src

2009-06-24 Thread Abdelrazak Younes

lasgout...@lyx.org wrote:

Author: lasgouttes
Date: Tue Jun 23 16:47:29 2009
New Revision: 30244
URL: http://www.lyx.org/trac/changeset/30244

Log:
fix assertion when inserting math inset


Thanks.


Modified:
   lyx-devel/trunk/src/Text3.cpp

Modified: lyx-devel/trunk/src/Text3.cpp
==
--- lyx-devel/trunk/src/Text3.cpp   Tue Jun 23 15:29:41 2009(r30243)
+++ lyx-devel/trunk/src/Text3.cpp   Tue Jun 23 16:47:29 2009(r30244)
@@ -2030,10 +2030,9 @@
break;
}
 
-	if (lyxrc.spellcheck_continuously) {

-   // Profit from this occasion to spellcheck current word.
+   if (lyxrc.spellcheck_continuously  cur.inTexted())
+   // Take this opportunity to spellcheck current word.


I was thinking in French, sorry :-)

Abdel.


Re: r30244 - lyx-devel/trunk/src

2009-06-24 Thread Jean-Marc Lasgouttes
Abdelrazak Younes you...@lyx.org writes:
  -   if (lyxrc.spellcheck_continuously) {
 -// Profit from this occasion to spellcheck current word.
 +if (lyxrc.spellcheck_continuously  cur.inTexted())
 +// Take this opportunity to spellcheck current word.

 I was thinking in French, sorry :-)

I had to ask google translate for a good idea...

JMarc


More about tex2lyx and roundtrip

2009-06-24 Thread Jean-Marc Lasgouttes

It seems that I cannot refrain from thinking about tex2lyx...

Uwe, please test roundtrip with the following file

1/ the contents of the document is lost. This is probably an easy-to-fix
bug.

2/ how are you going to handle the weird preamble entries generated by
layout files and modules. Hardcode them all in tex2lyx?

I think this is not going to fly.

JMarc



roundtrip.lyx
Description: Binary data


Re: paste issues in 1.6.3

2009-06-24 Thread Liviu Andronic
On 6/23/09, Jean-Marc Lasgouttes lasgout...@lyx.org wrote:
 Could you describe what you do in terms of keystrokes? This looks like
  pasting as plain-text, not LyX data.

In all of the test cases I am using the simple ctrl+c/ctrl+v.

I already downgraded to 1.6.2, where the issue is slightly different.
Copy/paste works fine if the item pasted was the last one copied. That
is, copy/paste `asdf \asdf{} asdf' (the latex code is in ERT) will
work OK; however, if after the previous copy I do another copy of a
random string---say, a---, then in the clipboard manager I select
the previous copy, then in LyX the paste will fail to happen as I
would expect it to (in the way described in my previous e-mail).

Also, checking the clipboard manager I notice that the LyX strings are
copied without the tex tags. That is, in the clipboard manager only
`asdf  asdf' will have been copied. My hunch is that LyX stopped
correctly copying the strings;  if I remember well, previously, say
when copying formulae, the entire tex string could be seen in the
clipboard.

Perhaps Guenter can also comment on this.
Liviu



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


Re: Add math autocorrect to RC file

2009-06-24 Thread Pavel Sanda
Martin Vermeer wrote:
 Perhaps... but doesn't look like I'll be contributing any time soon
 now. Real Life is rampant :-(
 
  So I cannot check how it works.
  
  i had the impression you wrote the code... am i wrong?
 
 Yes I did... and it worked back then...

ok, i'll add link to this thread into newinlyx20 wiki for reference, until docs
get fixed one day ;)

pavel


Re: paste issues in 1.6.3

2009-06-24 Thread Pavel Sanda
Liviu Andronic wrote:
 Dear LyX devels,
 In 1.6.3 I encounter paste problems that I did not notice in previous
 versions. Pasting from LyX to LyX (in the same document) will not
 preserve the (LyX) formatting. For example:
 - copying string Hello from section one on a newline standard env
 will yield 1 Hello with no section env. Previously the pasted
 Hello was becoming 2nd section.

this works for me in 1.6.3.
pavel


Translating the labels

2009-06-24 Thread Michal Skrzypek
Dear LyX developers,

I have some question: I will soon need to write a paper in Polish,
but currently there is no way of having Theorem, Proposition and
alike in Polish language other than translating layouts manually (or
have I missed something?). What is the best approach to this task, i.e.
how to do it universally, so that such a translation could later be
integrated into LyX and into the future versions of layouts itself?

Some framework for doing so would be quite useful in my opinion,
because as of now, it seems to me that all the names are hardcoded into
layout files, which makes the work of maintaining them for different
languages needlessly complicated.

Am I right in these observations? If so, are there any plans to
solve this? It seems important, because as of now setting the language
in the document has no effect for the generated documents, on the other
hand, setting the language for the LyX interface seems to translate some
names (still not all of them: Axiom for example is not trasnlated
into Polish), but only in the LyX GUI - this is not happening in sync
with the target document (why?), so everything has to be translated
twice for the full effect.

Not to mention, that switching language for LyX GUI has problems of
its own. Changing the LANG variable gives a lot of warning messages
about conflicting or non-existing keyboard shortcuts.

It is all VERY confusing, especially for non-English newcomers, as
there the language is non-English by default; luckily for me, I started
writing in English and set default GUI language to English, and only now
I need to switch the language; otherwise I would be too confused to use
LyX at all.

I'm eagerly awaiting an answer before I start translating everything
manually - I still hope that I've missed something obvious.

Thanks in advance,
Michał Skrzypek


Re: More about tex2lyx and roundtrip

2009-06-24 Thread rgheck

Jean-Marc Lasgouttes wrote:

2/ how are you going to handle the weird preamble entries generated by
layout files and modules. Hardcode them all in tex2lyx?

  
I've been thinking about this too, for the obvious reason. Here's a 
suggestion.


Everything generated by a layout file or module should be wrapped in a 
comment of some appropriate sort, perhaps something like:


%% begin article.layout
...latex code here...
%% end article.layout

for what's added at the layout level and then something like

%% begin theorems-ams.module
...latex code here...
%% end theorems-ams.module

for things added by a module. Generating these would involve reworking 
the preamble generation code a bit, so we know where things come from, 
but it shouldn't be terribly hard. The idea, obviously, would be that 
tex2lyx would not add what was between such comments to the user 
preamble, much as it does now with some other comments.


A nice side-effect of this is that we would then be able to tell what 
modules had been used when we went to re-import the file, since an empty 
such block could be written if the module didn't add anything of its own.


Richard



Re: More about tex2lyx and roundtrip

2009-06-24 Thread Jean-Marc Lasgouttes
rgheck rgh...@bobjweil.com writes:
 Everything generated by a layout file or module should be wrapped in a
 comment of some appropriate sort, perhaps something like:

 %% begin article.layout
 ...latex code here...
 %% end article.layout

Well, the code did not have this granularity, but this is how it used to
work. Uwe decided to switch to code that looks at the macro names. There
is a thread about this problem.

JMarc


Re: Translating the labels

2009-06-24 Thread rgheck

Michal Skrzypek wrote:

Dear LyX developers,

I have some question: I will soon need to write a paper in Polish,
but currently there is no way of having Theorem, Proposition and
alike in Polish language other than translating layouts manually (or
have I missed something?). What is the best approach to this task, i.e.
how to do it universally, so that such a translation could later be
integrated into LyX and into the future versions of layouts itself?

Some framework for doing so would be quite useful in my opinion,
because as of now, it seems to me that all the names are hardcoded into
layout files, which makes the work of maintaining them for different
languages needlessly complicated.

Am I right in these observations? If so, are there any plans to
solve this? It seems important, because as of now setting the language
in the document has no effect for the generated documents, on the other
hand, setting the language for the LyX interface seems to translate some
names (still not all of them: Axiom for example is not trasnlated
into Polish), but only in the LyX GUI - this is not happening in sync
with the target document (why?), so everything has to be translated
twice for the full effect.

There are two separable issues here. One is how things appear in LyX 
itself. The other is how the LaTeX output appears. So the answer to your 
last question is just that these are different.


As for LyX, the strings used in layout files are all translatable, but 
whether they have actually been translated is another matter. Our 
translators work hard, but it's not always easy to keep up, and we don't 
always have active translators for every language for which we have 
partial GUI translations. It appears from a quick look at the pl.po file 
that, as you mention, the label string for the axiom environment hasn't 
yet been translated. If you'd like to translate it, and anything else, 
we'd be happy to have it. Just check out the pl.po file, where you'll 
also find names and email addresses for the earlier contributors. The 
file can be edited with a simple text editor or with a GUI such as 
kbabel (for Linux) or poedit (http://www.poedit.net/), which is 
allegedly cross-platform. I'm sure there are lots more, too.


How things appear in LaTeX is an entirely different matter. The LaTeX 
babel package is supposed to handle this sort of thing, but it doesn't 
handle every environment one might introduce. The good news is that, 
thanks to work by Georg Baum, this sort of thing will be handled 
automatically in LyX 2.0. The bad news is that Georg's fixes cannot be 
backported to 1.6.x, because they change the format of the layout files. 
So for 1.6.x, you have to do things manually (as you would in straight 
LaTeX, too). See http://wiki.lyx.org/LyX/I18nLabels for information on 
what needs doing, including detailed information on translating the AMS 
environments. The best thing to do would be to produce a set of modules

   theorems-ams-pl.module
   theorems-ams-extended-pl.module
that would encapsulate the relevant translations and then can be used 
whenever you need to write in Polish.



Not to mention, that switching language for LyX GUI has problems of
its own. Changing the LANG variable gives a lot of warning messages
about conflicting or non-existing keyboard shortcuts.

These are probably due to conflicts in the translation files, which 
again we'd love for you to fix.


Richard



Re: More about tex2lyx and roundtrip

2009-06-24 Thread rgheck

Jean-Marc Lasgouttes wrote:

rgheck rgh...@bobjweil.com writes:
  

Everything generated by a layout file or module should be wrapped in a
comment of some appropriate sort, perhaps something like:

%% begin article.layout
...latex code here...
%% end article.layout



Well, the code did not have this granularity, but this is how it used to
work. Uwe decided to switch to code that looks at the macro names. There
is a thread about this problem.

  
Yes, I have been following it, distantly, and am in effect endorsing the 
old solution, plus some additional granularity. Your worries about the 
new attempt seem to me reasonable ones.


rh



Wiki question

2009-06-24 Thread Paul A. Rubin

Hi all,

Anybody know an easy way to rename a page on the wiki?  (Easy = does 
not require creating a new page and copying all content of the existing 
one.)


Separate (but related in my case) question: We have a layouts page 
group.  When we upload modules for sharing, should we put the associated 
pages in the Layout group, or create a separate Module group?


TIA,
Paul



Re: Wiki question

2009-06-24 Thread Jürgen Spitzmüller
Paul A. Rubin wrote:
 Separate (but related in my case) question: We have a layouts page
 group.  When we upload modules for sharing, should we put the associated
 pages in the Layout group, or create a separate Module group?

I would rather create a Modules group.

Jürgen


Re: I LOVE YOU

2009-06-24 Thread Liviu Andronic
Would this qualify for the praise article [1]? Please advise.
Liviu

http://wiki.lyx.org/LyX/Praise#toc2



On Wed, Jun 24, 2009 at 6:47 PM, Jean Dahlquistjdahl...@swarthmore.edu wrote:
 Really. I do.

 --Jean





-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


Re: [Pkg-lyx-devel] Seaching for elyxer.py and elyxer in configure.py?

2009-06-24 Thread Sven Hoexter
On Thu, Jun 04, 2009 at 11:11:07AM +0200, Jürgen Spitzmüller wrote:

Hi,

  Attached is a patch to get the desired behaviour. Works here[tm]. ;)
 
 No objections from me (once 1.6.4svn is open again).

Ok now that 1.6.3 is released here's a fresh version
of the changes. Would be nice if someone could commit it.

Cheers,
Sven
-- 
forevermore
Index: configure.py
===
--- configure.py	(revision 30250)
+++ configure.py	(working copy)
@@ -389,9 +389,9 @@
 checkProg('an MS Word - LaTeX converter', ['wvCleanLatex $$i $$o'],
 rc_entry = [ r'\converter word   latex  %%	' ])
 #
-path, elyxer = checkProg('a LyX - HTML converter', ['elyxer.py --directory $$r $$i $$o'],
+path, elyxer = checkProg('a LyX - HTML converter', ['elyxer.py --directory $$r $$i $$o','elyxer --directory $$r $$i $$o'],
   rc_entry = [ r'\converter lyx  html   %%	' ])
-if elyxer.find('elyxer.py') = 0:
+if elyxer.find('elyxer') = 0:
   addToRC(r'''\copierhtml   python -tt $$s/scripts/ext_copy.py -e html,png,jpg,jpeg,css $$i $$o''')
 else:
   # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/


Re: [Pkg-lyx-devel] Seaching for elyxer.py and elyxer in configure.py?

2009-06-24 Thread Pavel Sanda
Sven Hoexter wrote:
 On Thu, Jun 04, 2009 at 11:11:07AM +0200, Jürgen Spitzmüller wrote:
 
 Hi,
 
   Attached is a patch to get the desired behaviour. Works here[tm]. ;)
  
  No objections from me (once 1.6.4svn is open again).
 
 Ok now that 1.6.3 is released here's a fresh version
 of the changes. Would be nice if someone could commit it.

its in
pavel


Re: Wiki question

2009-06-24 Thread Pavel Sanda
Jürgen Spitzmüller wrote:
 Paul A. Rubin wrote:
  Separate (but related in my case) question: We have a layouts page
  group.  When we upload modules for sharing, should we put the associated
  pages in the Layout group, or create a separate Module group?
 
 I would rather create a Modules group.

i would vote for one big wiki page for all modules.
pavel


Re: [Pkg-lyx-devel] Seaching for elyxer.py and elyxer in configure.py?

2009-06-24 Thread Sven Hoexter
On Wed, Jun 24, 2009 at 09:11:38PM +0200, Pavel Sanda wrote:
 Sven Hoexter wrote:

  Ok now that 1.6.3 is released here's a fresh version
  of the changes. Would be nice if someone could commit it.
 
 its in
 pavel


Thanks.

Sven
-- 
forevermore


Re: paste issues in 1.6.3

2009-06-24 Thread Guenter Milde
On 2009-06-24, Liviu Andronic wrote:
 On 6/23/09, Jean-Marc Lasgouttes lasgout...@lyx.org wrote:
 Could you describe what you do in terms of keystrokes? This looks like
  pasting as plain-text, not LyX data.

 In all of the test cases I am using the simple ctrl+c/ctrl+v.

This happens with both, ^C/^V as well as mouse-based (select and
middle-click) copy/paste (i.e. both CLIPBOARD and PRIMARY selection).

However, it happens only with the XFCE4 clipboard running
(xfce-clipman 1.0.1).

As I recently (around the time of the LyX 1.6.3 upgrade) also upgraded
XFCE, it might well be that instead of LyX, the new version of the
xfce-clipman is to blame. Maybe also a incompatibility that became
visible only with the last change to either LyX or xfce-clipman.

Günter



trunk crash

2009-06-24 Thread Pavel Sanda

trunk is now crashing when trying to load lfuns manual with
LyX: Unknown TextClass tag `AddToHTMLPreamble' [around line 9 of file 
[layouts/stdfloats.inc] current token: 'AddToHTMLPreamble' context: '']
LyX: Error reading inputfile: /mnt/teral/lyx/devel/lib/layouts/stdfloats.inc 
[around line 43 of file [layouts/stdclass.inc] current token: 'stdfloats.inc' 
context: '']
LyX: Error reading inputfile: /mnt/teral/lyx/devel/lib/layouts/stdclass.inc 
[around line 9 of file /trash/lyx_tmpdir.T31470/convert_layout.M31470 current 
token: 'stdclass.inc' context: '']
TextClass.cpp(283): Unable to convert 
/mnt/teral/lyx/devel/lib/layouts/article.layout to format 16
Error reading `[layouts/article.layout]'
(Check `article')
Check your installation and try Options/Reconfigure...
Error: Could not load class

The document class article could not be loaded.

lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting instructions 
in Help-Introduction and send us a bug report, if necessary. Thanks !

Richard?


Re: trunk crash

2009-06-24 Thread rgheck

Pavel Sanda wrote:

trunk is now crashing when trying to load lfuns manual with
LyX: Unknown TextClass tag `AddToHTMLPreamble' [around line 9 of file 
[layouts/stdfloats.inc] current token: 'AddToHTMLPreamble' context: '']
LyX: Error reading inputfile: /mnt/teral/lyx/devel/lib/layouts/stdfloats.inc 
[around line 43 of file [layouts/stdclass.inc] current token: 'stdfloats.inc' 
context: '']
LyX: Error reading inputfile: /mnt/teral/lyx/devel/lib/layouts/stdclass.inc 
[around line 9 of file /trash/lyx_tmpdir.T31470/convert_layout.M31470 current 
token: 'stdclass.inc' context: '']
TextClass.cpp(283): Unable to convert 
/mnt/teral/lyx/devel/lib/layouts/article.layout to format 16
Error reading `[layouts/article.layout]'
(Check `article')
Check your installation and try Options/Reconfigure...
Error: Could not load class

The document class article could not be loaded.

lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting instructions in 
Help-Introduction and send us a bug report, if necessary. Thanks !

Richard?
  


Yes, my fault. I'll fix it.

rh



Re: trunk crash

2009-06-24 Thread rgheck

Pavel Sanda wrote:

trunk is now crashing when trying to load lfuns manual with
LyX: Unknown TextClass tag `AddToHTMLPreamble' [around line 9 of file 
[layouts/stdfloats.inc] current token: 'AddToHTMLPreamble' context: '']

  
Are you sure you svn-up'd everything? Check your TextClass.cpp and see 
if the tag is defined there.


rh



Re: trunk crash

2009-06-24 Thread Pavel Sanda
Richard Heck wrote:
 Pavel Sanda wrote:
 trunk is now crashing when trying to load lfuns manual with
 LyX: Unknown TextClass tag `AddToHTMLPreamble' [around line 9 of file 
 [layouts/stdfloats.inc] current token: 'AddToHTMLPreamble' context: '']

   
 Are you sure you svn-up'd everything? Check your TextClass.cpp and see if 
 the tag is defined there.

ahh, the problem is not not svn up but the impatience to wait on make 
finished...
sorry for the noise
pavel


Re: Wiki question

2009-06-24 Thread Christian Ridderström

On Wed, 24 Jun 2009, Pavel Sanda wrote:


Jürgen Spitzmüller wrote:

Paul A. Rubin wrote:

Separate (but related in my case) question: We have a layouts page
group.  When we upload modules for sharing, should we put the associated
pages in the Layout group, or create a separate Module group?


I would rather create a Modules group.


i would vote for one big wiki page for all modules.


It's probably a good idea to start with a single page, perhaps even in 
the main group, LyX/.


http://wiki.lyx.org/LyX/Modules?action=edit

If you then find this paging getting to big and difficult to maintain, 
then split into several separate pages, optionally into a separate group 
or into the group Layouts/.


Note that it's relatively easy to create a single page that includes a lot 
of pages, so the old page LyX/Modules could continue to display all the 
module pages.


/Christian


--
Christian Ridderström   Mobile: +46-8 768 39 44

Re: Wiki question

2009-06-24 Thread Christian Ridderström

On Wed, 24 Jun 2009, Jürgen Spitzmüller wrote:


Paul A. Rubin wrote:

Separate (but related in my case) question: We have a layouts page
group.  When we upload modules for sharing, should we put the associated
pages in the Layout group, or create a separate Module group?


I would rather create a Modules group.


If you do go for a separate group, let me know so I can help set it up for 
you. There are some tricks which'll make it a little easier in terms of 
integrating with the rest of th ewiki.


The one advantage with a group that I see at the moment is that I think 
the actual uploaded modules should probably be stored in a hierarchy such 
as


  http://wiki.lyx.org/uploads/Modules/ModuleName/opt.version/files..

where ModuleName could/should correspond to a page with that name.

best regards
/Christian

PS. The more modern option, compared to a group, is to tag all pages 
related to modules with something specific. Then it's easy to e.g. list 
all pages with such a tag.


--
Christian Ridderström   Mobile: +46-8 768 39 44

Re: Wiki question

2009-06-24 Thread Christian Ridderström

On Wed, 24 Jun 2009, Paul A. Rubin wrote:

Anybody know an easy way to rename a page on the wiki?  (Easy = does 
not require creating a new page and copying all content of the existing 
one.)


As an administrator, me or Jean-Marc can simply rename the file 
corresponding to a page... but then you lose the history of the change.


Do you want to rename many pages?  (It is possible to install a plugin 
that makes it easier to rename pages).


What's your need?

/Christian



Separate (but related in my case) question: We have a layouts page group. 
When we upload modules for sharing, should we put the associated pages in the 
Layout group, or create a separate Module group?


TIA,
Paul






--
Christian Ridderström   Mobile: +46-8 768 39 44

Re: I LOVE YOU

2009-06-24 Thread Christian Ridderström

On Wed, 24 Jun 2009, Liviu Andronic wrote:


Would this qualify for the praise article [1]? Please advise.
Liviu

http://wiki.lyx.org/LyX/Praise#toc2


I guess... but maybe under a heading of 'Praise or spam'... :-)

/Christian





On Wed, Jun 24, 2009 at 6:47 PM, Jean Dahlquistjdahl...@swarthmore.edu wrote:

Really. I do.

--Jean









--
Christian Ridderström   Mobile: +46-8 768 39 44

Re: I LOVE YOU

2009-06-24 Thread Liviu Andronic
On Thu, Jun 25, 2009 at 12:31 AM, Christian
Ridderströmchristian.ridderst...@gmail.com wrote:
 I guess... but maybe under a heading of 'Praise or spam'... :-)

Oh, well, done [1]. :)
Liviu

[1] http://wiki.lyx.org/LyX/Praise#toc23


Re: spellcheck

2009-06-24 Thread Abdelrazak Younes

Steve Litt wrote:

On Tuesday 23 June 2009 05:21:28 am Abdelrazak Younes wrote:
  

Edwin Leuven wrote:


hi abdel,

since you're digging around in the spellcheck code:

if it's easy to add "replace all" to the spellcheck dialog you would make
at least 1 person very happy ;-)
  

Yes, I already thought about the very same feature ;-)
I'll try to if I manage to find enough time (I am currently abusing my
work time).

Abdel.



You know what would be reaally cool? In conjunction with the "replace all" 
button have an "ask?" checkbox so each replacement would:


1) highlight the instance of this particular misspelling
2) Ask whether to change it
3) Either change it and proceed to the next, or do nothing and proceed

Here's an example where it might be helpful:

Silly me, I spelled "LyX" "lyx" in my book about open source. I didn't know it 
til in the middle of spellcheck. But I can't change all "lyx" to "LyX", 
because in a few spots I reference "myfile.lyx", which should be all small 
letters. With an "ask?" checkbox, this is no problem.
  


I'll think about it, thanks for the suggestion. But If I'll do it, I'd 
rather have a "Find Next" button instead.


Abdel.



Re: r30244 - lyx-devel/trunk/src

2009-06-24 Thread Abdelrazak Younes

lasgout...@lyx.org wrote:

Author: lasgouttes
Date: Tue Jun 23 16:47:29 2009
New Revision: 30244
URL: http://www.lyx.org/trac/changeset/30244

Log:
fix assertion when inserting math inset


Thanks.


Modified:
   lyx-devel/trunk/src/Text3.cpp

Modified: lyx-devel/trunk/src/Text3.cpp
==
--- lyx-devel/trunk/src/Text3.cpp   Tue Jun 23 15:29:41 2009(r30243)
+++ lyx-devel/trunk/src/Text3.cpp   Tue Jun 23 16:47:29 2009(r30244)
@@ -2030,10 +2030,9 @@
break;
}
 
-	if (lyxrc.spellcheck_continuously) {

-   // Profit from this occasion to spellcheck current word.
+   if (lyxrc.spellcheck_continuously && cur.inTexted())
+   // Take this opportunity to spellcheck current word.


I was thinking in French, sorry :-)

Abdel.


Re: r30244 - lyx-devel/trunk/src

2009-06-24 Thread Jean-Marc Lasgouttes
Abdelrazak Younes  writes:
>>  -   if (lyxrc.spellcheck_continuously) {
>> -// Profit from this occasion to spellcheck current word.
>> +if (lyxrc.spellcheck_continuously && cur.inTexted())
>> +// Take this opportunity to spellcheck current word.
>
> I was thinking in French, sorry :-)

I had to ask google translate for a good idea...

JMarc


More about tex2lyx and roundtrip

2009-06-24 Thread Jean-Marc Lasgouttes

It seems that I cannot refrain from thinking about tex2lyx...

Uwe, please test roundtrip with the following file

1/ the contents of the document is lost. This is probably an easy-to-fix
bug.

2/ how are you going to handle the weird preamble entries generated by
layout files and modules. Hardcode them all in tex2lyx?

I think this is not going to fly.

JMarc



roundtrip.lyx
Description: Binary data


Re: paste issues in 1.6.3

2009-06-24 Thread Liviu Andronic
On 6/23/09, Jean-Marc Lasgouttes  wrote:
> Could you describe what you do in terms of keystrokes? This looks like
>  pasting as plain-text, not LyX data.
>
In all of the test cases I am using the simple +c/+v.

I already downgraded to 1.6.2, where the issue is slightly different.
Copy/paste works fine if the item pasted was the last one copied. That
is, copy/paste `asdf \asdf{} asdf' (the latex code is in ERT) will
work OK; however, if after the previous copy I do another copy of a
random string---say, "a"---, then in the clipboard manager I select
the previous copy, then in LyX the paste will fail to happen as I
would expect it to (in the way described in my previous e-mail).

Also, checking the clipboard manager I notice that the LyX strings are
copied without the tex tags. That is, in the clipboard manager only
`asdf  asdf' will have been copied. My hunch is that LyX stopped
"correctly" copying the strings;  if I remember well, previously, say
when copying formulae, the entire tex string could be seen in the
clipboard.

Perhaps Guenter can also comment on this.
Liviu



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


Re: Add math autocorrect to RC file

2009-06-24 Thread Pavel Sanda
Martin Vermeer wrote:
> Perhaps... but doesn't look like I'll be contributing any time soon
> now. Real Life is rampant :-(
> 
> > >So I cannot check how it works.
> > 
> > i had the impression you wrote the code... am i wrong?
> 
> Yes I did... and it worked back then...

ok, i'll add link to this thread into newinlyx20 wiki for reference, until docs
get fixed one day ;)

pavel


Re: paste issues in 1.6.3

2009-06-24 Thread Pavel Sanda
Liviu Andronic wrote:
> Dear LyX devels,
> In 1.6.3 I encounter paste problems that I did not notice in previous
> versions. Pasting from LyX to LyX (in the same document) will not
> preserve the (LyX) formatting. For example:
> - copying string "Hello" from section one on a newline standard env
> will yield "1 Hello" with no section env. Previously the pasted
> "Hello" was becoming 2nd section.

this works for me in 1.6.3.
pavel


Translating the labels

2009-06-24 Thread Michal Skrzypek
Dear LyX developers,

I have some question: I will soon need to write a paper in Polish,
but currently there is no way of having "Theorem", "Proposition" and
alike in Polish language other than translating layouts manually (or
have I missed something?). What is the best approach to this task, i.e.
how to do it universally, so that such a translation could later be
integrated into LyX and into the future versions of layouts itself?

Some framework for doing so would be quite useful in my opinion,
because as of now, it seems to me that all the names are hardcoded into
layout files, which makes the work of maintaining them for different
languages needlessly complicated.

Am I right in these observations? If so, are there any plans to
solve this? It seems important, because as of now setting the language
in the document has no effect for the generated documents, on the other
hand, setting the language for the LyX interface seems to translate some
names (still not all of them: "Axiom" for example is not trasnlated
into Polish), but only in the LyX GUI - this is not happening in sync
with the target document (why?), so everything has to be translated
twice for the full effect.

Not to mention, that switching language for LyX GUI has problems of
its own. Changing the LANG variable gives a lot of warning messages
about conflicting or non-existing keyboard shortcuts.

It is all VERY confusing, especially for non-English newcomers, as
there the language is non-English by default; luckily for me, I started
writing in English and set default GUI language to English, and only now
I need to switch the language; otherwise I would be too confused to use
LyX at all.

I'm eagerly awaiting an answer before I start translating everything
manually - I still hope that I've missed something obvious.

Thanks in advance,
Michał Skrzypek


Re: More about tex2lyx and roundtrip

2009-06-24 Thread rgheck

Jean-Marc Lasgouttes wrote:

2/ how are you going to handle the weird preamble entries generated by
layout files and modules. Hardcode them all in tex2lyx?

  
I've been thinking about this too, for the obvious reason. Here's a 
suggestion.


Everything generated by a layout file or module should be wrapped in a 
comment of some appropriate sort, perhaps something like:


%% begin article.layout
...latex code here...
%% end article.layout

for what's added at the layout level and then something like

%% begin theorems-ams.module
...latex code here...
%% end theorems-ams.module

for things added by a module. Generating these would involve reworking 
the preamble generation code a bit, so we know where things come from, 
but it shouldn't be terribly hard. The idea, obviously, would be that 
tex2lyx would not add what was between such comments to the user 
preamble, much as it does now with some other comments.


A nice side-effect of this is that we would then be able to tell what 
modules had been used when we went to re-import the file, since an empty 
such block could be written if the module didn't add anything of its own.


Richard



Re: More about tex2lyx and roundtrip

2009-06-24 Thread Jean-Marc Lasgouttes
rgheck  writes:
> Everything generated by a layout file or module should be wrapped in a
> comment of some appropriate sort, perhaps something like:
>
> %% begin article.layout
> ...latex code here...
> %% end article.layout

Well, the code did not have this granularity, but this is how it used to
work. Uwe decided to switch to code that looks at the macro names. There
is a thread about this problem.

JMarc


Re: Translating the labels

2009-06-24 Thread rgheck

Michal Skrzypek wrote:

Dear LyX developers,

I have some question: I will soon need to write a paper in Polish,
but currently there is no way of having "Theorem", "Proposition" and
alike in Polish language other than translating layouts manually (or
have I missed something?). What is the best approach to this task, i.e.
how to do it universally, so that such a translation could later be
integrated into LyX and into the future versions of layouts itself?

Some framework for doing so would be quite useful in my opinion,
because as of now, it seems to me that all the names are hardcoded into
layout files, which makes the work of maintaining them for different
languages needlessly complicated.

Am I right in these observations? If so, are there any plans to
solve this? It seems important, because as of now setting the language
in the document has no effect for the generated documents, on the other
hand, setting the language for the LyX interface seems to translate some
names (still not all of them: "Axiom" for example is not trasnlated
into Polish), but only in the LyX GUI - this is not happening in sync
with the target document (why?), so everything has to be translated
twice for the full effect.

There are two separable issues here. One is how things appear in LyX 
itself. The other is how the LaTeX output appears. So the answer to your 
last question is just that these are different.


As for LyX, the strings used in layout files are all translatable, but 
whether they have actually been translated is another matter. Our 
translators work hard, but it's not always easy to keep up, and we don't 
always have active translators for every language for which we have 
partial GUI translations. It appears from a quick look at the pl.po file 
that, as you mention, the label string for the axiom environment hasn't 
yet been translated. If you'd like to translate it, and anything else, 
we'd be happy to have it. Just check out the pl.po file, where you'll 
also find names and email addresses for the earlier contributors. The 
file can be edited with a simple text editor or with a GUI such as 
kbabel (for Linux) or poedit (http://www.poedit.net/), which is 
allegedly cross-platform. I'm sure there are lots more, too.


How things appear in LaTeX is an entirely different matter. The LaTeX 
babel package is supposed to handle this sort of thing, but it doesn't 
handle every environment one might introduce. The good news is that, 
thanks to work by Georg Baum, this sort of thing will be handled 
automatically in LyX 2.0. The bad news is that Georg's fixes cannot be 
backported to 1.6.x, because they change the format of the layout files. 
So for 1.6.x, you have to do things manually (as you would in straight 
LaTeX, too). See http://wiki.lyx.org/LyX/I18nLabels for information on 
what needs doing, including detailed information on translating the AMS 
environments. The best thing to do would be to produce a set of modules

   theorems-ams-pl.module
   theorems-ams-extended-pl.module
that would encapsulate the relevant translations and then can be used 
whenever you need to write in Polish.



Not to mention, that switching language for LyX GUI has problems of
its own. Changing the LANG variable gives a lot of warning messages
about conflicting or non-existing keyboard shortcuts.

These are probably due to conflicts in the translation files, which 
again we'd love for you to fix.


Richard



Re: More about tex2lyx and roundtrip

2009-06-24 Thread rgheck

Jean-Marc Lasgouttes wrote:

rgheck  writes:
  

Everything generated by a layout file or module should be wrapped in a
comment of some appropriate sort, perhaps something like:

%% begin article.layout
...latex code here...
%% end article.layout



Well, the code did not have this granularity, but this is how it used to
work. Uwe decided to switch to code that looks at the macro names. There
is a thread about this problem.

  
Yes, I have been following it, distantly, and am in effect endorsing the 
old solution, plus some additional granularity. Your worries about the 
new attempt seem to me reasonable ones.


rh



Wiki question

2009-06-24 Thread Paul A. Rubin

Hi all,

Anybody know an easy way to rename a page on the wiki?  (Easy => does 
not require creating a new page and copying all content of the existing 
one.)


Separate (but related in my case) question: We have a layouts page 
group.  When we upload modules for sharing, should we put the associated 
pages in the Layout group, or create a separate Module group?


TIA,
Paul



Re: Wiki question

2009-06-24 Thread Jürgen Spitzmüller
Paul A. Rubin wrote:
> Separate (but related in my case) question: We have a layouts page
> group.  When we upload modules for sharing, should we put the associated
> pages in the Layout group, or create a separate Module group?

I would rather create a Modules group.

Jürgen


Re: I LOVE YOU

2009-06-24 Thread Liviu Andronic
Would this qualify for the "praise article" [1]? Please advise.
Liviu

http://wiki.lyx.org/LyX/Praise#toc2



On Wed, Jun 24, 2009 at 6:47 PM, Jean Dahlquist wrote:
> Really. I do.
>
> --Jean
>
>



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


Re: [Pkg-lyx-devel] Seaching for elyxer.py and elyxer in configure.py?

2009-06-24 Thread Sven Hoexter
On Thu, Jun 04, 2009 at 11:11:07AM +0200, Jürgen Spitzmüller wrote:

Hi,

> > Attached is a patch to get the desired behaviour. Works here[tm]. ;)
> 
> No objections from me (once 1.6.4svn is open again).

Ok now that 1.6.3 is released here's a fresh version
of the changes. Would be nice if someone could commit it.

Cheers,
Sven
-- 
forevermore
Index: configure.py
===
--- configure.py	(revision 30250)
+++ configure.py	(working copy)
@@ -389,9 +389,9 @@
 checkProg('an MS Word -> LaTeX converter', ['wvCleanLatex $$i $$o'],
 rc_entry = [ r'\converter word   latex  "%%"	""' ])
 #
-path, elyxer = checkProg('a LyX -> HTML converter', ['elyxer.py --directory $$r $$i $$o'],
+path, elyxer = checkProg('a LyX -> HTML converter', ['elyxer.py --directory $$r $$i $$o','elyxer --directory $$r $$i $$o'],
   rc_entry = [ r'\converter lyx  html   "%%"	""' ])
-if elyxer.find('elyxer.py') >= 0:
+if elyxer.find('elyxer') >= 0:
   addToRC(r'''\copierhtml   "python -tt $$s/scripts/ext_copy.py -e html,png,jpg,jpeg,css $$i $$o"''')
 else:
   # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/


Re: [Pkg-lyx-devel] Seaching for elyxer.py and elyxer in configure.py?

2009-06-24 Thread Pavel Sanda
Sven Hoexter wrote:
> On Thu, Jun 04, 2009 at 11:11:07AM +0200, Jürgen Spitzmüller wrote:
> 
> Hi,
> 
> > > Attached is a patch to get the desired behaviour. Works here[tm]. ;)
> > 
> > No objections from me (once 1.6.4svn is open again).
> 
> Ok now that 1.6.3 is released here's a fresh version
> of the changes. Would be nice if someone could commit it.

its in
pavel


Re: Wiki question

2009-06-24 Thread Pavel Sanda
Jürgen Spitzmüller wrote:
> Paul A. Rubin wrote:
> > Separate (but related in my case) question: We have a layouts page
> > group.  When we upload modules for sharing, should we put the associated
> > pages in the Layout group, or create a separate Module group?
> 
> I would rather create a Modules group.

i would vote for one big wiki page for all modules.
pavel


Re: [Pkg-lyx-devel] Seaching for elyxer.py and elyxer in configure.py?

2009-06-24 Thread Sven Hoexter
On Wed, Jun 24, 2009 at 09:11:38PM +0200, Pavel Sanda wrote:
> Sven Hoexter wrote:

> > Ok now that 1.6.3 is released here's a fresh version
> > of the changes. Would be nice if someone could commit it.
> 
> its in
> pavel


Thanks.

Sven
-- 
forevermore


Re: paste issues in 1.6.3

2009-06-24 Thread Guenter Milde
On 2009-06-24, Liviu Andronic wrote:
> On 6/23/09, Jean-Marc Lasgouttes  wrote:
>> Could you describe what you do in terms of keystrokes? This looks like
>>  pasting as plain-text, not LyX data.

> In all of the test cases I am using the simple +c/+v.

This happens with both, ^C/^V as well as mouse-based (select and
middle-click) copy/paste (i.e. both CLIPBOARD and PRIMARY selection).

However, it happens only with the XFCE4 clipboard running
(xfce-clipman 1.0.1).

As I recently (around the time of the LyX 1.6.3 upgrade) also upgraded
XFCE, it might well be that instead of LyX, the new version of the
xfce-clipman is to blame. Maybe also a incompatibility that became
visible only with the last change to either LyX or xfce-clipman.

Günter



trunk crash

2009-06-24 Thread Pavel Sanda

trunk is now crashing when trying to load lfuns manual with
LyX: Unknown TextClass tag `AddToHTMLPreamble' [around line 9 of file 
[layouts/stdfloats.inc] current token: 'AddToHTMLPreamble' context: '']
LyX: Error reading inputfile: /mnt/teral/lyx/devel/lib/layouts/stdfloats.inc 
[around line 43 of file [layouts/stdclass.inc] current token: 'stdfloats.inc' 
context: '']
LyX: Error reading inputfile: /mnt/teral/lyx/devel/lib/layouts/stdclass.inc 
[around line 9 of file /trash/lyx_tmpdir.T31470/convert_layout.M31470 current 
token: 'stdclass.inc' context: '']
TextClass.cpp(283): Unable to convert 
/mnt/teral/lyx/devel/lib/layouts/article.layout to format 16
Error reading `[layouts/article.layout]'
(Check `article')
Check your installation and try Options/Reconfigure...
Error: Could not load class

The document class article could not be loaded.

lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting instructions 
in Help->Introduction and send us a bug report, if necessary. Thanks !

Richard?


Re: trunk crash

2009-06-24 Thread rgheck

Pavel Sanda wrote:

trunk is now crashing when trying to load lfuns manual with
LyX: Unknown TextClass tag `AddToHTMLPreamble' [around line 9 of file 
[layouts/stdfloats.inc] current token: 'AddToHTMLPreamble' context: '']
LyX: Error reading inputfile: /mnt/teral/lyx/devel/lib/layouts/stdfloats.inc 
[around line 43 of file [layouts/stdclass.inc] current token: 'stdfloats.inc' 
context: '']
LyX: Error reading inputfile: /mnt/teral/lyx/devel/lib/layouts/stdclass.inc 
[around line 9 of file /trash/lyx_tmpdir.T31470/convert_layout.M31470 current 
token: 'stdclass.inc' context: '']
TextClass.cpp(283): Unable to convert 
/mnt/teral/lyx/devel/lib/layouts/article.layout to format 16
Error reading `[layouts/article.layout]'
(Check `article')
Check your installation and try Options/Reconfigure...
Error: Could not load class

The document class article could not be loaded.

lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. Please read the bug-reporting instructions in 
Help->Introduction and send us a bug report, if necessary. Thanks !

Richard?
  


Yes, my fault. I'll fix it.

rh



Re: trunk crash

2009-06-24 Thread rgheck

Pavel Sanda wrote:

trunk is now crashing when trying to load lfuns manual with
LyX: Unknown TextClass tag `AddToHTMLPreamble' [around line 9 of file 
[layouts/stdfloats.inc] current token: 'AddToHTMLPreamble' context: '']

  
Are you sure you svn-up'd everything? Check your TextClass.cpp and see 
if the tag is defined there.


rh



Re: trunk crash

2009-06-24 Thread Pavel Sanda
Richard Heck wrote:
> Pavel Sanda wrote:
>> trunk is now crashing when trying to load lfuns manual with
>> LyX: Unknown TextClass tag `AddToHTMLPreamble' [around line 9 of file 
>> [layouts/stdfloats.inc] current token: 'AddToHTMLPreamble' context: '']
>>
>>   
> Are you sure you svn-up'd everything? Check your TextClass.cpp and see if 
> the tag is defined there.

ahh, the problem is not not svn up but the impatience to wait on make 
finished...
sorry for the noise
pavel


Re: Wiki question

2009-06-24 Thread Christian Ridderström

On Wed, 24 Jun 2009, Pavel Sanda wrote:


Jürgen Spitzmüller wrote:

Paul A. Rubin wrote:

Separate (but related in my case) question: We have a layouts page
group.  When we upload modules for sharing, should we put the associated
pages in the Layout group, or create a separate Module group?


I would rather create a Modules group.


i would vote for one big wiki page for all modules.


It's probably a good idea to start with a single page, perhaps even in 
the main group, LyX/.


http://wiki.lyx.org/LyX/Modules?action=edit

If you then find this paging getting to big and difficult to maintain, 
then split into several separate pages, optionally into a separate group 
or into the group Layouts/.


Note that it's relatively easy to create a single page that includes a lot 
of pages, so the old page LyX/Modules could continue to display all the 
module pages.


/Christian


--
Christian Ridderström   Mobile: +46-8 768 39 44

Re: Wiki question

2009-06-24 Thread Christian Ridderström

On Wed, 24 Jun 2009, Jürgen Spitzmüller wrote:


Paul A. Rubin wrote:

Separate (but related in my case) question: We have a layouts page
group.  When we upload modules for sharing, should we put the associated
pages in the Layout group, or create a separate Module group?


I would rather create a Modules group.


If you do go for a separate group, let me know so I can help set it up for 
you. There are some tricks which'll make it a little easier in terms of 
integrating with the rest of th ewiki.


The one advantage with a group that I see at the moment is that I think 
the actual uploaded modules should probably be stored in a hierarchy such 
as


  http://wiki.lyx.org/uploads/Modules///

where  could/should correspond to a page with that name.

best regards
/Christian

PS. The more modern option, compared to a group, is to tag all pages 
related to modules with something specific. Then it's easy to e.g. list 
all pages with such a tag.


--
Christian Ridderström   Mobile: +46-8 768 39 44

Re: Wiki question

2009-06-24 Thread Christian Ridderström

On Wed, 24 Jun 2009, Paul A. Rubin wrote:

Anybody know an easy way to rename a page on the wiki?  (Easy => does 
not require creating a new page and copying all content of the existing 
one.)


As an administrator, me or Jean-Marc can simply rename the file 
corresponding to a page... but then you lose the history of the change.


Do you want to rename many pages?  (It is possible to install a plugin 
that makes it easier to rename pages).


What's your need?

/Christian



Separate (but related in my case) question: We have a layouts page group. 
When we upload modules for sharing, should we put the associated pages in the 
Layout group, or create a separate Module group?


TIA,
Paul






--
Christian Ridderström   Mobile: +46-8 768 39 44

Re: I LOVE YOU

2009-06-24 Thread Christian Ridderström

On Wed, 24 Jun 2009, Liviu Andronic wrote:


Would this qualify for the "praise article" [1]? Please advise.
Liviu

http://wiki.lyx.org/LyX/Praise#toc2


I guess... but maybe under a heading of 'Praise or spam'... :-)

/Christian





On Wed, Jun 24, 2009 at 6:47 PM, Jean Dahlquist wrote:

Really. I do.

--Jean









--
Christian Ridderström   Mobile: +46-8 768 39 44

Re: I LOVE YOU

2009-06-24 Thread Liviu Andronic
On Thu, Jun 25, 2009 at 12:31 AM, Christian
Ridderström wrote:
> I guess... but maybe under a heading of 'Praise or spam'... :-)
>
Oh, well, done [1]. :)
Liviu

[1] http://wiki.lyx.org/LyX/Praise#toc23