no way to obtain an SVG preview of the correct size

2008-06-14 Thread Tribulations Parallèles
Hi us,

I use LyX 1.6 SVN.
I use sometimes Inkscape to make vectorial pictures, with the "external 
material" feature.
To use Inkscape with LyX, a method is given here:

http://wiki.lyx.org/Tips/UseInkscapeSVGImages

At the end, you see "Correction 18/05/08: setting the figure size in 
Inkscape's File->Document_Properties seems to be mendatory, while 
the --export-area-drawing doesn't seem to do anything.".

So, some people seems to have the same problem than me, if I understand well. 
My problem is that I obtain a preview with A4 size, whereas I would like to 
obtain a preview cropped to the "bounding box" size.

I have tried several configurations:

1/ SVG format not defined, no converter.
I see a A4 preview. After careful examination, it seems that this is a preview 
generated by ImageMagick "convert" tool, called in the Python script:

/lib/scripts/convertDefault.py

2/ Definition of the format svg, as hinted at 
http://wiki.lyx.org/Tips/UseInkscapeSVGImages , but no definition of 
converters.

The preview is still A4, but it has changed: another tool has been used to 
transform the SVG picture. I know it because there are arrows in my picture, 
and they are badly converted by ImageMagick (configuration 1), and here 
(configuration 2) they do not appear at all.
It seems that this is not inkview (the viewer defined in the file format svg) 
that is used, because inkview shows correctly the arrows in command line.

3/ Compared to configuration 2, additional definition of the svg=>png 
converter, as asked in the LyX Wiki. Same result than in 2.

4/ Compared to configuration 3, additional definition of the svg=>EPS and 
svg=>PDF(pstopdf), as said in the LyX Wiki. Same result.

5/ Try to add -D option to Inkscape in the svg=>EPS and svg=>PNG already 
defined filters. No result.

Note that the PS view (CTRL+T) works correctly in configuration 5. It is only 
a problem of preview.
Note also that the converters work correctly in command line.

I have found a workaround, I have modified the already quoted Python file 

/lib/scripts/convertDefault.py

I have replaced the following lines:

==
if os.system(r'convert %s "%s" "%s"' % (opts, sys.argv[1], sys.argv[2])) != 0:
print >> sys.stderr, sys.argv[0], 'ERROR'
print >> sys.stderr, 'Execution of "convert" failed.'
sys.exit(1)
==

by:

==
if sys.argv[1][-3:] == 'svg' and sys.argv[2][0:3] == 'ppm':
   if 
os.system(r'inkscape -D "%s" --export-background=white --export-png="%s";\
 convert -verbose "%s" "%s"'\
 % (sys.argv[1], sys.argv[2][4:-4] + ".png", sys.argv[2][4:-4] 
+ ".png", sys.argv[2][4:]) ) != 0:

  os.system(r'echo "%s => %s => %s: conversion has failed!"' % 
(sys.argv[1], sys.argv[2][4:-4] + ".png", sys.argv[2][4:] ) );
   else:

  os.system(r'echo "%s => %s => %s : conversion has suceeded"' % 
(sys.argv[1], sys.argv[2][4:-4] + ".png", sys.argv[2][4:] ) );

elif sys.argv[1][-3:] == 'svg' and sys.argv[2][0:3] == 'eps':

   if os.system(r'inkscape -D "%s" --export-eps="%s"'\
 % (sys.argv[1][4:], sys.argv[2][4:]) ) != 0:

  os.system(r'echo "%s => %s: conversion has failed!"' % (sys.argv[1][4:], 
sys.argv[2][4:] ) );
   else:

  os.system(r'echo "%s => %s : conversion has suceeded"' % (sys.argv[1]
[4:], sys.argv[2][4:] ) );

else:

   if os.system(r'convert %s "%s" "%s"' % (opts, sys.argv[1], sys.argv[2])) != 
0:
  print >> sys.stderr, sys.argv[0], 'ERROR'
  print >> sys.stderr, 'Execution of "convert" failed.'
   sys.exit(1)

==

And it works perfectly well.
So, contrary to what is said in the LyX Wiki, it seems that the important 
converter for the preview is svg=>PPM. I have tried to keep the orginal 
convertDefault.py, and defined a filter svg=>PPM with the following command:

inkscape $$i --export-png=$$o.png;convert $$o.png $$o

(the redirection does not seem to work in command line, I have not found 
another solution than the semicolon in command line).

But it does not work.
To go further in the examination of the problem, I have to examine C++ code. 
It is too difficult for me.
So could you help me, please?
If no solution with standard definition of format and filters in LyX 
preferences does work, I will keep my modified Python file!

Thanks

Julien


Cannot outpt dvi pdf

2008-06-14 Thread Waluyo Adi Siswanto
I am just a new user of LyX and Linux system (Ubuntu)

