Help adding new graphics format

2011-04-18 Thread Yang Zhang
I'm interested in adding a new graphics format (Xournal) to LyX that
can be displayed on-screen and rendered in PDF outputs.  Just to get
started, I've been trying to figure out how to add a dummy graphics
format.  The input is actually a .tex file (but named .foo), and I
tried adding a converter to PDF, but not luck.  Details follow.

In Tools  Preferences, I added a new format with:

Format: foo
Short Name: foo
Extension: foo
Editor: gedit
Viewer: gedit

I also added a new converter to PDF (ps2pdf) with:

pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foo  cp /tmp/blah.pdf $$o

Note I'm ignoring $$i, just for the sake of getting *something* working.

Now I tried inserting a simple hello world latex file named .foo into
my document as a graphic.  With lyx -dbg graphics, I see the following
output, and in the main window I get the error Error converting to
loadable format.  Any hints?  Thanks in advance.

../../src/graphics/GraphicsCacheItem.cpp(409):  Converting it to  format.
../../../src/support/FileName.cpp(818): filetools(getFormatFromContents)
File type not recognised before EOF!
../../../src/support/FileName.cpp(935): filetools(getFormatFromContents)
Couldn't find a known format!
../../src/graphics/GraphicsCacheItem.cpp(379):
[CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file: /home/yang/blah/blah.foo
with displayed filename: ~/blah/blah.foo
../../../src/support/FileName.cpp(818): filetools(getFormatFromContents)
File type not recognised before EOF!
../../../src/support/FileName.cpp(935): filetools(getFormatFromContents)
Couldn't find a known format!
../../src/Format.cpp(146):  will guess format from file extension: foo - 
foo
../../src/graphics/GraphicsCacheItem.cpp(386):
The file contains foo format data.
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to bmp
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to gif
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to jpg
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to jpg
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to pbm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to pgm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to png
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to ppm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from
foo to tiff
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to xbm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to xpm
../../src/graphics/GraphicsConverter.cpp(127): Converter c-tor:
from_file:  /home/yang/blah/blah.foo
to_file_base: /tmp/lyx_tmpdir.J18704/CacheItem.J18704
from_format:  foo
to_format:ppm
../../src/graphics/GraphicsConverter.cpp(262): build_script ...
../../src/graphics/GraphicsConverter.cpp(342):  No converter defined!
I use convertDefault.py
python -tt /usr/share/lyx/scripts/convertDefault.py foo:' + '' +
infile + '' + ' ppm:' + '' + outfile + '' + '
../../src/graphics/GraphicsConverter.cpp(385): ready!
../../src/graphics/GraphicsConverter.cpp(140):  Conversion script:
--
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, shutil, sys, locale

def unlinkNoThrow(file):
  ''' remove a file, do not throw if an error occurs '''
  try:
os.unlink(file)
  except:
pass

def utf8ToDefaultEncoding(file):
  ''' if possible, convert to the default encoding '''
  try:
language, output_encoding = locale.getdefaultlocale()
if output_encoding == None:
  output_encoding = 'latin1'
return unicode(file, 'utf8').encode(output_encoding)
  except:
return file

infile = utf8ToDefaultEncoding(/home/yang/blah/blah.foo)
outfile = utf8ToDefaultEncoding(/tmp/lyx_tmpdir.J18704/gconvert2.y18704.foo)
shutil.copy(infile, outfile)
os.chdir(utf8ToDefaultEncoding('/tmp/lyx_tmpdir.J18704/'))
infile = outfile
outfile = utf8ToDefaultEncoding(/tmp/lyx_tmpdir.J18704/CacheItem.J18704.ppm)

if os.system(r'python -tt /usr/share/lyx/scripts/convertDefault.py
foo:' + '' + infile + '' + ' ppm:' + '' + outfile + '' + '') != 0:
  unlinkNoThrow(outfile)
  sys.exit(1)

if not os.path.isfile(outfile):
  if os.path.isfile(outfile + '.0'):
os.rename(outfile + '.0', outfile)
import glob
for file in glob.glob(outfile + '.?'):
  unlinkNoThrow(file)
  else:
sys.exit(1)

unlinkNoThrow(infile)

fromfile = utf8ToDefaultEncoding(outfile)
tofile = utf8ToDefaultEncoding(/tmp/lyx_tmpdir.J18704/CacheItem.J18704.ppm)

try:
  os.rename(fromfile, tofile)
except:
  try:
shutil.copy(fromfile, tofile)
  except:
sys.exit(1)
  unlinkNoThrow(fromfile)

--

../../../src/support/ForkedCalls.cpp(465): ForkedCallQueue: waking up

Re: Translations issues in French

2011-04-18 Thread Jean-Pierre Chrétien
Jean-Pierre Chrétien jeanpierre.chretien at free.fr writes:

 I got no answers there and maybe there are some French speaking
 users subscribed 
 to lyx-users and not to lyx-fr.

Thank you all for your answers.

-- 
Regards
Jean-Pierre




Re: spellchecker for lyx 2.0 rc2

2011-04-18 Thread Stephan Witt
Am 17.04.2011 um 22:16 schrieb Jim Oldfield:

 From: Joost Verburg jo...@lyx.org
 
 Julien Rioux jri...@physics.utoronto.ca  wrote in message 
 news:iod00u$hei$1...@dough.gmane.org...
 You would need  to make aspell visible to the configure script by putting 
 the 
 
 path to aspell.exe  in your PATH environment variable or alternatively in 
 the 
 PATH in LyX  preferences. Then reconfigure LyX, close and start LyX again. 
 If it 
 
 does not  work after that then there is indeed a problem.
 
 No, we don't use Aspell  anymore. The problem is indeed that Hunspell 
 dictionaries are missing in the  installer. This will be fixed in RC3.
 
 
 
 Ok, thanks for the information
 
 
 I'm still worried about one problem though, as I said in my previous email:
 
 
 3) When LyX could not spell check some (or all) text, it just claimed to have 
 completed the spell check successfully. It should instead report an error, so 
 the user at least knows that there could be spelling mistakes.
 
 
 
 Should I file a bug report?

Yes, you can do this, of course.
And I have this on my ToDo list already.

But it's a little bit more than simply reporting an error:
1) the spell checker shouldn't be enabled when not functional 
 - if no dictionaries are found
2) the spell checker may be functional, but not for the languages used in 
document
 - obviously it shouldn't report success on spell check then. 
 An warning message would be appropriate.

Stephan

Timeline generation

2011-04-18 Thread Walter
Hi all,

Does anyone have a good solution to generate timelines?

Features that are required:
 - Allows marking of both specific events (point in time) and
periods (range in time)

Features that are highly desired:
 - Properly functional unicode support (right to left support not
required at this stage, but otherwise font switching for arbitrary
languages)

Features that would be a bonus:
 - Handles the case of 'so many elements you'd be lucky to get them to
fit on a page' elegantly (eg: by scaling layout down to a minimum
threshold size for legibility, then page-splitting)
 - Accepts input as a simply delimited text file (ala graphviz .dot
files or mscgen .msc files)

Any recommendations would be appreciated.

I have seen a few non-LyX specific solutions already but they all seem
to lack what I want.  Having said that, if all else fails I suppose I
could try to write one (with only required features), maybe call it
'escgen' (event sequent chart generator) in deference to its high
quality predecessor. However, it seems like a good example in raw TeX
would be enough for me to get some macros going and a more elegant
solution (ie: no need to re-implement unicode font support, no need to
step out to an external generation/update process). Could anyone point
one out?

Cheers

- Walter


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Stephan Witt st.witt at gmx.net writes:
 
... warns you if a merge is needed etc. See the LyX docs.
 Of course you need a SVN repository somewhere with access for all 
 co-workers...
 
 Stephan
 

Exactly, but I need LyX to warn me that a newer version of my file has just been
added to my DropBox folder. Is there any work on that? 


- Christian




Re: Lyx open buffered copy

2011-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 18/04/11 15:40, Christian Wilhelmsen wrote:
 Stephan Witt st.witt at gmx.net writes:
  
 ... warns you if a merge is needed etc. See the LyX docs.
 Of course you need a SVN repository somewhere with access for all 
 co-workers...

 Stephan

 
 Exactly, but I need LyX to warn me that a newer version of my file has just 
 been
 added to my DropBox folder. Is there any work on that? 

Why not using an external tool, which notifies you if a file has changed
on disk? There should be some around?

Rainer



 
 
 - Christian
 
 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2sSY0ACgkQoYgNqgF2egqMZACdFMWoJInc0tS7RvJ9bU54cqgn
FysAoIqpsZis4V5TTiGDniJQNrhxPaSQ
=JAtj
-END PGP SIGNATURE-


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen

Because I only want it for the file that I am editing at that exact moment.




Re: Lyx open buffered copy

2011-04-18 Thread Stephan Witt
Am 18.04.2011 um 15:40 schrieb Christian Wilhelmsen:

 Stephan Witt st.witt at gmx.net writes:
 
 ... warns you if a merge is needed etc. See the LyX docs.
 Of course you need a SVN repository somewhere with access for all 
 co-workers...
 
 Stephan
 
 
 Exactly, but I need LyX to warn me that a newer version of my file has just 
 been
 added to my DropBox folder. Is there any work on that? 

Hmm... what are you asking for?
The text portion you've cited above refers to version control systems.
I think Dropbox is not a version control systems. It's more like a
distributed file system. Or am I missing something?

Stephan

Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Stephan Witt st.witt at gmx.net writes:

 Hmm... what are you asking for?
 The text portion you've cited above refers to version control systems.
 I think Dropbox is not a version control systems. It's more like a
 distributed file system. Or am I missing something?
 
 Stephan
 

Feeling stupid, but the cite was even dumber. I was so suppose to cite ...
warns you if a merge is needed etc. I only want to use Dropbox




Re: Lyx open buffered copy

2011-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 18/04/11 16:28, Christian Wilhelmsen wrote:
 
 Because I only want it for the file that I am editing at that exact moment.
 
 

Assuming you use Windows:

What about using something like

http://www.xstarter.com/help/monitor-files.html

Where you can specify the directory and a file mask to monitor the file?
If it changes, let it play a sound or give a message box.

You don't have to monitor all files on your HDD...

Cheers,

Rainer


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2sTV4ACgkQoYgNqgF2egpsJACZAQlYrCP/geN1yce6rV8zpArU
oCoAnRJrBOxX8FclwkMS8T+RLPx29+NM
=f/C1
-END PGP SIGNATURE-


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
I get what you are saying, but I only want it to notify me about the file I
am working on in LyX at the moment. So, it is actually a function I would
want the LyX team to implement. But thank you very much for your suggestion.


2011/4/18 Rainer M Krug r.m.k...@gmail.com

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 18/04/11 16:26, Christian Wilhelmsen wrote:
  Because I only want it for the file that I am editing at that exact
 moment.

 Assuming you use Windows:

 What about using something like

 http://www.xstarter.com/help/monitor-files.html

 Where you can specify the directory and a file mask to monitor the file?
 If it changes, let it play a sound or give a message box.

 You don't have to monitor all files on your HDD...

 Cheers,

 Rainer

 
  2011/4/18 Rainer M Krug r.m.k...@gmail.com mailto:r.m.k...@gmail.com
 
  On 18/04/11 15:40, Christian Wilhelmsen wrote:
  Stephan Witt st.witt at gmx.net http://gmx.net writes:
 
  ... warns you if a merge is needed etc. See the LyX docs.
  Of course you need a SVN repository somewhere with access for all
  co-workers...
 
  Stephan
 
 
  Exactly, but I need LyX to warn me that a newer version of my file
  has just been
  added to my DropBox folder. Is there any work on that?
 
  Why not using an external tool, which notifies you if a file has changed
  on disk? There should be some around?
 
  Rainer
 
 
 
 
 
  - Christian
 
 
 
 

 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk2sTGIACgkQoYgNqgF2egqtqACdHF9zZRLlTG8Oyhs0Ta56F8NZ
 pXwAnAwy/4W7S4WiU3RI1lP3YGG0
 =xREh
 -END PGP SIGNATURE-



Re: Lyx open buffered copy

2011-04-18 Thread Vincent van Ravesteijn
On 18-1-2011 11:17, Christian Wilhelmsen wrote:
 I juse LyX and Dropbox in collaboration with my team mates, and the problem 
 is that when you have opened a file, another user edits it and sync it through
 dropbox, LyX wont open the new version, it opens a buffered copy or something.
 
 We have to close LyX each time we want to open an updated document, or else 
 you just get the copy that is stored in memory... Tried removing auto-backup, 
 if that was the problem, but no.
 
 Anyone knows how we can get past this problem?
 