When I learn LyX I want to make hardcopy by clicking dvi or pdf but I got this 
message "An empty output was generated" then I click OK
 "LATEX error: File 'ifpdf.sty' not found"

I try several Math symbols, and again if I do dvi or pdf it shows similar 
message but different .sty file.

Could you help me



  Get the name you always wanted with the new y7mail email address.
www.yahoo7.com.au/mail

No headers with memoir class

2008-06-14 Thread Nicolás

Hi!

Does someone know whether it is possible to suppress the headers of part of a 
document using the memoir class? Thanks

Nicolás


Re: External fig material and pdflatex

2008-06-14 Thread Georg Baum
Abdelrazak Younes wrote:

> I got this error when I try to export with pdflatex:
> 
> Traceback (most recent call last):
>File "C:/devel/lyx/trunk/lib/scripts/fig2pdftex.py", line 81, in
>
>  tmp = open(epsfile + '.??', 'w')
> IOError: [Errno 2] No such file or directory:
> '0C__perso_these_fig_Avion.pstex.??'
> Error: Cannot convert file
> 
> An error occurred whilst running python -tt
> "C:/devel/lyx/trunk/lib/scripts/fig2pdf

I guess that your OS does not like the question marks in the file name.
Instead of using this strange name it would be better to use mkstemp() from
lyxpreview_tools.py to create a temporary file that deletes itself after
usage.


Georg



Re: Spell checking problems

2008-06-14 Thread RyanC

Thank you, Nigel.

That worked. I had only been playing with options under 
tools-->preferences. (I did look through the manual, website, etc. Must 
have missed it.)


Thanks,
Ryan

Nigel Pegram wrote:
Try setting the language to british in the language pane of document 
settings.


Nigel

2008/6/12 RyanC <[EMAIL PROTECTED] >:

Hello,

LyX 1.5.3 on Mepis Linux does not seem to be able to make use of
any of my spell checking libraries. I'm pretty sure I have them
all installed - ispell, aspell, etc; American and British English.
With ispell I get:

The spellchecker could not be started
Can't open /usr/lib/ispell/english.hash

I think this may be because the file is not called "english.hash",
but "british.hash". Any suggestions?

Thanks,
Ryan






Re: Can't write on file Thesis.dvi

2008-06-14 Thread Nigel Pegram
I had this problem on Windows (1.5.x) when switching to yap before lyx had
finished processing the latex. I dont' seem to get it if I wait for lyx to
finish first.

HTH

Nigel

2008/6/13 G. Milde <[EMAIL PROTECTED]>:

> On 12.06.08, Martin Görg wrote:
> > On Thu, 12 Jun 2008 15:03:44 +0200, G. Milde wrote:
>
> > > Looks like Yap locks the file. [...] As you normally do not edit a
> > > dvi file, this seems to be a bug in Yap.
>
> > ... I am aware of that, but I'm not touching the DVI file,
> > except reading and scrolling.
>
> So it is most likely a Yap bug or a problem with your installation.
> Try googling for "Yap DVI lock" or so.
>
> > I'm using JabRef to generate my bibliography and maybe change something
> in
> > the bib db. Might there a connection to the problem?
>
> Not likely. The dvi is self-contained (except for the fonts) and not
> affected by this chage unless you re-run tex to recreate it.
>
> Günter
>


Re: Spell checking problems

2008-06-14 Thread Nigel Pegram
Try setting the language to british in the language pane of document
settings.

Nigel

2008/6/12 RyanC <[EMAIL PROTECTED]>:

> Hello,
>
> LyX 1.5.3 on Mepis Linux does not seem to be able to make use of any of my
> spell checking libraries. I'm pretty sure I have them all installed -
> ispell, aspell, etc; American and British English. With ispell I get:
>
> The spellchecker could not be started
> Can't open /usr/lib/ispell/english.hash
>
> I think this may be because the file is not called "english.hash", but
> "british.hash". Any suggestions?
>
> Thanks,
> Ryan
>


Re: scaling a "longtable"

2008-06-14 Thread Christian Liesen

Hi,

would it be possible for you to provide an example file? I'm not sure  
what it is you're trying to do with the longtable.


Cheers,
-- Christian




Am 13.06.2008 um 09:20 schrieb Stefan Buchholz:



Hi Guys,
i tried to scale a normal table, and that worked quiet well.
i tried also to scale a long table for my enclosure, which i need  
cause the

table needs to break every couple rows.
But it doesn´t work and a dialog shows up where it says:
Missing \endgroup inserted. (3 times)
and Missing } inserted
also it says Undefined control sequence.
i don´t know what the mistake causes, cause i made the longtable  
wiki-like.

i use lyx 1.5.3 under windows.

Is there anybody who can solve my problem?
--
View this message in context: 
http://www.nabble.com/scaling-a-%22longtable%22-tp17816624p17816624.html
Sent from the LyX - Users mailing list archive at Nabble.com.