I'm also not sure I understand your problem. Usually, if your file is changed, 
you can use File-Revert to Saved. This should give you the new version of the 
file.

I've been working on a mechanism that pops up a messagebox indicating that the 
file you're editing has been changed on disk.

I'm not familiar with Dropbox, so I don't know whether it will help you out in 
that case.

 
 - christian wilhelmsen


Vincent


Re: Lyx open buffered copy

2011-04-18 Thread Stephan Witt
Am 18.04.2011 um 16:37 schrieb Christian Wilhelmsen:

 Stephan Witt st.witt at gmx.net writes:
 
 Hmm... what are you asking for?
 The text portion you've cited above refers to version control systems.
 I think Dropbox is not a version control systems. It's more like a
 distributed file system. Or am I missing something?
 
 Stephan
 
 
 Feeling stupid, but the cite was even dumber. I was so suppose to cite ...
 warns you if a merge is needed etc. I only want to use Dropbox

I see.

No, there is no work on that.

Again, did you try to use Revert to saved...?

I understand, you have to know somehow that the LyX file was changed.
Nevertheless I'm curious if Revert to saved works for you when Dropbox
has updated the file behind your back.

Stephan


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Exactly! A message box that is indicating change on the file I am currently
editing would resolve my problem just perfect.

2011/4/18 Vincent van Ravesteijn v...@lyx.org

 On 18-1-2011 11:17, Christian Wilhelmsen wrote:
  I juse LyX and Dropbox in collaboration with my team mates, and the
 problem is that when you have opened a file, another user edits it and sync
 it through
  dropbox, LyX wont open the new version, it opens a buffered copy or
 something.
 
  We have to close LyX each time we want to open an updated document, or
 else you just get the copy that is stored in memory... Tried removing
 auto-backup, if that was the problem, but no.
 
  Anyone knows how we can get past this problem?
 

 I'm also not sure I understand your problem. Usually, if your file is
 changed, you can use File-Revert to Saved. This should give you the new
 version of the file.

 I've been working on a mechanism that pops up a messagebox indicating that
 the file you're editing has been changed on disk.

 I'm not familiar with Dropbox, so I don't know whether it will help you out
 in that case.

 
  - christian wilhelmsen


 Vincent



Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
2011/4/18 Stephan Witt st.w...@gmx.net

 Am 18.04.2011 um 16:37 schrieb Christian Wilhelmsen:

  Stephan Witt st.witt at gmx.net writes:
 
  Hmm... what are you asking for?
  The text portion you've cited above refers to version control systems.
  I think Dropbox is not a version control systems. It's more like a
  distributed file system. Or am I missing something?
 
  Stephan
 
 
  Feeling stupid, but the cite was even dumber. I was so suppose to cite
 ...
  warns you if a merge is needed etc. I only want to use Dropbox

 I see.

 No, there is no work on that.

 Again, did you try to use Revert to saved...?

 I understand, you have to know somehow that the LyX file was changed.
 Nevertheless I'm curious if Revert to saved works for you when Dropbox
 has updated the file behind your back.

 Stephan


Revert to save works just perfect when using Dropbox.  As Vincent said, he
is working on it :D


Re: Lyx open buffered copy

2011-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 18/04/11 16:52, Christian Wilhelmsen wrote:
 Exactly! A message box that is indicating change on the file I am
 currently editing would resolve my problem just perfect.

But what if a figure file is changing? or a child document? That should
be included in the message box as well, otherwise this approach would be
a little dangerous, as it would not show all changes which can happen to
a lyx document.

Rainer

 
 2011/4/18 Vincent van Ravesteijn v...@lyx.org mailto:v...@lyx.org
 
 On 18-1-2011 11:17, Christian Wilhelmsen wrote:
  I juse LyX and Dropbox in collaboration with my team mates, and
 the problem is that when you have opened a file, another user edits
 it and sync it through
  dropbox, LyX wont open the new version, it opens a buffered copy
 or something.
 
  We have to close LyX each time we want to open an updated
 document, or else you just get the copy that is stored in memory...
 Tried removing auto-backup, if that was the problem, but no.
 
  Anyone knows how we can get past this problem?
 
 
 I'm also not sure I understand your problem. Usually, if your file
 is changed, you can use File-Revert to Saved. This should give you
 the new version of the file.
 
 I've been working on a mechanism that pops up a messagebox
 indicating that the file you're editing has been changed on disk.
 
 I'm not familiar with Dropbox, so I don't know whether it will help
 you out in that case.
 
 
  - christian wilhelmsen
 
 
 Vincent
 
 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2sUVAACgkQoYgNqgF2egrKTwCeKl2LQigu9NCe1n/pfRE+tb6E
AoQAnigEH2IyMJMLLeFe8BVas8cjKNcp
=MlR/
-END PGP SIGNATURE-


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
2011/4/18 Rainer M Krug r.m.k...@gmail.com

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 18/04/11 16:52, Christian Wilhelmsen wrote:
  Exactly! A message box that is indicating change on the file I am
  currently editing would resolve my problem just perfect.

 But what if a figure file is changing? or a child document? That should
 be included in the message box as well, otherwise this approach would be
 a little dangerous, as it would not show all changes which can happen to
 a lyx document.

 Rainer

 Agreed. It has been bothering me that I open up a lyx document from within
LyX (not opening a new windows, just new tab), and its not the latest copy
of the file. Serious mistakes could be made. But I wouldn't need anything
notifying me about change in graphics, since they are always the latest
version when compiling.


Re: Lyx open buffered copy

2011-04-18 Thread Julien Rioux

On 18/04/2011 10:57 AM, Rainer M Krug wrote:

But what if a figure file is changing? or a child document? That should
be included in the message box as well, otherwise this approach would be
a little dangerous, as it would not show all changes which can happen to
a lyx document.


Current versions of LyX already update the graphics (both in LyX's 
display and when you compile) when graphics are edited externally. 
Changes to (most, if not all) other files are also noticed. If that is 
not the case please report it as bug.


--
Julien



Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Julien Rioux jrioux at physics.utoronto.ca writes:

 Current versions of LyX already update the graphics (both in LyX's 
 display and when you compile) when graphics are edited externally. 
 Changes to (most, if not all) other files are also noticed. If that is 
 not the case please report it as bug.
 


Where do you report the bug? I thought the feature just was non existing. 



Re: Lyx open buffered copy

2011-04-18 Thread Julien Rioux

On 18/04/2011 11:25 AM, Christian Wilhelmsen wrote:

Where do you report the bug? I thought the feature just was non existing.


The specific feature you are requesting (notify that the LyX file has 
changed on disk) is not implemented yet, that's true. If you follow the 
thread, I was replying to a specific message (which I quoted) by Mr 
Rainer Krug about external files such as graphics files.


If you want to report bugs or feature request you can discuss them on 
this list and/or you can enter them on the bug tracker:


http://www.lyx.org/trac/wiki/BugTrackerHome

If you do enter a feature request on the bug tracker it is a good idea 
to include a link to the current mailing list discussion for continuity.


Cheers,
Julien



tex2lyx and custom macros

2011-04-18 Thread Tommaso Cucinotta

Hi,

can someone remember me how to use tex2lyx with custom macros, so that 
they're imported as a single inset, and not the separated macro name, 
the open brace and closed braces ?


Thx,

T.


Re: ** ERROR ** Invalid font: -1 (8)

2011-04-18 Thread Walter
 My LyX file references a number of fonts however I have not been able to
 successfully convert to PDF for some time due to various reasons. I have
 solved them all bar this one, and am quite stumped.

To help anyone else with equivalent strangeness (for the record), I was
able to resolve the error using the following method of debugging:

1. Create a totally new LyX document
2. Test render (result = ok)
3. Copy my real document's LyX preamble in to the new document
4. Test render (result = fail)
5. Isolate the preamble portion causing issues by repeated
commenting in the preamble/re-rendering
6. Test render (result = ok)
7. Copy my real document's content in to the new document
8. Test render (result = fail)
9. Delete portions of the content until isolating the cause, which was
some language/style related commands that were previously
prerequisites for functional multilingual rendering with proper fonts
and may have been related to the legacy preamble.

After some experimenting with the recent builds (now LyX 2.0.0 RC2)
the language setting is not required for rendering properly, only setting a
text-style per foreign language section, plus ensuring some equivalent
preamble to set the font.  (Originally I had to do both!)

I now have a document that correctly mixes Chinese, English, Greek
and will render out to PDF.

UTF-16 warnings remain but do not appear to affect the output.

Thus far I have been unable to get Farsi text to render out correctly,
but have not spent too much time on the problem.

- Walter


Numbering the rows of a table

2011-04-18 Thread CLOSE Dave
I admit I'm a newbie with LyX, but this seems like such a simple
operation. I read that LyX is especially good with lists, numbered,
itemized, etc. Well, I need that in a table. I want one column of my
table to contain the number of that row. For example,

 +--+--+
 | item | head |
 +--+--+
 |   1  | text |
 +--+--+
 |   2  | text |
 +--+--+
 |   3  | text |
 +--+--+

The numbers should automatically update if I add or delete a row in the
table. I am astounded that I can't easily find a way to do this with
LyX. What am I missing?
-- 
Dave Close


Re: Numbering the rows of a table

2011-04-18 Thread David L. Johnson

On 04/18/11 12:51, CLOSE Dave wrote:

I admit I'm a newbie with LyX, but this seems like such a simple
operation. I read that LyX is especially good with lists, numbered,
itemized, etc. Well, I need that in a table. I want one column of my
table to contain the number of that row. For example,

  +--+--+
  | item | head |
  +--+--+
  |   1  | text |
  +--+--+
  |   2  | text |
  +--+--+
  |   3  | text |
  +--+--+

The numbers should automatically update if I add or delete a row in the
table. I am astounded that I can't easily find a way to do this with
LyX. What am I missing?


I presume you need the lines in the table, or else there is no reason 
why you couldn't just use an enumerated list, which would do what you 
want.  But inside of a table, I don't know how to do that.


--

David L. Johnson

When you are up to your ass in alligators, it's hard to remember that
your initial objective was to drain the swamp.
-- LBJ


Re: Lyx open buffered copy

2011-04-18 Thread Guenter Milde
On 2011-04-18, Vincent van Ravesteijn wrote:
 On 18-1-2011 11:17, Christian Wilhelmsen wrote:

 I'm also not sure I understand your problem. Usually, if your file is
 changed, you can use File-Revert to Saved. This should give you the
 new version of the file.

I remember, that when I did a change to the open file (or LyX thinks I
did so), I cannot revert to saved unless I save -- overwriting the
changes on disk!

Günter



Re: Help adding new graphics format

2011-04-18 Thread Guenter Milde
On 2011-04-18, Yang Zhang wrote:
 I'm interested in adding a new graphics format (Xournal) to LyX that
 can be displayed on-screen and rendered in PDF outputs.  Just to get
 started, I've been trying to figure out how to add a dummy graphics
 format.  The input is actually a .tex file (but named .foo), and I
 tried adding a converter to PDF, but not luck.  Details follow.

You might have a look at the LyX wiki describing how to add SVG
graphics format in older LyX versions
http://wiki.lyx.org/Tips/UseInkscapeSVGImages

A similar approach should be possible for Xournal.

Günter



Re: Making Templates.

2011-04-18 Thread Guenter Milde
On 2011-04-17, Richard Heck wrote:
 On 04/17/2011 03:40 AM, gordon cooper wrote:
 Greetings to all.

   I am very new to Lyx but have had some experience with Latex.

 I have  to write monthly reports/meeting minutes.  Have looked at the
 templates for report/articles/proceedings  and have found that none
 of them is what I need.  So I tried making a  .lyx file with the
 layout that
 suited and tried to save it as a new template.  Lyx refused to save it
 but
 did not tell me why.

 Where were you trying to save it? Depending upon your OS, and if you 
 were trying to save it to where the system templates are, you may not 
 have proper permissions to do that. Just try saving it as a normal file 
 to a normal location. Templates actually are just normal files.

However, if you want to use it via New from template it's a good idea
to keep in $LYXDIR/templates (where the value of $LYXDIR means the LyX
user dir, depends on the OS and can be seen via HelpAbout LyX).

OTOH, you can use any directory and set the path under
ToolsSettingsPaths.

I have my templates under ~/.lyx/templates/ and in this directory placed
a symlink to /usr/share/lyx/templates/ (where the official LyX templates
reside).

Günter



Re: Timeline generation

2011-04-18 Thread Steve Litt
On Monday 18 April 2011 03:09:53 Walter wrote:
 Hi all,
 
 Does anyone have a good solution to generate timelines?
 
 Features that are required:
  - Allows marking of both specific events (point in time) and
 periods (range in time)
 
 Features that are highly desired:
  - Properly functional unicode support (right to left support not
 required at this stage, but otherwise font switching for arbitrary
 languages)
 
 Features that would be a bonus:
  - Handles the case of 'so many elements you'd be lucky to get them to
 fit on a page' elegantly (eg: by scaling layout down to a minimum
 threshold size for legibility, then page-splitting)
  - Accepts input as a simply delimited text file (ala graphviz .dot
 files or mscgen .msc files)
 
 Any recommendations would be appreciated.
 
 I have seen a few non-LyX specific solutions already but they all seem
 to lack what I want.  Having said that, if all else fails I suppose I
 could try to write one (with only required features), maybe call it
 'escgen' (event sequent chart generator) in deference to its high
 quality predecessor. However, it seems like a good example in raw TeX
 would be enough for me to get some macros going and a more elegant
 solution (ie: no need to re-implement unicode font support, no need to
 step out to an external generation/update process). Could anyone point
 one out?
 
 Cheers
 
 - Walter


Hi Walter,

That would be SUCH a cool addition to LyX (or anything else). Timelines are 
the kind of thing that when you need them, you *really* need them.

Am I correct to assume that it would take the form of several lines per page, 
each with a certain arbitrary range of dates, along with specific dates, 
events and ranges? Sort of like sheet music, right?

One thing I'd caution about. You said:
  - Handles the case of 'so many elements you'd be lucky to get them to
 fit on a page' elegantly (eg: by scaling layout down to a minimum
 threshold size for legibility, then page-splitting)

There's a huge, very wide variation in visual acuities out there, and if I 
were you I wouldn't make the fonts too small. Better take extra pages. The way 
I see it, there's absolutely no excuse for going less than 11 point on 
anything, 12 point is better, and if normal LyX did 14 point, I might be using 
14 point.

I don't know whether plain old LaTeX handles Unicode, but if it does, your 
desire doesn't sound undoable in LaTeX. I bet you could write a script in Lua, 
Perl, Python or Ruby that takes a date file (all the dates and date ranges and 
their names), and a properties file (margins, years per line, whether to page 
break before and/or after the timeline), and have your program write the LaTeX 
for inclusion in your LyX document. Or maybe you could have the properties be 
LaTeX commands, make up some environments and commands, and have the LaTeX in 
your new LaTeX command or whatever read from the date file.

All I know is this would be really cool, and please let us know when you've 
found a solution.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt



Re: Timeline generation

2011-04-18 Thread mario
hello

On Mon, Apr 18, 2011 06:51  PM, Steve Litt lt;sl...@troubleshooters.comgt; 
wrote:
 On Monday 18 April 2011 03:09:53 Walter wrote:
  Hi all,
  
  Does anyone have a good solution to generate timelines?
  

 All I know is this would be really cool, and please let us know when you've 
 found a solution.
 


Yes, it would be very very cool.
Do you know about http://www.simile-widgets.org/timeline/ ?
It would be very nice to be able to convert that html output to something Latex 
can hadle.
I have millions of question, but before I ask them maybe somebody could tell us 
what can be done, or which stumblig blocks are in front of us. 

I look forward to read from you
thanks
mario


Re: Timeline generation

2011-04-18 Thread Rob Oakes
There are two latext packages that can be used for timelines: timeslins and 
chronology. This links discusses both of them, they seem pretty straightforward 
to use and chronology creates a nicely drawn figure.

http://stackoverflow.com/questions/217834/how-to-create-a-timeline-with-latex

If your'e feeling more daring, you can also use TKIZ or PGF, which are LaTeX 
drawing packages.. The same link provides an example of how you might choose to 
do so.

While it would be convenient if LyX provided this functionality, I think it is 
a more natural fit for Inkscape, gnuPlot, or one of the other plot figure 
programs. I would much prefer to use the limited development resources of LyX 
go toward improved XHTML support, easier customization of LaTeX document, a 
styles editor, or another feature which directly addresses the customization 
learning curve.

Just my two cents, though.

Cheers,

Rob

Re: Timeline generation

2011-04-18 Thread Les Denham
On Monday, April 18, 2011 14:19:07 mario wrote:
 hello
 
 On Mon, Apr 18, 2011 06:51  PM, Steve Litt lt;sl...@troubleshooters.comgt; 
wrote:
  On Monday 18 April 2011 03:09:53 Walter wrote:
   Hi all,
   
   Does anyone have a good solution to generate timelines?
  
  All I know is this would be really cool, and please let us know when
  you've found a solution.
 
 Yes, it would be very very cool.
 Do you know about http://www.simile-widgets.org/timeline/ ?
 It would be very nice to be able to convert that html output to something
 Latex can hadle. I have millions of question, but before I ask them maybe
 somebody could tell us what can be done, or which stumblig blocks are in
 front of us.
 
 I look forward to read from you
 thanks
 mario

Mario,

Conversion from HTML to LyX is (at least in principle) doable.  The big 
problem with SIMILE is that the guts of the output is in Javascript not HTML.

I'm not aware of a way of getting Javascript into something LyX might be able 
to handle.

Les
-- 
Les Denham


Re: Help adding new graphics format

2011-04-18 Thread Julien Rioux

On 18/04/2011 2:29 AM, Yang Zhang wrote:

I'm interested in adding a new graphics format (Xournal) to LyX that
can be displayed on-screen and rendered in PDF outputs.  Just to get
started, I've been trying to figure out how to add a dummy graphics
format.  The input is actually a .tex file (but named .foo), and I
tried adding a converter to PDF, but not luck.  Details follow.

In Tools  Preferences, I added a new format with:

Format: foo
Short Name: foo
Extension: foo
Editor: gedit
Viewer: gedit

I also added a new converter to PDF (ps2pdf) with:

pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foo  cp /tmp/blah.pdf $$o

Note I'm ignoring $$i, just for the sake of getting *something* working.



At least for the export to pdf, it should be sufficient to use:
pdflatex $$i

For the display in the LyX buffer, you might have to define a converter 
to .png, but imagemagick will be attempted if you don't define a converter.



Now I tried inserting a simple hello world latex file named .foo into
my document as a graphic.  With lyx -dbg graphics, I see the following
output, and in the main window I get the error Error converting to
loadable format.  Any hints?  Thanks in advance.




--
Julien



Re: Making Templates.

2011-04-18 Thread gordon cooper

My thanks for the advice given by several contributors.
I am making progress now.

Gordon.
Tauranga N.Z.


Re: Help adding new graphics format

2011-04-18 Thread Yang Zhang
On Mon, Apr 18, 2011 at 11:26 AM, Guenter Milde mi...@users.berlios.de wrote:
 On 2011-04-18, Yang Zhang wrote:
 I'm interested in adding a new graphics format (Xournal) to LyX that
 can be displayed on-screen and rendered in PDF outputs.  Just to get
 started, I've been trying to figure out how to add a dummy graphics
 format.  The input is actually a .tex file (but named .foo), and I
 tried adding a converter to PDF, but not luck.  Details follow.

 You might have a look at the LyX wiki describing how to add SVG
 graphics format in older LyX versions
 http://wiki.lyx.org/Tips/UseInkscapeSVGImages

 A similar approach should be possible for Xournal.

This was one of the pages I consulted while attempting this - I
haven't had any luck, however.

-- 
Yang Zhang
http://yz.mit.edu/


Re: Modifying the Elsevier Class

2011-04-18 Thread Bruce Pourciau


On Apr 15, 2011, at 2:59 PM, Richard Heck wrote:


On 04/15/2011 01:47 PM, Bruce Pourciau wrote:


The Elsevier document class

prints Preprint submitted to Elsevier and the date as footers
indents the first paragraph after a heading

What, if anything, can I put in the preamble to make the footers go  
away and to stop the first paragraph after a heading from indenting?



For the first, try giving the final option to the class.

For the second, try: \@afterindentfalse. If that doesn't quite work,  
mimic what's done in the indentfirst package:


\let\@afterindenttrue\@afterindentfalse
\@afterindentfalse

rh




Thanks, Richard. And Liviu, as well. Using


\let\@afterindenttrue\@afterindentfalse
\@afterindentfalse


does work. Haven't gotten rid of the Preprint submitted to Elsevier  
yet.


Bruce

Re: Numbering the rows of a table

2011-04-18 Thread Paul A . Rubin
CLOSE Dave Dave.Close at us.thalesgroup.com writes:

 
 I admit I'm a newbie with LyX, but this seems like such a simple
 operation. I read that LyX is especially good with lists, numbered,
 itemized, etc. Well, I need that in a table. I want one column of my
 table to contain the number of that row. For example,
 
  +--+--+
  | item | head |
  +--+--+
  |   1  | text |
  +--+--+
  |   2  | text |
  +--+--+
  |   3  | text |
  +--+--+
 
 The numbers should automatically update if I add or delete a row in the
 table. I am astounded that I can't easily find a way to do this with
 LyX. What am I missing?

It can be done with LaTeX.  Add the following to your preamble:

\newcounter{trow}
\newcommand{\therow}{\addtocounter{trow}{1}\arabic{trow}}

Then insert \therow in ERT in the item column.  You can copy it and paste it
into the item cell of each new row.

If you want to use this in more than one table in the same doc, insert
\setcounter{trow}{0} in ERT somewhere in the text prior to each table other than
the first.  Otherwise, numbering in the second table picks up where it left off
at the end of the first table.

Paul




Re: Numbering the rows of a table

2011-04-18 Thread David L. Johnson

On 04/18/11 17:36, Paul A. Rubin wrote:

It can be done with LaTeX.  Add the following to your preamble:

\newcounter{trow}
\newcommand{\therow}{\addtocounter{trow}{1}\arabic{trow}}

Then insert \therow in ERT in the item column.  You can copy it and paste it
into the item cell of each new row.

That works very nicely.  It's be cool to add this to the table 
functionality in LyX at some point, but this is simple enough to satisfy 
the original request, I think.


--

David L. Johnson

As far as the laws of mathematics refer to reality, they are not
certain, and as far as they are certain, they do not refer to reality.
-- Albert Einstein


PNAS reference style?

2011-04-18 Thread Ehud Kaplan
How do I get the PNAS reference style (numeric, references numbered in 
the order they appear in the text, compressed so 1,2,3,4 -- 1-4, etc?

I have tried various  .bst styles but none worked correctly.
Thanks,

EK


Re: PNAS reference style?

2011-04-18 Thread Julien Rioux

On 18/04/2011 6:06 PM, Ehud Kaplan wrote:

How do I get the PNAS reference style (numeric, references numbered in
the order they appear in the text, compressed so 1,2,3,4 -- 1-4, etc?
I have tried various .bst styles but none worked correctly.
Thanks,

EK



For the compressed list, use natbib and put sortcompress (minus the 
quotes) in the custom option class of your document settings.


For styles you really just have to experiment a bit or google for natbib 
styles.


--
Julien



Re: PNAS reference style?

2011-04-18 Thread ehud.kap...@gmail.com
It turns out that naturemag (with \usepackage{cite} in the preamble does 
ALMOST what I need, but the citations have square brackets around them, 
rather than the round one I need.  Putting round in the package options 
does not help, and the cite package does not accept round as an option

E

On 04/18/2011 06:06 PM, Ehud Kaplan wrote:
How do I get the PNAS reference style (numeric, references numbered in 
the order they appear in the text, compressed so 1,2,3,4 -- 1-4, etc?

I have tried various  .bst styles but none worked correctly.
Thanks,

EK





Re: Help adding new graphics format

2011-04-18 Thread Yang Zhang
On Mon, Apr 18, 2011 at 1:23 PM, Julien Rioux
jri...@physics.utoronto.ca wrote:
 On 18/04/2011 2:29 AM, Yang Zhang wrote:

 I'm interested in adding a new graphics format (Xournal) to LyX that
 can be displayed on-screen and rendered in PDF outputs.  Just to get
 started, I've been trying to figure out how to add a dummy graphics
 format.  The input is actually a .tex file (but named .foo), and I
 tried adding a converter to PDF, but not luck.  Details follow.

 In Tools  Preferences, I added a new format with:

 Format: foo
 Short Name: foo
 Extension: foo
 Editor: gedit
 Viewer: gedit

 I also added a new converter to PDF (ps2pdf) with:

 pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foo  cp
 /tmp/blah.pdf $$o

 Note I'm ignoring $$i, just for the sake of getting *something* working.


 At least for the export to pdf, it should be sufficient to use:
 pdflatex $$i

 For the display in the LyX buffer, you might have to define a converter to
 .png, but imagemagick will be attempted if you don't define a converter.

 Now I tried inserting a simple hello world latex file named .foo into
 my document as a graphic.  With lyx -dbg graphics, I see the following
 output, and in the main window I get the error Error converting to
 loadable format.  Any hints?  Thanks in advance.



 --
 Julien



OK, some progress.

I tried exporting my document to a PDF, and it worked - the converter
I registered (foo to PDF) does kick in at that point (despite no
in-LyX display).

I then tried adding a dummy foo-to-PNG converter (I have a simple
out.png file sitting around):

cp .../out.png $$o

That worked - I now have in-LyX display.

This leads to some more questions.  I thought LyX would be able to
convert the .pdf to a format it can display.  At least, that's what I
understand to be happening with Graphviz Dot, which has just this
converter to PDF (ps2pdf):

dot -Tpdf $$i -o $$o

When I insert .dot files as Graphics they display in LyX just fine.
So why does that work for .dot but not .foo?  I verified that both
.foo and .dot formats have Vector graphics format checked.

Thanks.

-- 
Yang Zhang
http://yz.mit.edu/


Re: Help adding new graphics format

2011-04-18 Thread Julien Rioux

On 18/04/2011 8:41 PM, Yang Zhang wrote:

On Mon, Apr 18, 2011 at 1:23 PM, Julien Rioux
jri...@physics.utoronto.ca  wrote:

On 18/04/2011 2:29 AM, Yang Zhang wrote:


I'm interested in adding a new graphics format (Xournal) to LyX that
can be displayed on-screen and rendered in PDF outputs.  Just to get
started, I've been trying to figure out how to add a dummy graphics
format.  The input is actually a .tex file (but named .foo), and I
tried adding a converter to PDF, but not luck.  Details follow.

In ToolsPreferences, I added a new format with:

Format: foo
Short Name: foo
Extension: foo
Editor: gedit
Viewer: gedit

I also added a new converter to PDF (ps2pdf) with:

pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foocp
/tmp/blah.pdf $$o

Note I'm ignoring $$i, just for the sake of getting *something* working.



At least for the export to pdf, it should be sufficient to use:
pdflatex $$i

For the display in the LyX buffer, you might have to define a converter to
.png, but imagemagick will be attempted if you don't define a converter.


Now I tried inserting a simple hello world latex file named .foo into
my document as a graphic.  With lyx -dbg graphics, I see the following
output, and in the main window I get the error Error converting to
loadable format.  Any hints?  Thanks in advance.




--
Julien




OK, some progress.

I tried exporting my document to a PDF, and it worked - the converter
I registered (foo to PDF) does kick in at that point (despite no
in-LyX display).

I then tried adding a dummy foo-to-PNG converter (I have a simple
out.png file sitting around):

cp .../out.png $$o

That worked - I now have in-LyX display.

This leads to some more questions.  I thought LyX would be able to
convert the .pdf to a format it can display.  At least, that's what I
understand to be happening with Graphviz Dot, which has just this
converter to PDF (ps2pdf):

dot -Tpdf $$i -o $$o

When I insert .dot files as Graphics they display in LyX just fine.
So why does that work for .dot but not .foo?  I verified that both
..foo and .dot formats have Vector graphics format checked.

Thanks.



Because imagemagick does handle .dot format, but not your .foo format. I 
half expected that conversion from foo to pdf to png would occur, but I 
guess that's not the case.


--
Julien



Re: spellchecker for lyx 2.0 rc2

2011-04-18 Thread Ganesh Sundaram

On 4/18/2011 12:22 PM, Stephan Witt wrote:

Yes, you can do this, of course.
And I have this on my ToDo list already.

But it's a little bit more than simply reporting an error:
1) the spell checker shouldn't be enabled when not functional
  - if no dictionaries are found
2) the spell checker may be functional, but not for the languages used in 
document
  - obviously it shouldn't report success on spell check then.
  An warning message would be appropriate.

Stephan


Alternatively, if no dictionaries are found, we could have a dialog box 
that prompts the user to launch a module that downloads and installs the 
dictionaries of choice. Probably this is lot more work than simply 
bundling a few dictionaries at the beginning and allow the user to 
install or extract dictionary files in to some specified directory where 
the spell checker engine can find and load those ones chosen by the user 
in the spell checker options in Lyx.


Thanks and Regards
Ganesh


Help adding new graphics format

2011-04-18 Thread Yang Zhang
I'm interested in adding a new graphics format (Xournal) to LyX that
can be displayed on-screen and rendered in PDF outputs.  Just to get
started, I've been trying to figure out how to add a dummy graphics
format.  The input is actually a .tex file (but named .foo), and I
tried adding a converter to PDF, but not luck.  Details follow.

In Tools  Preferences, I added a new format with:

Format: foo
Short Name: foo
Extension: foo
Editor: gedit
Viewer: gedit

I also added a new converter to PDF (ps2pdf) with:

pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foo  cp /tmp/blah.pdf $$o

Note I'm ignoring $$i, just for the sake of getting *something* working.

Now I tried inserting a simple hello world latex file named .foo into
my document as a graphic.  With lyx -dbg graphics, I see the following
output, and in the main window I get the error Error converting to
loadable format.  Any hints?  Thanks in advance.

../../src/graphics/GraphicsCacheItem.cpp(409):  Converting it to  format.
../../../src/support/FileName.cpp(818): filetools(getFormatFromContents)
File type not recognised before EOF!
../../../src/support/FileName.cpp(935): filetools(getFormatFromContents)
Couldn't find a known format!
../../src/graphics/GraphicsCacheItem.cpp(379):
[CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file: /home/yang/blah/blah.foo
with displayed filename: ~/blah/blah.foo
../../../src/support/FileName.cpp(818): filetools(getFormatFromContents)
File type not recognised before EOF!
../../../src/support/FileName.cpp(935): filetools(getFormatFromContents)
Couldn't find a known format!
../../src/Format.cpp(146):  will guess format from file extension: foo - 
foo
../../src/graphics/GraphicsCacheItem.cpp(386):
The file contains foo format data.
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to bmp
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to gif
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to jpg
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to jpg
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to pbm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to pgm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to png
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to ppm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from
foo to tiff
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to xbm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to xpm
../../src/graphics/GraphicsConverter.cpp(127): Converter c-tor:
from_file:  /home/yang/blah/blah.foo
to_file_base: /tmp/lyx_tmpdir.J18704/CacheItem.J18704
from_format:  foo
to_format:ppm
../../src/graphics/GraphicsConverter.cpp(262): build_script ...
../../src/graphics/GraphicsConverter.cpp(342):  No converter defined!
I use convertDefault.py
python -tt /usr/share/lyx/scripts/convertDefault.py foo:' + '' +
infile + '' + ' ppm:' + '' + outfile + '' + '
../../src/graphics/GraphicsConverter.cpp(385): ready!
../../src/graphics/GraphicsConverter.cpp(140):  Conversion script:
--
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, shutil, sys, locale

def unlinkNoThrow(file):
  ''' remove a file, do not throw if an error occurs '''
  try:
os.unlink(file)
  except:
pass

def utf8ToDefaultEncoding(file):
  ''' if possible, convert to the default encoding '''
  try:
language, output_encoding = locale.getdefaultlocale()
if output_encoding == None:
  output_encoding = 'latin1'
return unicode(file, 'utf8').encode(output_encoding)
  except:
return file

infile = utf8ToDefaultEncoding(/home/yang/blah/blah.foo)
outfile = utf8ToDefaultEncoding(/tmp/lyx_tmpdir.J18704/gconvert2.y18704.foo)
shutil.copy(infile, outfile)
os.chdir(utf8ToDefaultEncoding('/tmp/lyx_tmpdir.J18704/'))
infile = outfile
outfile = utf8ToDefaultEncoding(/tmp/lyx_tmpdir.J18704/CacheItem.J18704.ppm)

if os.system(r'python -tt /usr/share/lyx/scripts/convertDefault.py
foo:' + '' + infile + '' + ' ppm:' + '' + outfile + '' + '') != 0:
  unlinkNoThrow(outfile)
  sys.exit(1)

if not os.path.isfile(outfile):
  if os.path.isfile(outfile + '.0'):
os.rename(outfile + '.0', outfile)
import glob
for file in glob.glob(outfile + '.?'):
  unlinkNoThrow(file)
  else:
sys.exit(1)

unlinkNoThrow(infile)

fromfile = utf8ToDefaultEncoding(outfile)
tofile = utf8ToDefaultEncoding(/tmp/lyx_tmpdir.J18704/CacheItem.J18704.ppm)

try:
  os.rename(fromfile, tofile)
except:
  try:
shutil.copy(fromfile, tofile)
  except:
sys.exit(1)
  unlinkNoThrow(fromfile)

--

../../../src/support/ForkedCalls.cpp(465): ForkedCallQueue: waking up

Re: Translations issues in French

2011-04-18 Thread Jean-Pierre Chrétien
Jean-Pierre Chrétien jeanpierre.chretien at free.fr writes:

 I got no answers there and maybe there are some French speaking
 users subscribed 
 to lyx-users and not to lyx-fr.

Thank you all for your answers.

-- 
Regards
Jean-Pierre




Re: spellchecker for lyx 2.0 rc2

2011-04-18 Thread Stephan Witt
Am 17.04.2011 um 22:16 schrieb Jim Oldfield:

 From: Joost Verburg jo...@lyx.org
 
 Julien Rioux jri...@physics.utoronto.ca  wrote in message 
 news:iod00u$hei$1...@dough.gmane.org...
 You would need  to make aspell visible to the configure script by putting 
 the 
 
 path to aspell.exe  in your PATH environment variable or alternatively in 
 the 
 PATH in LyX  preferences. Then reconfigure LyX, close and start LyX again. 
 If it 
 
 does not  work after that then there is indeed a problem.
 
 No, we don't use Aspell  anymore. The problem is indeed that Hunspell 
 dictionaries are missing in the  installer. This will be fixed in RC3.
 
 
 
 Ok, thanks for the information
 
 
 I'm still worried about one problem though, as I said in my previous email:
 
 
 3) When LyX could not spell check some (or all) text, it just claimed to have 
 completed the spell check successfully. It should instead report an error, so 
 the user at least knows that there could be spelling mistakes.
 
 
 
 Should I file a bug report?

Yes, you can do this, of course.
And I have this on my ToDo list already.

But it's a little bit more than simply reporting an error:
1) the spell checker shouldn't be enabled when not functional 
 - if no dictionaries are found
2) the spell checker may be functional, but not for the languages used in 
document
 - obviously it shouldn't report success on spell check then. 
 An warning message would be appropriate.

Stephan

Timeline generation

2011-04-18 Thread Walter
Hi all,

Does anyone have a good solution to generate timelines?

Features that are required:
 - Allows marking of both specific events (point in time) and
periods (range in time)

Features that are highly desired:
 - Properly functional unicode support (right to left support not
required at this stage, but otherwise font switching for arbitrary
languages)

Features that would be a bonus:
 - Handles the case of 'so many elements you'd be lucky to get them to
fit on a page' elegantly (eg: by scaling layout down to a minimum
threshold size for legibility, then page-splitting)
 - Accepts input as a simply delimited text file (ala graphviz .dot
files or mscgen .msc files)

Any recommendations would be appreciated.

I have seen a few non-LyX specific solutions already but they all seem
to lack what I want.  Having said that, if all else fails I suppose I
could try to write one (with only required features), maybe call it
'escgen' (event sequent chart generator) in deference to its high
quality predecessor. However, it seems like a good example in raw TeX
would be enough for me to get some macros going and a more elegant
solution (ie: no need to re-implement unicode font support, no need to
step out to an external generation/update process). Could anyone point
one out?

Cheers

- Walter


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Stephan Witt st.witt at gmx.net writes:
 
... warns you if a merge is needed etc. See the LyX docs.
 Of course you need a SVN repository somewhere with access for all 
 co-workers...
 
 Stephan
 

Exactly, but I need LyX to warn me that a newer version of my file has just been
added to my DropBox folder. Is there any work on that? 


- Christian




Re: Lyx open buffered copy

2011-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 18/04/11 15:40, Christian Wilhelmsen wrote:
 Stephan Witt st.witt at gmx.net writes:
  
 ... warns you if a merge is needed etc. See the LyX docs.
 Of course you need a SVN repository somewhere with access for all 
 co-workers...

 Stephan

 
 Exactly, but I need LyX to warn me that a newer version of my file has just 
 been
 added to my DropBox folder. Is there any work on that? 

Why not using an external tool, which notifies you if a file has changed
on disk? There should be some around?

Rainer



 
 
 - Christian
 
 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2sSY0ACgkQoYgNqgF2egqMZACdFMWoJInc0tS7RvJ9bU54cqgn
FysAoIqpsZis4V5TTiGDniJQNrhxPaSQ
=JAtj
-END PGP SIGNATURE-


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen

Because I only want it for the file that I am editing at that exact moment.




Re: Lyx open buffered copy

2011-04-18 Thread Stephan Witt
Am 18.04.2011 um 15:40 schrieb Christian Wilhelmsen:

 Stephan Witt st.witt at gmx.net writes:
 
 ... warns you if a merge is needed etc. See the LyX docs.
 Of course you need a SVN repository somewhere with access for all 
 co-workers...
 
 Stephan
 
 
 Exactly, but I need LyX to warn me that a newer version of my file has just 
 been
 added to my DropBox folder. Is there any work on that? 

Hmm... what are you asking for?
The text portion you've cited above refers to version control systems.
I think Dropbox is not a version control systems. It's more like a
distributed file system. Or am I missing something?

Stephan

Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Stephan Witt st.witt at gmx.net writes:

 Hmm... what are you asking for?
 The text portion you've cited above refers to version control systems.
 I think Dropbox is not a version control systems. It's more like a
 distributed file system. Or am I missing something?
 
 Stephan
 

Feeling stupid, but the cite was even dumber. I was so suppose to cite ...
warns you if a merge is needed etc. I only want to use Dropbox




Re: Lyx open buffered copy

2011-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 18/04/11 16:28, Christian Wilhelmsen wrote:
 
 Because I only want it for the file that I am editing at that exact moment.
 
 

Assuming you use Windows:

What about using something like

http://www.xstarter.com/help/monitor-files.html

Where you can specify the directory and a file mask to monitor the file?
If it changes, let it play a sound or give a message box.

You don't have to monitor all files on your HDD...

Cheers,

Rainer


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2sTV4ACgkQoYgNqgF2egpsJACZAQlYrCP/geN1yce6rV8zpArU
oCoAnRJrBOxX8FclwkMS8T+RLPx29+NM
=f/C1
-END PGP SIGNATURE-


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
I get what you are saying, but I only want it to notify me about the file I
am working on in LyX at the moment. So, it is actually a function I would
want the LyX team to implement. But thank you very much for your suggestion.


2011/4/18 Rainer M Krug r.m.k...@gmail.com

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 18/04/11 16:26, Christian Wilhelmsen wrote:
  Because I only want it for the file that I am editing at that exact
 moment.

 Assuming you use Windows:

 What about using something like

 http://www.xstarter.com/help/monitor-files.html

 Where you can specify the directory and a file mask to monitor the file?
 If it changes, let it play a sound or give a message box.

 You don't have to monitor all files on your HDD...

 Cheers,

 Rainer

 
  2011/4/18 Rainer M Krug r.m.k...@gmail.com mailto:r.m.k...@gmail.com
 
  On 18/04/11 15:40, Christian Wilhelmsen wrote:
  Stephan Witt st.witt at gmx.net http://gmx.net writes:
 
  ... warns you if a merge is needed etc. See the LyX docs.
  Of course you need a SVN repository somewhere with access for all
  co-workers...
 
  Stephan
 
 
  Exactly, but I need LyX to warn me that a newer version of my file
  has just been
  added to my DropBox folder. Is there any work on that?
 
  Why not using an external tool, which notifies you if a file has changed
  on disk? There should be some around?
 
  Rainer
 
 
 
 
 
  - Christian
 
 
 
 

 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk2sTGIACgkQoYgNqgF2egqtqACdHF9zZRLlTG8Oyhs0Ta56F8NZ
 pXwAnAwy/4W7S4WiU3RI1lP3YGG0
 =xREh
 -END PGP SIGNATURE-



Re: Lyx open buffered copy

2011-04-18 Thread Vincent van Ravesteijn
On 18-1-2011 11:17, Christian Wilhelmsen wrote:
 I juse LyX and Dropbox in collaboration with my team mates, and the problem 
 is that when you have opened a file, another user edits it and sync it through
 dropbox, LyX wont open the new version, it opens a buffered copy or something.
 
 We have to close LyX each time we want to open an updated document, or else 
 you just get the copy that is stored in memory... Tried removing auto-backup, 
 if that was the problem, but no.
 
 Anyone knows how we can get past this problem?
 

I'm also not sure I understand your problem. Usually, if your file is changed, 
you can use File-Revert to Saved. This should give you the new version of the 
file.

I've been working on a mechanism that pops up a messagebox indicating that the 
file you're editing has been changed on disk.

I'm not familiar with Dropbox, so I don't know whether it will help you out in 
that case.

 
 - christian wilhelmsen


Vincent


Re: Lyx open buffered copy

2011-04-18 Thread Stephan Witt
Am 18.04.2011 um 16:37 schrieb Christian Wilhelmsen:

 Stephan Witt st.witt at gmx.net writes:
 
 Hmm... what are you asking for?
 The text portion you've cited above refers to version control systems.
 I think Dropbox is not a version control systems. It's more like a
 distributed file system. Or am I missing something?
 
 Stephan
 
 
 Feeling stupid, but the cite was even dumber. I was so suppose to cite ...
 warns you if a merge is needed etc. I only want to use Dropbox

I see.

No, there is no work on that.

Again, did you try to use Revert to saved...?

I understand, you have to know somehow that the LyX file was changed.
Nevertheless I'm curious if Revert to saved works for you when Dropbox
has updated the file behind your back.

Stephan


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Exactly! A message box that is indicating change on the file I am currently
editing would resolve my problem just perfect.

2011/4/18 Vincent van Ravesteijn v...@lyx.org

 On 18-1-2011 11:17, Christian Wilhelmsen wrote:
  I juse LyX and Dropbox in collaboration with my team mates, and the
 problem is that when you have opened a file, another user edits it and sync
 it through
  dropbox, LyX wont open the new version, it opens a buffered copy or
 something.
 
  We have to close LyX each time we want to open an updated document, or
 else you just get the copy that is stored in memory... Tried removing
 auto-backup, if that was the problem, but no.
 
  Anyone knows how we can get past this problem?
 

 I'm also not sure I understand your problem. Usually, if your file is
 changed, you can use File-Revert to Saved. This should give you the new
 version of the file.

 I've been working on a mechanism that pops up a messagebox indicating that
 the file you're editing has been changed on disk.

 I'm not familiar with Dropbox, so I don't know whether it will help you out
 in that case.

 
  - christian wilhelmsen


 Vincent



Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
2011/4/18 Stephan Witt st.w...@gmx.net

 Am 18.04.2011 um 16:37 schrieb Christian Wilhelmsen:

  Stephan Witt st.witt at gmx.net writes:
 
  Hmm... what are you asking for?
  The text portion you've cited above refers to version control systems.
  I think Dropbox is not a version control systems. It's more like a
  distributed file system. Or am I missing something?
 
  Stephan
 
 
  Feeling stupid, but the cite was even dumber. I was so suppose to cite
 ...
  warns you if a merge is needed etc. I only want to use Dropbox

 I see.

 No, there is no work on that.

 Again, did you try to use Revert to saved...?

 I understand, you have to know somehow that the LyX file was changed.
 Nevertheless I'm curious if Revert to saved works for you when Dropbox
 has updated the file behind your back.

 Stephan


Revert to save works just perfect when using Dropbox.  As Vincent said, he
is working on it :D


Re: Lyx open buffered copy

2011-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 18/04/11 16:52, Christian Wilhelmsen wrote:
 Exactly! A message box that is indicating change on the file I am
 currently editing would resolve my problem just perfect.

But what if a figure file is changing? or a child document? That should
be included in the message box as well, otherwise this approach would be
a little dangerous, as it would not show all changes which can happen to
a lyx document.

Rainer

 
 2011/4/18 Vincent van Ravesteijn v...@lyx.org mailto:v...@lyx.org
 
 On 18-1-2011 11:17, Christian Wilhelmsen wrote:
  I juse LyX and Dropbox in collaboration with my team mates, and
 the problem is that when you have opened a file, another user edits
 it and sync it through
  dropbox, LyX wont open the new version, it opens a buffered copy
 or something.
 
  We have to close LyX each time we want to open an updated
 document, or else you just get the copy that is stored in memory...
 Tried removing auto-backup, if that was the problem, but no.
 
  Anyone knows how we can get past this problem?
 
 
 I'm also not sure I understand your problem. Usually, if your file
 is changed, you can use File-Revert to Saved. This should give you
 the new version of the file.
 
 I've been working on a mechanism that pops up a messagebox
 indicating that the file you're editing has been changed on disk.
 
 I'm not familiar with Dropbox, so I don't know whether it will help
 you out in that case.
 
 
  - christian wilhelmsen
 
 
 Vincent
 
 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2sUVAACgkQoYgNqgF2egrKTwCeKl2LQigu9NCe1n/pfRE+tb6E
AoQAnigEH2IyMJMLLeFe8BVas8cjKNcp
=MlR/
-END PGP SIGNATURE-


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
2011/4/18 Rainer M Krug r.m.k...@gmail.com

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 18/04/11 16:52, Christian Wilhelmsen wrote:
  Exactly! A message box that is indicating change on the file I am
  currently editing would resolve my problem just perfect.

 But what if a figure file is changing? or a child document? That should
 be included in the message box as well, otherwise this approach would be
 a little dangerous, as it would not show all changes which can happen to
 a lyx document.

 Rainer

 Agreed. It has been bothering me that I open up a lyx document from within
LyX (not opening a new windows, just new tab), and its not the latest copy
of the file. Serious mistakes could be made. But I wouldn't need anything
notifying me about change in graphics, since they are always the latest
version when compiling.


Re: Lyx open buffered copy

2011-04-18 Thread Julien Rioux

On 18/04/2011 10:57 AM, Rainer M Krug wrote:

But what if a figure file is changing? or a child document? That should
be included in the message box as well, otherwise this approach would be
a little dangerous, as it would not show all changes which can happen to
a lyx document.


Current versions of LyX already update the graphics (both in LyX's 
display and when you compile) when graphics are edited externally. 
Changes to (most, if not all) other files are also noticed. If that is 
not the case please report it as bug.


--
Julien



Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Julien Rioux jrioux at physics.utoronto.ca writes:

 Current versions of LyX already update the graphics (both in LyX's 
 display and when you compile) when graphics are edited externally. 
 Changes to (most, if not all) other files are also noticed. If that is 
 not the case please report it as bug.
 


Where do you report the bug? I thought the feature just was non existing. 



Re: Lyx open buffered copy

2011-04-18 Thread Julien Rioux

On 18/04/2011 11:25 AM, Christian Wilhelmsen wrote:

Where do you report the bug? I thought the feature just was non existing.


The specific feature you are requesting (notify that the LyX file has 
changed on disk) is not implemented yet, that's true. If you follow the 
thread, I was replying to a specific message (which I quoted) by Mr 
Rainer Krug about external files such as graphics files.


If you want to report bugs or feature request you can discuss them on 
this list and/or you can enter them on the bug tracker:


http://www.lyx.org/trac/wiki/BugTrackerHome

If you do enter a feature request on the bug tracker it is a good idea 
to include a link to the current mailing list discussion for continuity.


Cheers,
Julien



tex2lyx and custom macros

2011-04-18 Thread Tommaso Cucinotta

Hi,

can someone remember me how to use tex2lyx with custom macros, so that 
they're imported as a single inset, and not the separated macro name, 
the open brace and closed braces ?


Thx,

T.


Re: ** ERROR ** Invalid font: -1 (8)

2011-04-18 Thread Walter
 My LyX file references a number of fonts however I have not been able to
 successfully convert to PDF for some time due to various reasons. I have
 solved them all bar this one, and am quite stumped.

To help anyone else with equivalent strangeness (for the record), I was
able to resolve the error using the following method of debugging:

1. Create a totally new LyX document
2. Test render (result = ok)
3. Copy my real document's LyX preamble in to the new document
4. Test render (result = fail)
5. Isolate the preamble portion causing issues by repeated
commenting in the preamble/re-rendering
6. Test render (result = ok)
7. Copy my real document's content in to the new document
8. Test render (result = fail)
9. Delete portions of the content until isolating the cause, which was
some language/style related commands that were previously
prerequisites for functional multilingual rendering with proper fonts
and may have been related to the legacy preamble.

After some experimenting with the recent builds (now LyX 2.0.0 RC2)
the language setting is not required for rendering properly, only setting a
text-style per foreign language section, plus ensuring some equivalent
preamble to set the font.  (Originally I had to do both!)

I now have a document that correctly mixes Chinese, English, Greek
and will render out to PDF.

UTF-16 warnings remain but do not appear to affect the output.

Thus far I have been unable to get Farsi text to render out correctly,
but have not spent too much time on the problem.

- Walter


Numbering the rows of a table

2011-04-18 Thread CLOSE Dave
I admit I'm a newbie with LyX, but this seems like such a simple
operation. I read that LyX is especially good with lists, numbered,
itemized, etc. Well, I need that in a table. I want one column of my
table to contain the number of that row. For example,

 +--+--+
 | item | head |
 +--+--+
 |   1  | text |
 +--+--+
 |   2  | text |
 +--+--+
 |   3  | text |
 +--+--+

The numbers should automatically update if I add or delete a row in the
table. I am astounded that I can't easily find a way to do this with
LyX. What am I missing?
-- 
Dave Close


Re: Numbering the rows of a table

2011-04-18 Thread David L. Johnson

On 04/18/11 12:51, CLOSE Dave wrote:

I admit I'm a newbie with LyX, but this seems like such a simple
operation. I read that LyX is especially good with lists, numbered,
itemized, etc. Well, I need that in a table. I want one column of my
table to contain the number of that row. For example,

  +--+--+
  | item | head |
  +--+--+
  |   1  | text |
  +--+--+
  |   2  | text |
  +--+--+
  |   3  | text |
  +--+--+

The numbers should automatically update if I add or delete a row in the
table. I am astounded that I can't easily find a way to do this with
LyX. What am I missing?


I presume you need the lines in the table, or else there is no reason 
why you couldn't just use an enumerated list, which would do what you 
want.  But inside of a table, I don't know how to do that.


--

David L. Johnson

When you are up to your ass in alligators, it's hard to remember that
your initial objective was to drain the swamp.
-- LBJ


Re: Lyx open buffered copy

2011-04-18 Thread Guenter Milde
On 2011-04-18, Vincent van Ravesteijn wrote:
 On 18-1-2011 11:17, Christian Wilhelmsen wrote:

 I'm also not sure I understand your problem. Usually, if your file is
 changed, you can use File-Revert to Saved. This should give you the
 new version of the file.

I remember, that when I did a change to the open file (or LyX thinks I
did so), I cannot revert to saved unless I save -- overwriting the
changes on disk!

Günter



Re: Help adding new graphics format

2011-04-18 Thread Guenter Milde
On 2011-04-18, Yang Zhang wrote:
 I'm interested in adding a new graphics format (Xournal) to LyX that
 can be displayed on-screen and rendered in PDF outputs.  Just to get
 started, I've been trying to figure out how to add a dummy graphics
 format.  The input is actually a .tex file (but named .foo), and I
 tried adding a converter to PDF, but not luck.  Details follow.

You might have a look at the LyX wiki describing how to add SVG
graphics format in older LyX versions
http://wiki.lyx.org/Tips/UseInkscapeSVGImages

A similar approach should be possible for Xournal.

Günter



Re: Making Templates.

2011-04-18 Thread Guenter Milde
On 2011-04-17, Richard Heck wrote:
 On 04/17/2011 03:40 AM, gordon cooper wrote:
 Greetings to all.

   I am very new to Lyx but have had some experience with Latex.

 I have  to write monthly reports/meeting minutes.  Have looked at the
 templates for report/articles/proceedings  and have found that none
 of them is what I need.  So I tried making a  .lyx file with the
 layout that
 suited and tried to save it as a new template.  Lyx refused to save it
 but
 did not tell me why.

 Where were you trying to save it? Depending upon your OS, and if you 
 were trying to save it to where the system templates are, you may not 
 have proper permissions to do that. Just try saving it as a normal file 
 to a normal location. Templates actually are just normal files.

However, if you want to use it via New from template it's a good idea
to keep in $LYXDIR/templates (where the value of $LYXDIR means the LyX
user dir, depends on the OS and can be seen via HelpAbout LyX).

OTOH, you can use any directory and set the path under
ToolsSettingsPaths.

I have my templates under ~/.lyx/templates/ and in this directory placed
a symlink to /usr/share/lyx/templates/ (where the official LyX templates
reside).

Günter



Re: Timeline generation

2011-04-18 Thread Steve Litt
On Monday 18 April 2011 03:09:53 Walter wrote:
 Hi all,
 
 Does anyone have a good solution to generate timelines?
 
 Features that are required:
  - Allows marking of both specific events (point in time) and
 periods (range in time)
 
 Features that are highly desired:
  - Properly functional unicode support (right to left support not
 required at this stage, but otherwise font switching for arbitrary
 languages)
 
 Features that would be a bonus:
  - Handles the case of 'so many elements you'd be lucky to get them to
 fit on a page' elegantly (eg: by scaling layout down to a minimum
 threshold size for legibility, then page-splitting)
  - Accepts input as a simply delimited text file (ala graphviz .dot
 files or mscgen .msc files)
 
 Any recommendations would be appreciated.
 
 I have seen a few non-LyX specific solutions already but they all seem
 to lack what I want.  Having said that, if all else fails I suppose I
 could try to write one (with only required features), maybe call it
 'escgen' (event sequent chart generator) in deference to its high
 quality predecessor. However, it seems like a good example in raw TeX
 would be enough for me to get some macros going and a more elegant
 solution (ie: no need to re-implement unicode font support, no need to
 step out to an external generation/update process). Could anyone point
 one out?
 
 Cheers
 
 - Walter


Hi Walter,

That would be SUCH a cool addition to LyX (or anything else). Timelines are 
the kind of thing that when you need them, you *really* need them.

Am I correct to assume that it would take the form of several lines per page, 
each with a certain arbitrary range of dates, along with specific dates, 
events and ranges? Sort of like sheet music, right?

One thing I'd caution about. You said:
  - Handles the case of 'so many elements you'd be lucky to get them to
 fit on a page' elegantly (eg: by scaling layout down to a minimum
 threshold size for legibility, then page-splitting)

There's a huge, very wide variation in visual acuities out there, and if I 
were you I wouldn't make the fonts too small. Better take extra pages. The way 
I see it, there's absolutely no excuse for going less than 11 point on 
anything, 12 point is better, and if normal LyX did 14 point, I might be using 
14 point.

I don't know whether plain old LaTeX handles Unicode, but if it does, your 
desire doesn't sound undoable in LaTeX. I bet you could write a script in Lua, 
Perl, Python or Ruby that takes a date file (all the dates and date ranges and 
their names), and a properties file (margins, years per line, whether to page 
break before and/or after the timeline), and have your program write the LaTeX 
for inclusion in your LyX document. Or maybe you could have the properties be 
LaTeX commands, make up some environments and commands, and have the LaTeX in 
your new LaTeX command or whatever read from the date file.

All I know is this would be really cool, and please let us know when you've 
found a solution.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt



Re: Timeline generation

2011-04-18 Thread mario
hello

On Mon, Apr 18, 2011 06:51  PM, Steve Litt lt;sl...@troubleshooters.comgt; 
wrote:
 On Monday 18 April 2011 03:09:53 Walter wrote:
  Hi all,
  
  Does anyone have a good solution to generate timelines?
  

 All I know is this would be really cool, and please let us know when you've 
 found a solution.
 


Yes, it would be very very cool.
Do you know about http://www.simile-widgets.org/timeline/ ?
It would be very nice to be able to convert that html output to something Latex 
can hadle.
I have millions of question, but before I ask them maybe somebody could tell us 
what can be done, or which stumblig blocks are in front of us. 

I look forward to read from you
thanks
mario


Re: Timeline generation

2011-04-18 Thread Rob Oakes
There are two latext packages that can be used for timelines: timeslins and 
chronology. This links discusses both of them, they seem pretty straightforward 
to use and chronology creates a nicely drawn figure.

http://stackoverflow.com/questions/217834/how-to-create-a-timeline-with-latex

If your'e feeling more daring, you can also use TKIZ or PGF, which are LaTeX 
drawing packages.. The same link provides an example of how you might choose to 
do so.

While it would be convenient if LyX provided this functionality, I think it is 
a more natural fit for Inkscape, gnuPlot, or one of the other plot figure 
programs. I would much prefer to use the limited development resources of LyX 
go toward improved XHTML support, easier customization of LaTeX document, a 
styles editor, or another feature which directly addresses the customization 
learning curve.

Just my two cents, though.

Cheers,

Rob

Re: Timeline generation

2011-04-18 Thread Les Denham
On Monday, April 18, 2011 14:19:07 mario wrote:
 hello
 
 On Mon, Apr 18, 2011 06:51  PM, Steve Litt lt;sl...@troubleshooters.comgt; 
wrote:
  On Monday 18 April 2011 03:09:53 Walter wrote:
   Hi all,
   
   Does anyone have a good solution to generate timelines?
  
  All I know is this would be really cool, and please let us know when
  you've found a solution.
 
 Yes, it would be very very cool.
 Do you know about http://www.simile-widgets.org/timeline/ ?
 It would be very nice to be able to convert that html output to something
 Latex can hadle. I have millions of question, but before I ask them maybe
 somebody could tell us what can be done, or which stumblig blocks are in
 front of us.
 
 I look forward to read from you
 thanks
 mario

Mario,

Conversion from HTML to LyX is (at least in principle) doable.  The big 
problem with SIMILE is that the guts of the output is in Javascript not HTML.

I'm not aware of a way of getting Javascript into something LyX might be able 
to handle.

Les
-- 
Les Denham


Re: Help adding new graphics format

2011-04-18 Thread Julien Rioux

On 18/04/2011 2:29 AM, Yang Zhang wrote:

I'm interested in adding a new graphics format (Xournal) to LyX that
can be displayed on-screen and rendered in PDF outputs.  Just to get
started, I've been trying to figure out how to add a dummy graphics
format.  The input is actually a .tex file (but named .foo), and I
tried adding a converter to PDF, but not luck.  Details follow.

In Tools  Preferences, I added a new format with:

Format: foo
Short Name: foo
Extension: foo
Editor: gedit
Viewer: gedit

I also added a new converter to PDF (ps2pdf) with:

pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foo  cp /tmp/blah.pdf $$o

Note I'm ignoring $$i, just for the sake of getting *something* working.



At least for the export to pdf, it should be sufficient to use:
pdflatex $$i

For the display in the LyX buffer, you might have to define a converter 
to .png, but imagemagick will be attempted if you don't define a converter.



Now I tried inserting a simple hello world latex file named .foo into
my document as a graphic.  With lyx -dbg graphics, I see the following
output, and in the main window I get the error Error converting to
loadable format.  Any hints?  Thanks in advance.




--
Julien



Re: Making Templates.

2011-04-18 Thread gordon cooper

My thanks for the advice given by several contributors.
I am making progress now.

Gordon.
Tauranga N.Z.


Re: Help adding new graphics format

2011-04-18 Thread Yang Zhang
On Mon, Apr 18, 2011 at 11:26 AM, Guenter Milde mi...@users.berlios.de wrote:
 On 2011-04-18, Yang Zhang wrote:
 I'm interested in adding a new graphics format (Xournal) to LyX that
 can be displayed on-screen and rendered in PDF outputs.  Just to get
 started, I've been trying to figure out how to add a dummy graphics
 format.  The input is actually a .tex file (but named .foo), and I
 tried adding a converter to PDF, but not luck.  Details follow.

 You might have a look at the LyX wiki describing how to add SVG
 graphics format in older LyX versions
 http://wiki.lyx.org/Tips/UseInkscapeSVGImages

 A similar approach should be possible for Xournal.

This was one of the pages I consulted while attempting this - I
haven't had any luck, however.

-- 
Yang Zhang
http://yz.mit.edu/


Re: Modifying the Elsevier Class

2011-04-18 Thread Bruce Pourciau


On Apr 15, 2011, at 2:59 PM, Richard Heck wrote:


On 04/15/2011 01:47 PM, Bruce Pourciau wrote:


The Elsevier document class

prints Preprint submitted to Elsevier and the date as footers
indents the first paragraph after a heading

What, if anything, can I put in the preamble to make the footers go  
away and to stop the first paragraph after a heading from indenting?



For the first, try giving the final option to the class.

For the second, try: \@afterindentfalse. If that doesn't quite work,  
mimic what's done in the indentfirst package:


\let\@afterindenttrue\@afterindentfalse
\@afterindentfalse

rh




Thanks, Richard. And Liviu, as well. Using


\let\@afterindenttrue\@afterindentfalse
\@afterindentfalse


does work. Haven't gotten rid of the Preprint submitted to Elsevier  
yet.


Bruce

Re: Numbering the rows of a table

2011-04-18 Thread Paul A . Rubin
CLOSE Dave Dave.Close at us.thalesgroup.com writes:

 
 I admit I'm a newbie with LyX, but this seems like such a simple
 operation. I read that LyX is especially good with lists, numbered,
 itemized, etc. Well, I need that in a table. I want one column of my
 table to contain the number of that row. For example,
 
  +--+--+
  | item | head |
  +--+--+
  |   1  | text |
  +--+--+
  |   2  | text |
  +--+--+
  |   3  | text |
  +--+--+
 
 The numbers should automatically update if I add or delete a row in the
 table. I am astounded that I can't easily find a way to do this with
 LyX. What am I missing?

It can be done with LaTeX.  Add the following to your preamble:

\newcounter{trow}
\newcommand{\therow}{\addtocounter{trow}{1}\arabic{trow}}

Then insert \therow in ERT in the item column.  You can copy it and paste it
into the item cell of each new row.

If you want to use this in more than one table in the same doc, insert
\setcounter{trow}{0} in ERT somewhere in the text prior to each table other than
the first.  Otherwise, numbering in the second table picks up where it left off
at the end of the first table.

Paul




Re: Numbering the rows of a table

2011-04-18 Thread David L. Johnson

On 04/18/11 17:36, Paul A. Rubin wrote:

It can be done with LaTeX.  Add the following to your preamble:

\newcounter{trow}
\newcommand{\therow}{\addtocounter{trow}{1}\arabic{trow}}

Then insert \therow in ERT in the item column.  You can copy it and paste it
into the item cell of each new row.

That works very nicely.  It's be cool to add this to the table 
functionality in LyX at some point, but this is simple enough to satisfy 
the original request, I think.


--

David L. Johnson

As far as the laws of mathematics refer to reality, they are not
certain, and as far as they are certain, they do not refer to reality.
-- Albert Einstein


PNAS reference style?

2011-04-18 Thread Ehud Kaplan
How do I get the PNAS reference style (numeric, references numbered in 
the order they appear in the text, compressed so 1,2,3,4 -- 1-4, etc?

I have tried various  .bst styles but none worked correctly.
Thanks,

EK


Re: PNAS reference style?

2011-04-18 Thread Julien Rioux

On 18/04/2011 6:06 PM, Ehud Kaplan wrote:

How do I get the PNAS reference style (numeric, references numbered in
the order they appear in the text, compressed so 1,2,3,4 -- 1-4, etc?
I have tried various .bst styles but none worked correctly.
Thanks,

EK



For the compressed list, use natbib and put sortcompress (minus the 
quotes) in the custom option class of your document settings.


For styles you really just have to experiment a bit or google for natbib 
styles.


--
Julien



Re: PNAS reference style?

2011-04-18 Thread ehud.kap...@gmail.com
It turns out that naturemag (with \usepackage{cite} in the preamble does 
ALMOST what I need, but the citations have square brackets around them, 
rather than the round one I need.  Putting round in the package options 
does not help, and the cite package does not accept round as an option

E

On 04/18/2011 06:06 PM, Ehud Kaplan wrote:
How do I get the PNAS reference style (numeric, references numbered in 
the order they appear in the text, compressed so 1,2,3,4 -- 1-4, etc?

I have tried various  .bst styles but none worked correctly.
Thanks,

EK





Re: Help adding new graphics format

2011-04-18 Thread Yang Zhang
On Mon, Apr 18, 2011 at 1:23 PM, Julien Rioux
jri...@physics.utoronto.ca wrote:
 On 18/04/2011 2:29 AM, Yang Zhang wrote:

 I'm interested in adding a new graphics format (Xournal) to LyX that
 can be displayed on-screen and rendered in PDF outputs.  Just to get
 started, I've been trying to figure out how to add a dummy graphics
 format.  The input is actually a .tex file (but named .foo), and I
 tried adding a converter to PDF, but not luck.  Details follow.

 In Tools  Preferences, I added a new format with:

 Format: foo
 Short Name: foo
 Extension: foo
 Editor: gedit
 Viewer: gedit

 I also added a new converter to PDF (ps2pdf) with:

 pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foo  cp
 /tmp/blah.pdf $$o

 Note I'm ignoring $$i, just for the sake of getting *something* working.


 At least for the export to pdf, it should be sufficient to use:
 pdflatex $$i

 For the display in the LyX buffer, you might have to define a converter to
 .png, but imagemagick will be attempted if you don't define a converter.

 Now I tried inserting a simple hello world latex file named .foo into
 my document as a graphic.  With lyx -dbg graphics, I see the following
 output, and in the main window I get the error Error converting to
 loadable format.  Any hints?  Thanks in advance.



 --
 Julien



OK, some progress.

I tried exporting my document to a PDF, and it worked - the converter
I registered (foo to PDF) does kick in at that point (despite no
in-LyX display).

I then tried adding a dummy foo-to-PNG converter (I have a simple
out.png file sitting around):

cp .../out.png $$o

That worked - I now have in-LyX display.

This leads to some more questions.  I thought LyX would be able to
convert the .pdf to a format it can display.  At least, that's what I
understand to be happening with Graphviz Dot, which has just this
converter to PDF (ps2pdf):

dot -Tpdf $$i -o $$o

When I insert .dot files as Graphics they display in LyX just fine.
So why does that work for .dot but not .foo?  I verified that both
.foo and .dot formats have Vector graphics format checked.

Thanks.

-- 
Yang Zhang
http://yz.mit.edu/


Re: Help adding new graphics format

2011-04-18 Thread Julien Rioux

On 18/04/2011 8:41 PM, Yang Zhang wrote:

On Mon, Apr 18, 2011 at 1:23 PM, Julien Rioux
jri...@physics.utoronto.ca  wrote:

On 18/04/2011 2:29 AM, Yang Zhang wrote:


I'm interested in adding a new graphics format (Xournal) to LyX that
can be displayed on-screen and rendered in PDF outputs.  Just to get
started, I've been trying to figure out how to add a dummy graphics
format.  The input is actually a .tex file (but named .foo), and I
tried adding a converter to PDF, but not luck.  Details follow.

In ToolsPreferences, I added a new format with:

Format: foo
Short Name: foo
Extension: foo
Editor: gedit
Viewer: gedit

I also added a new converter to PDF (ps2pdf) with:

pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foocp
/tmp/blah.pdf $$o

Note I'm ignoring $$i, just for the sake of getting *something* working.



At least for the export to pdf, it should be sufficient to use:
pdflatex $$i

For the display in the LyX buffer, you might have to define a converter to
.png, but imagemagick will be attempted if you don't define a converter.


Now I tried inserting a simple hello world latex file named .foo into
my document as a graphic.  With lyx -dbg graphics, I see the following
output, and in the main window I get the error Error converting to
loadable format.  Any hints?  Thanks in advance.




--
Julien




OK, some progress.

I tried exporting my document to a PDF, and it worked - the converter
I registered (foo to PDF) does kick in at that point (despite no
in-LyX display).

I then tried adding a dummy foo-to-PNG converter (I have a simple
out.png file sitting around):

cp .../out.png $$o

That worked - I now have in-LyX display.

This leads to some more questions.  I thought LyX would be able to
convert the .pdf to a format it can display.  At least, that's what I
understand to be happening with Graphviz Dot, which has just this
converter to PDF (ps2pdf):

dot -Tpdf $$i -o $$o

When I insert .dot files as Graphics they display in LyX just fine.
So why does that work for .dot but not .foo?  I verified that both
..foo and .dot formats have Vector graphics format checked.

Thanks.



Because imagemagick does handle .dot format, but not your .foo format. I 
half expected that conversion from foo to pdf to png would occur, but I 
guess that's not the case.


--
Julien



Re: spellchecker for lyx 2.0 rc2

2011-04-18 Thread Ganesh Sundaram

On 4/18/2011 12:22 PM, Stephan Witt wrote:

Yes, you can do this, of course.
And I have this on my ToDo list already.

But it's a little bit more than simply reporting an error:
1) the spell checker shouldn't be enabled when not functional
  - if no dictionaries are found
2) the spell checker may be functional, but not for the languages used in 
document
  - obviously it shouldn't report success on spell check then.
  An warning message would be appropriate.

Stephan


Alternatively, if no dictionaries are found, we could have a dialog box 
that prompts the user to launch a module that downloads and installs the 
dictionaries of choice. Probably this is lot more work than simply 
bundling a few dictionaries at the beginning and allow the user to 
install or extract dictionary files in to some specified directory where 
the spell checker engine can find and load those ones chosen by the user 
in the spell checker options in Lyx.


Thanks and Regards
Ganesh


Help adding new graphics format

2011-04-18 Thread Yang Zhang
I'm interested in adding a new graphics format (Xournal) to LyX that
can be displayed on-screen and rendered in PDF outputs.  Just to get
started, I've been trying to figure out how to add a dummy graphics
format.  The input is actually a .tex file (but named .foo), and I
tried adding a converter to PDF, but not luck.  Details follow.

In Tools > Preferences, I added a new format with:

Format: foo
Short Name: foo
Extension: foo
Editor: gedit
Viewer: gedit

I also added a new converter to PDF (ps2pdf) with:

pdflatex -outputdirectory /tmp/ /home/yang/blah/blah.foo && cp /tmp/blah.pdf $$o

Note I'm ignoring $$i, just for the sake of getting *something* working.

Now I tried inserting a simple hello world latex file named .foo into
my document as a graphic.  With lyx -dbg graphics, I see the following
output, and in the main window I get the error "Error converting to
loadable format."  Any hints?  Thanks in advance.

../../src/graphics/GraphicsCacheItem.cpp(409):  Converting it to  format.
../../../src/support/FileName.cpp(818): filetools(getFormatFromContents)
File type not recognised before EOF!
../../../src/support/FileName.cpp(935): filetools(getFormatFromContents)
Couldn't find a known format!
../../src/graphics/GraphicsCacheItem.cpp(379):
[CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file: /home/yang/blah/blah.foo
with displayed filename: ~/blah/blah.foo
../../../src/support/FileName.cpp(818): filetools(getFormatFromContents)
File type not recognised before EOF!
../../../src/support/FileName.cpp(935): filetools(getFormatFromContents)
Couldn't find a known format!
../../src/Format.cpp(146):  will guess format from file extension: foo -> 
foo
../../src/graphics/GraphicsCacheItem.cpp(386):
The file contains foo format data.
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to bmp
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to gif
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to jpg
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to jpg
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to pbm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to pgm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to png
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to ppm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from
foo to tiff
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to xbm
../../src/graphics/GraphicsCacheItem.cpp(340): Unable to convert from foo to xpm
../../src/graphics/GraphicsConverter.cpp(127): Converter c-tor:
from_file:  /home/yang/blah/blah.foo
to_file_base: /tmp/lyx_tmpdir.J18704/CacheItem.J18704
from_format:  foo
to_format:ppm
../../src/graphics/GraphicsConverter.cpp(262): build_script ...
../../src/graphics/GraphicsConverter.cpp(342):  No converter defined!
I use convertDefault.py
python -tt "/usr/share/lyx/scripts/convertDefault.py" foo:' + '"' +
infile + '"' + ' ppm:' + '"' + outfile + '"' + '
../../src/graphics/GraphicsConverter.cpp(385): ready!
../../src/graphics/GraphicsConverter.cpp(140):  Conversion script:
--
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, shutil, sys, locale

def unlinkNoThrow(file):
  ''' remove a file, do not throw if an error occurs '''
  try:
os.unlink(file)
  except:
pass

def utf8ToDefaultEncoding(file):
  ''' if possible, convert to the default encoding '''
  try:
language, output_encoding = locale.getdefaultlocale()
if output_encoding == None:
  output_encoding = 'latin1'
return unicode(file, 'utf8').encode(output_encoding)
  except:
return file

infile = utf8ToDefaultEncoding("/home/yang/blah/blah.foo")
outfile = utf8ToDefaultEncoding("/tmp/lyx_tmpdir.J18704/gconvert2.y18704.foo")
shutil.copy(infile, outfile)
os.chdir(utf8ToDefaultEncoding('/tmp/lyx_tmpdir.J18704/'))
infile = outfile
outfile = utf8ToDefaultEncoding("/tmp/lyx_tmpdir.J18704/CacheItem.J18704.ppm")

if os.system(r'python -tt "/usr/share/lyx/scripts/convertDefault.py"
foo:' + '"' + infile + '"' + ' ppm:' + '"' + outfile + '"' + '') != 0:
  unlinkNoThrow(outfile)
  sys.exit(1)

if not os.path.isfile(outfile):
  if os.path.isfile(outfile + '.0'):
os.rename(outfile + '.0', outfile)
import glob
for file in glob.glob(outfile + '.?'):
  unlinkNoThrow(file)
  else:
sys.exit(1)

unlinkNoThrow(infile)

fromfile = utf8ToDefaultEncoding(outfile)
tofile = utf8ToDefaultEncoding("/tmp/lyx_tmpdir.J18704/CacheItem.J18704.ppm")

try:
  os.rename(fromfile, tofile)
except:
  try:
shutil.copy(fromfile, tofile)
  except:
sys.exit(1)
  unlinkNoThrow(fromfile)

--

../../../src/support/ForkedCalls.cpp(465): 

Re: Translations issues in French

2011-04-18 Thread Jean-Pierre Chrétien
Jean-Pierre Chrétien  free.fr> writes:

> I got no answers there and maybe there are some French speaking
> users subscribed 
> to lyx-users and not to lyx-fr.

Thank you all for your answers.

-- 
Regards
Jean-Pierre




Re: spellchecker for lyx 2.0 rc2

2011-04-18 Thread Stephan Witt
Am 17.04.2011 um 22:16 schrieb Jim Oldfield:

>> From: Joost Verburg 
>> 
>> "Julien Rioux"   wrote in message 
>> news:iod00u$hei$1...@dough.gmane.org...
>>> You would need  to make aspell visible to the configure script by putting 
>>> the 
>> 
>> path to aspell.exe  in your PATH environment variable or alternatively in 
>> the 
>> PATH in LyX  preferences. Then reconfigure LyX, close and start LyX again. 
>> If it 
>> 
>> does not  work after that then there is indeed a problem.
>> 
>> No, we don't use Aspell  anymore. The problem is indeed that Hunspell 
>> dictionaries are missing in the  installer. This will be fixed in RC3.
>> 
> 
> 
> Ok, thanks for the information
> 
> 
> I'm still worried about one problem though, as I said in my previous email:
> 
> 
> 3) When LyX could not spell check some (or all) text, it just claimed to have 
> completed the spell check successfully. It should instead report an error, so 
> the user at least knows that there could be spelling mistakes.
> 
> 
> 
> Should I file a bug report?

Yes, you can do this, of course.
And I have this on my ToDo list already.

But it's a little bit more than simply reporting an error:
1) the spell checker shouldn't be enabled when not functional 
 - if no dictionaries are found
2) the spell checker may be functional, but not for the languages used in 
document
 - obviously it shouldn't report success on spell check then. 
 An warning message would be appropriate.

Stephan

Timeline generation

2011-04-18 Thread Walter
Hi all,

Does anyone have a good solution to generate timelines?

Features that are required:
 - Allows marking of both specific events ("point in time") and
periods ("range in time")

Features that are highly desired:
 - Properly functional unicode support (right to left support not
required at this stage, but otherwise font switching for arbitrary
languages)

Features that would be a bonus:
 - Handles the case of 'so many elements you'd be lucky to get them to
fit on a page' elegantly (eg: by scaling layout down to a minimum
threshold size for legibility, then page-splitting)
 - Accepts input as a simply delimited text file (ala graphviz .dot
files or mscgen .msc files)

Any recommendations would be appreciated.

I have seen a few non-LyX specific solutions already but they all seem
to lack what I want.  Having said that, if all else fails I suppose I
could try to write one (with only required features), maybe call it
'escgen' (event sequent chart generator) in deference to its high
quality predecessor. However, it seems like a good example in raw TeX
would be enough for me to get some macros going and a more elegant
solution (ie: no need to re-implement unicode font support, no need to
step out to an external generation/update process). Could anyone point
one out?

Cheers

- Walter


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Stephan Witt  gmx.net> writes:
 
>... warns you if a merge is needed etc. See the LyX docs.
> Of course you need a SVN repository somewhere with access for all 
> co-workers...
> 
> Stephan
> 

Exactly, but I need LyX to warn me that a newer version of my file has just been
added to my DropBox folder. Is there any work on that? 


- Christian




Re: Lyx open buffered copy

2011-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 18/04/11 15:40, Christian Wilhelmsen wrote:
> Stephan Witt  gmx.net> writes:
>  
>> ... warns you if a merge is needed etc. See the LyX docs.
>> Of course you need a SVN repository somewhere with access for all 
>> co-workers...
>>
>> Stephan
>>
> 
> Exactly, but I need LyX to warn me that a newer version of my file has just 
> been
> added to my DropBox folder. Is there any work on that? 

Why not using an external tool, which notifies you if a file has changed
on disk? There should be some around?

Rainer



> 
> 
> - Christian
> 
> 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2sSY0ACgkQoYgNqgF2egqMZACdFMWoJInc0tS7RvJ9bU54cqgn
FysAoIqpsZis4V5TTiGDniJQNrhxPaSQ
=JAtj
-END PGP SIGNATURE-


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen

Because I only want it for the file that I am editing at that exact moment.




Re: Lyx open buffered copy

2011-04-18 Thread Stephan Witt
Am 18.04.2011 um 15:40 schrieb Christian Wilhelmsen:

> Stephan Witt  gmx.net> writes:
> 
>> ... warns you if a merge is needed etc. See the LyX docs.
>> Of course you need a SVN repository somewhere with access for all 
>> co-workers...
>> 
>> Stephan
>> 
> 
> Exactly, but I need LyX to warn me that a newer version of my file has just 
> been
> added to my DropBox folder. Is there any work on that? 

Hmm... what are you asking for?
The text portion you've cited above refers to version control systems.
I think Dropbox is not a version control systems. It's more like a
distributed file system. Or am I missing something?

Stephan

Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Stephan Witt  gmx.net> writes:

> Hmm... what are you asking for?
> The text portion you've cited above refers to version control systems.
> I think Dropbox is not a version control systems. It's more like a
> distributed file system. Or am I missing something?
> 
> Stephan
> 

Feeling stupid, but the cite was even dumber. I was so suppose to cite "...
warns you if a merge is needed etc". I only want to use Dropbox




Re: Lyx open buffered copy

2011-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 18/04/11 16:28, Christian Wilhelmsen wrote:
> 
> Because I only want it for the file that I am editing at that exact moment.
> 
> 

Assuming you use Windows:

What about using something like

http://www.xstarter.com/help/monitor-files.html

Where you can specify the directory and a file mask to monitor the file?
If it changes, let it play a sound or give a message box.

You don't have to monitor all files on your HDD...

Cheers,

Rainer


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2sTV4ACgkQoYgNqgF2egpsJACZAQlYrCP/geN1yce6rV8zpArU
oCoAnRJrBOxX8FclwkMS8T+RLPx29+NM
=f/C1
-END PGP SIGNATURE-


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
I get what you are saying, but I only want it to notify me about the file I
am working on in LyX at the moment. So, it is actually a function I would
want the LyX team to implement. But thank you very much for your suggestion.


2011/4/18 Rainer M Krug 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 18/04/11 16:26, Christian Wilhelmsen wrote:
> > Because I only want it for the file that I am editing at that exact
> moment.
>
> Assuming you use Windows:
>
> What about using something like
>
> http://www.xstarter.com/help/monitor-files.html
>
> Where you can specify the directory and a file mask to monitor the file?
> If it changes, let it play a sound or give a message box.
>
> You don't have to monitor all files on your HDD...
>
> Cheers,
>
> Rainer
>
> >
> > 2011/4/18 Rainer M Krug >
> >
> > On 18/04/11 15:40, Christian Wilhelmsen wrote:
> >> Stephan Witt  gmx.net > writes:
> >
> >>> ... warns you if a merge is needed etc. See the LyX docs.
> >>> Of course you need a SVN repository somewhere with access for all
> > co-workers...
> >>>
> >>> Stephan
> >>>
> >
> >> Exactly, but I need LyX to warn me that a newer version of my file
> > has just been
> >> added to my DropBox folder. Is there any work on that?
> >
> > Why not using an external tool, which notifies you if a file has changed
> > on disk? There should be some around?
> >
> > Rainer
> >
> >
> >
> >
> >
> >> - Christian
> >
> >
> >
> >
>
> - --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :   +33 - (0)9 53 10 27 44
> Cell:   +33 - (0)6 85 62 59 98
> Fax :   +33 - (0)9 58 10 27 44
>
> Fax (D):+49 - (0)3 21 21 25 22 44
>
> email:  rai...@krugs.de
>
> Skype:  RMkrug
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk2sTGIACgkQoYgNqgF2egqtqACdHF9zZRLlTG8Oyhs0Ta56F8NZ
> pXwAnAwy/4W7S4WiU3RI1lP3YGG0
> =xREh
> -END PGP SIGNATURE-
>


Re: Lyx open buffered copy

2011-04-18 Thread Vincent van Ravesteijn
On 18-1-2011 11:17, Christian Wilhelmsen wrote:
> I juse LyX and Dropbox in collaboration with my team mates, and the problem 
> is that when you have opened a file, another user edits it and sync it through
> dropbox, LyX wont open the new version, it opens a buffered copy or something.
> 
> We have to close LyX each time we want to open an updated document, or else 
> you just get the copy that is stored in memory... Tried removing auto-backup, 
> if that was the problem, but no.
> 
> Anyone knows how we can get past this problem?
> 

I'm also not sure I understand your problem. Usually, if your file is changed, 
you can use File->Revert to Saved. This should give you the new version of the 
file.

I've been working on a mechanism that pops up a messagebox indicating that the 
file you're editing has been changed on disk.

I'm not familiar with Dropbox, so I don't know whether it will help you out in 
that case.

> 
> - christian wilhelmsen


Vincent


Re: Lyx open buffered copy

2011-04-18 Thread Stephan Witt
Am 18.04.2011 um 16:37 schrieb Christian Wilhelmsen:

> Stephan Witt  gmx.net> writes:
> 
>> Hmm... what are you asking for?
>> The text portion you've cited above refers to version control systems.
>> I think Dropbox is not a version control systems. It's more like a
>> distributed file system. Or am I missing something?
>> 
>> Stephan
>> 
> 
> Feeling stupid, but the cite was even dumber. I was so suppose to cite "...
> warns you if a merge is needed etc". I only want to use Dropbox

I see.

No, there is no work on that.

Again, did you try to use "Revert to saved..."?

I understand, you have to know somehow that the LyX file was changed.
Nevertheless I'm curious if "Revert to saved" works for you when Dropbox
has updated the file behind your back.

Stephan


Re: Lyx open buffered copy

2011-04-18 Thread Christian Wilhelmsen
Exactly! A message box that is indicating change on the file I am currently
editing would resolve my problem just perfect.

2011/4/18 Vincent van Ravesteijn 

> On 18-1-2011 11:17, Christian Wilhelmsen wrote:
> > I juse LyX and Dropbox in collaboration with my team mates, and the
> problem is that when you have opened a file, another user edits it and sync
> it through
> > dropbox, LyX wont open the new version, it opens a buffered copy or
> something.
> >
> > We have to close LyX each time we want to open an updated document, or
> else you just get the copy that is stored in memory... Tried removing
> auto-backup, if that was the problem, but no.
> >
> > Anyone knows how we can get past this problem?
> >
>
> I'm also not sure I understand your problem. Usually, if your file is
> changed, you can use File->Revert to Saved. This should give you the new
> version of the file.
>
> I've been working on a mechanism that pops up a messagebox indicating that
> the file you're editing has been changed on disk.
>
> I'm not familiar with Dropbox, so I don't know whether it will help you out
> in that case.
>
> >
> > - christian wilhelmsen
>
>
> Vincent
>


  1   2   >