AW: wrong cropping / bounding box in produced .tex (not in pdflatex)

2012-06-11 Thread Matthias Hunstig
Hello,

>> I am writing a paper with some EPS figures which I have cropped by
>> manually adjusting the bounding boxes. In Lyx and in PDFs created by
>> pdflatex, everything looks fine. But using classic LaTeX (via dvi),
>> the figures are cropped incorrectly. The values specified in LyX
>> equal those found in the TeX code, and that code is the same when
>> exported for "LaTeX (normal)" and for "LaTeX (pdflatex)", for
>> example: \includegraphics[bb=30bp 60bp 1075bp
>> 805bp,clip,width=0.95\textwidth]{filename}

I now pretty sure the problem has to do with the negative bounding box defined 
in most of the figures (created by Matlab).
 
For example, in the eps file I read
%%BoundingBox:  -302-1   899   842

When clicking "Get from file" in Lyx, I get 0 0 1201 843, i. e. the bounding 
box is shifted so that the lower left corner is at (0 0). If I shift it back 
(by -302, -1), I see the wrong part of figure in LyX, but it is displayed 
correctly in dvi and ps. That will now be my way to go for this paper.

The same happens if only one coordinate is negative.
%%BoundingBox:  -302   128   899   714
Becomes (0 0 1201 586) in Lyx, manual shifting helps.

There is a change in the trunk regarding negative bb values, so the problem may 
have been fixed already for 2.0.4: 
http://www.lyx.org/trac/changeset/036e0c2a/lyxgit
I hope it is. Could someone check that?

Regards

Matthias




Re: wrong cropping / bounding box in produced .tex (not in pdflatex)

2012-06-10 Thread Matthias Hunstig
Hello,

due to mail server problems I cannot answer to this message directly and
have to use a different address.

>> I am writing a paper with some EPS figures which I have cropped by
>> manually adjusting the bounding boxes. In Lyx and in PDFs created by
>> pdflatex, everything looks fine. But using classic LaTeX (via dvi),
>> the figures are cropped incorrectly. The values specified in LyX
>> equal those found in the TeX code, and that code is the same when
>> exported for "LaTeX (normal)" and for "LaTeX (pdflatex)", for
>> example: \includegraphics[bb=30bp 60bp 1075bp
>> 805bp,clip,width=0.95\textwidth]{filename}

> Are you viewing DVI? If so, is the bounding box correct if you view
> PostScript? I seem to remember that DVI does not handle bounding box
> clipping.

The bounding box is wrong in both dvi, ps, and pdf created by ps2pdf.
Nevertheless, as all the files stem from the dvi, I may be a dvi related
issue.

Matthias


Re: wrong cropping / bounding box in produced .tex (not in pdflatex)

2012-06-09 Thread Jürgen Spitzmüller
2012/6/9 Matthias Hunstig:
> I am writing a paper with some EPS figures which I have cropped by manually 
> adjusting the bounding boxes. In Lyx and in PDFs created by pdflatex, 
> everything looks fine. But using classic LaTeX (via dvi), the figures are 
> cropped incorrectly.
>
> The values specified in LyX equal those found in the TeX code, and that code 
> is the same when exported for "LaTeX (normal)" and for "LaTeX (pdflatex)", 
> for example:
> \includegraphics[bb=30bp 60bp 1075bp 
> 805bp,clip,width=0.95\textwidth]{filename}

Are you viewing DVI? If so, is the bounding box correct if you view
PostScript? I seem to remember that DVI does not handle bounding box
clipping.

Jürgen


wrong cropping / bounding box in produced .tex (not in pdflatex)

2012-06-09 Thread Matthias Hunstig
Dear Lyx users and developers,

I am writing a paper with some EPS figures which I have cropped by manually 
adjusting the bounding boxes. In Lyx and in PDFs created by pdflatex, 
everything looks fine. But using classic LaTeX (via dvi), the figures are 
cropped incorrectly.

The values specified in LyX equal those found in the TeX code, and that code is 
the same when exported for "LaTeX (normal)" and for "LaTeX (pdflatex)", for 
example:
\includegraphics[bb=30bp 60bp 1075bp 805bp,clip,width=0.95\textwidth]{filename}

I am doing something wrong or is that a bug I should submit to the tracker?

Regards

Matthias

Re: "Equation editor" (was Bounding box for pstricks graphics with LyX)

2012-01-18 Thread Guenter Milde
On 2012-01-16, Andrew Parsloe wrote:

> I've now tried your "equation editor/picture cropper" at 
> http://www.lyx.org/trac/ticket/7839 using GSview for postscript and 
> Acroreader for pdf.

> For both template files, EPS.lyx and PDF-cropped.lyx, I had to reduce 
> the \lyxformat from 416 to 413 for them to be accepted by LyX 2.0.2 on 
> my system.

The templates were written with the development version. For the Wiki,
"downgraded" variants that work with the release version would be better,
indeed.

> For both ps and pdf I tried an equation (Pythagoras' theorem, 
> a^2+b^2=c^2) and a pstricks graphic (a labelled right-angled triangle).

> Postscript: in GSview, the equation is cropped just right. That's neat. 
> I like it. The triangle however is cropped too severely, so that the 
> labels for the vertices and two of the sides are largely cropped out of 
> the picture. The cropping is targeted at the geometric stuff as if the 
> text stuff isn't there. 

This seems to be a limitation of ps2eps.
AFAIK, there is an alternative converter that works around this issue.
(But I don't know the details now.)

> PDF: Compiling with pdflatex, which I presume is what is intended, I get 
> an error message in LyX at the cropping stage:

> An error occurred while running: pdfcrop "equation.pdf" "tmpfile.out"

> Looking in the temporary directory shows the aux, log, tex, and 
> tex.dep-pdf files. The log file claims "Output written on equation.pdf" 
> but there is no equation.pdf there.


Strange.

An equation works here.

Just to be sure: do you know that pstricks does not work with pdflatex?

Could you try with a new document and View>Other formats>PDF (pdfcrop)?

If this fails, export an example to PDF and try to crop with pdfcrop on the
command line.

Günter





"Equation editor" (was Bounding box for pstricks graphics with LyX)

2012-01-16 Thread Andrew Parsloe

Hullo Liviu,

I've now tried your "equation editor/picture cropper" at 
http://www.lyx.org/trac/ticket/7839 using GSview for postscript and 
Acroreader for pdf.


For both template files, EPS.lyx and PDF-cropped.lyx, I had to reduce 
the \lyxformat from 416 to 413 for them to be accepted by LyX 2.0.2 on 
my system.


For both ps and pdf I tried an equation (Pythagoras' theorem, 
a^2+b^2=c^2) and a pstricks graphic (a labelled right-angled triangle).


Postscript: in GSview, the equation is cropped just right. That's neat. 
I like it. The triangle however is cropped too severely, so that the 
labels for the vertices and two of the sides are largely cropped out of 
the picture. The cropping is targeted at the geometric stuff as if the 
text stuff isn't there. I used:


\pspicture*(4,3)
%draw the triangle
\pspolygon(.5,.5)(3.5,.5)(.5,2.5)
%draw the right angle
\psline[linewidth=.5pt](.7,.5)(.7,.7)(.5,.7)
%label vertices and sides
\uput{1pt}[0](3.5,.5){A}
\uput{2pt}[90](.5,2.5){B}
\uput{3pt}[180](.5,.5){C}
\uput{2pt}[180](.5,1.5){$a$}
\uput{2pt}[270](2,.5){$b$}
\uput{2pt}[45](2,1.5){$c$}
\endpspicture

in an ERT inset with \usepackage{pstricks} in the preamble of a LyX 
document based on the EPS.lyx template.


PDF: Compiling with pdflatex, which I presume is what is intended, I get 
an error message in LyX at the cropping stage:


An error occurred while running: pdfcrop "equation.pdf" "tmpfile.out"

Looking in the temporary directory shows the aux, log, tex, and 
tex.dep-pdf files. The log file claims "Output written on equation.pdf" 
but there is no equation.pdf there.


Andrew



Re: Bounding box for pstricks graphics with LyX

2012-01-15 Thread Andrew Parsloe

On 15/01/2012 9:24 p.m., Liviu Andronic wrote:

On Sun, Jan 15, 2012 at 9:15 AM, Andrew Parsloe  wrote:


On 15/01/2012 8:51 p.m., Liviu Andronic wrote:


On Sun, Jan 15, 2012 at 8:22 AM, Andrew Parsloe
  wrote:


[1] http://www.lyx.org/trac/ticket/7839



Yes, this looks likely Liviu -- cropped images are what I'm after.
However,
I'll need to wait until 2.0.3(?), not having ventured into the world of
compiling LyX myself (as yet).


You don't need to. This patch is trivial, and you can apply it to your
configure.py (do backup first) without recompiling LyX. Alternatively,
you can simply add the following to your 'preferences' file.

  # FORMATS SECTION ##
  \format "eps" "eps" "EPS" "" "evince" "" "document,vector,menu=export"
  \format "pdf6" "pdf" "PDF (cropped)" "" "evince" ""
"document,menu=export"

  # CONVERTERS SECTION ##
  \converter "dvi" "eps" "dvips -E -o $$o $$i" ""
  \converter "pdf2" "pdf6" "pdfcrop $$i $$o" ""

I meant to include this info on the wiki, but never got around it. I
do hope that this will be included in base LyX in the future. Also,
attached are the template files using 2.0.



Looking at what you've done did remind me
that I had used the -E option in 1.6.10 for dvips (for the DVI ->
  Postscript
file converter), which I had forgotten to do in 2.0.2. Sadly, it made no
difference, not even after a reconfigure.


I guess something isn't properly setup in your conversion chains. You
need to make sure that all the conversion paths are there.

Regards
Liviu


A good start would be to get myself a copy of evince.


No need. Change it for acroread, or whatever you are using on your system.

Liviu



However, taking your hint that something was awry in my setup, I 
restored all the Lyx20 defaults. The problem vanishes.


\usepackage{pstricks}
\usepackage{pst-eps}

in the preamble, and a document consisting only of an ERT inset containing

\begin{TeXtoEPS}
\pspicture*(5,5)

\endpspicture
\end{TeXtoEPS}

now gives a cropped postscript image. My apologies (especially to the 
developers) for the noise.


Andrew


Re: Bounding box for pstricks graphics with LyX

2012-01-14 Thread Liviu Andronic
On Sun, Jan 15, 2012 at 8:22 AM, Andrew Parsloe  wrote:
>> [1] http://www.lyx.org/trac/ticket/7839
>>
>
> Yes, this looks likely Liviu -- cropped images are what I'm after. However,
> I'll need to wait until 2.0.3(?), not having ventured into the world of
> compiling LyX myself (as yet).
>
You don't need to. This patch is trivial, and you can apply it to your
configure.py (do backup first) without recompiling LyX. Alternatively,
you can simply add the following to your 'preferences' file.

 # FORMATS SECTION ##
 \format "eps" "eps" "EPS" "" "evince" "" "document,vector,menu=export"
 \format "pdf6" "pdf" "PDF (cropped)" "" "evince" "" "document,menu=export"

 # CONVERTERS SECTION ##
 \converter "dvi" "eps" "dvips -E -o $$o $$i" ""
 \converter "pdf2" "pdf6" "pdfcrop $$i $$o" ""

I meant to include this info on the wiki, but never got around it. I
do hope that this will be included in base LyX in the future. Also,
attached are the template files using 2.0.


> Looking at what you've done did remind me
> that I had used the -E option in 1.6.10 for dvips (for the DVI -> Postscript
> file converter), which I had forgotten to do in 2.0.2. Sadly, it made no
> difference, not even after a reconfigure.
>
I guess something isn't properly setup in your conversion chains. You
need to make sure that all the conversion paths are there.

Regards
Liviu


> Regards
> Andrew



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


EPS.20.lyx
Description: Binary data


PDF-cropped_1.20.lyx
Description: Binary data


\url{}: Bad bounding box in Type 3 glyph

2009-04-27 Thread Rich Shepard

  I'm using the \url package and when I display a page with xpdf with
several URLs on it, I get the console message, Error: Bad bounding box in
Type 3 glyph.

  Is this due to an outdated package, or something else?

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517  Fax: 503-667-8863


Re: PS file, orientation and bounding box

2008-10-01 Thread Abdelrazak Younes

On 01/10/2008 12:16, Manveru wrote:

2008/9/30 Abdelrazak Younes<[EMAIL PROTECTED]>:
   

Should I fill a bugzilla as nobody replies about this?
   

Yes, with test documents so that we can reproduce the issues. One entry per
bug please.
 


First problem reported here is filled:
http://bugzilla.lyx.org/show_bug.cgi?id=5302

For second I need to reconfigure SVG support with Inkscape in LyX on
my [EMAIL PROTECTED] or do it from home.

Hope to be repaired soon.
   

OK, thanks.

Abdel.




Re: PS file, orientation and bounding box

2008-10-01 Thread Manveru
2008/9/30 Abdelrazak Younes <[EMAIL PROTECTED]>:
>
>
> On 30/09/2008 09:34, Manveru wrote:
>>
>> 2008/9/27 Manveru<[EMAIL PROTECTED]>:
>>>
>>> 2008/9/27 Manveru<[EMAIL PROTECTED]>:
>>>>
>>>> Hello,
>>>>
>>>> I have a problem with Postscript file which I would like to include as
>>>> a vector graphics in LyX document. The problem I have is that
>>>> orientation of PS is landscape, but preview images shown in LyX are
>>>> portrait. This causes a lot of problems with settings of bounding box
>>>> (I have to set it up manually, as these files are exported from KiCad
>>>> and I do not want to edit them).
>>>>
>>>> Additional problem, but much less related to LyX is importing SVG
>>>> files through Inkscape. Settings of bounding box for preview image
>>>> does not reflect real clipping in generated PDF file.
>>>>
>>>> All is related to LyX 1.5.4 on Windows XP. Was there any improvements
>>>> in versions up to 1.5.6 which may help with two issues described
>>>> above?
>>>
>>> I do not see any difference as I upgraded to LyX 1.5.6. So it looks like
>>> bugs.
>>
>> Should I fill a bugzilla as nobody replies about this?
>
> Yes, with test documents so that we can reproduce the issues. One entry per
> bug please.

First problem reported here is filled:
http://bugzilla.lyx.org/show_bug.cgi?id=5302

For second I need to reconfigure SVG support with Inkscape in LyX on
my [EMAIL PROTECTED] or do it from home.

Hope to be repaired soon.
-- 
Manveru
jabber: [EMAIL PROTECTED]
 gg: 1624001
   http://www.manveru.pl


Re: PS file, orientation and bounding box

2008-09-30 Thread Abdelrazak Younes

On 30/09/2008 09:34, Manveru wrote:

2008/9/27 Manveru<[EMAIL PROTECTED]>:

2008/9/27 Manveru<[EMAIL PROTECTED]>:

Hello,

I have a problem with Postscript file which I would like to include as
a vector graphics in LyX document. The problem I have is that
orientation of PS is landscape, but preview images shown in LyX are
portrait. This causes a lot of problems with settings of bounding box
(I have to set it up manually, as these files are exported from KiCad
and I do not want to edit them).

Additional problem, but much less related to LyX is importing SVG
files through Inkscape. Settings of bounding box for preview image
does not reflect real clipping in generated PDF file.

All is related to LyX 1.5.4 on Windows XP. Was there any improvements
in versions up to 1.5.6 which may help with two issues described
above?

I do not see any difference as I upgraded to LyX 1.5.6. So it looks like bugs.


Should I fill a bugzilla as nobody replies about this?


Yes, with test documents so that we can reproduce the issues. One entry 
per bug please.


Abdel.



Re: PS file, orientation and bounding box

2008-09-30 Thread Manveru
2008/9/27 Manveru <[EMAIL PROTECTED]>:
> 2008/9/27 Manveru <[EMAIL PROTECTED]>:
>> Hello,
>>
>> I have a problem with Postscript file which I would like to include as
>> a vector graphics in LyX document. The problem I have is that
>> orientation of PS is landscape, but preview images shown in LyX are
>> portrait. This causes a lot of problems with settings of bounding box
>> (I have to set it up manually, as these files are exported from KiCad
>> and I do not want to edit them).
>>
>> Additional problem, but much less related to LyX is importing SVG
>> files through Inkscape. Settings of bounding box for preview image
>> does not reflect real clipping in generated PDF file.
>>
>> All is related to LyX 1.5.4 on Windows XP. Was there any improvements
>> in versions up to 1.5.6 which may help with two issues described
>> above?
>
> I do not see any difference as I upgraded to LyX 1.5.6. So it looks like bugs.

Should I fill a bugzilla as nobody replies about this?

-- 
Manveru
jabber: [EMAIL PROTECTED]
 gg: 1624001
   http://www.manveru.pl


Re: PS file, orientation and bounding box

2008-09-27 Thread Manveru
2008/9/27 Manveru <[EMAIL PROTECTED]>:
> Hello,
>
> I have a problem with Postscript file which I would like to include as
> a vector graphics in LyX document. The problem I have is that
> orientation of PS is landscape, but preview images shown in LyX are
> portrait. This causes a lot of problems with settings of bounding box
> (I have to set it up manually, as these files are exported from KiCad
> and I do not want to edit them).
>
> Additional problem, but much less related to LyX is importing SVG
> files through Inkscape. Settings of bounding box for preview image
> does not reflect real clipping in generated PDF file.
>
> All is related to LyX 1.5.4 on Windows XP. Was there any improvements
> in versions up to 1.5.6 which may help with two issues described
> above?

I do not see any difference as I upgraded to LyX 1.5.6. So it looks like bugs.


-- 
Manveru
jabber: [EMAIL PROTECTED]
 gg: 1624001
   http://www.manveru.pl


PS file, orientation and bounding box

2008-09-27 Thread Manveru
Hello,

I have a problem with Postscript file which I would like to include as
a vector graphics in LyX document. The problem I have is that
orientation of PS is landscape, but preview images shown in LyX are
portrait. This causes a lot of problems with settings of bounding box
(I have to set it up manually, as these files are exported from KiCad
and I do not want to edit them).

Additional problem, but much less related to LyX is importing SVG
files through Inkscape. Settings of bounding box for preview image
does not reflect real clipping in generated PDF file.

All is related to LyX 1.5.4 on Windows XP. Was there any improvements
in versions up to 1.5.6 which may help with two issues described
above?

-- 
Manveru
jabber: [EMAIL PROTECTED]
 gg: 1624001
   http://www.manveru.pl


Re: Bounding box problem (not caused by LyX but ghostscript)

2008-07-06 Thread Tom Schlangen
Dear Olivier,

> The dummy.eps image you provided contains some text and a frame, at 
> least that's the only thing I see in gsview and Corel Draw.

Well, it was just a dummy file to demonstrate the bounding box problem. You are 
right, this will not show the other problem that turned up when drawing actual 
schematics and trying to give them usable and correctly displayed bounding 
boxes in LyX perusing this approach (using a windows batch script):

C:\Programme\gs\gs8.54\bin\gswin32c.exe -dBATCH -dNOPAUSE -dEPSCrop 
-sDEVICE=epswrite -sOutputFile=%2 %1

which renders catastrophic results quality. I tried it with adding the -r 
switch and values up to about 6000, which did improve, but not to the quality I 
was accustomed to using the bbget script and old ESP version ghostscript. And 
values for switch -r somewhat above 6000 cannot be rendered by the YAP anymore 


In the end I made a "brute force" attack to the problem: I bought me a second 
hand harddisk for my old notebook (the HD can be changed within seconds) and 
reinstalled a stone age Debian Sarge including stone age ESP ghostscript 
V7.70.x on it. Using this proven setup - only to convert the EPS files with the 
bbget script and a similar one for mass-conversions - I get perfectly rendering 
printable output as well as perfectly displayed pictures in LyX again :-)

While this may sound like a primitive and brute approach to the problem, it 
does the job and I can concentrate on actual writing on my book using LyX again.

Maybe I will re-analyse the problem somewhen, comparing actual outputs of 
different bounding box fixing methods using a text- or binary-based diff 
program, but at the moment I am just happy to be able to continue with my book.

Regards and thank you again for your patience, suggestions and help,

Tom Schlangen

-- 
mailto:[EMAIL PROTECTED]



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-30 Thread Olivier Ripoll

Tom Schlangen wrote:

Dear Olivier,


I did the following in Windows (one line, mail agent may wrap it):
gswin32c -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite 
-sOutputFile=dummy2.eps dummy.eps



I tried this, but ...



The resulting image displays fine in LyX with or without the
clipping options



While this is true regarding the bounding box problem, the
resulting picture quality I get (LyX display and printout) is very
poor compared to the other method I used so far. I am using AFPL
Ghostscript V8.54, because it is installed on the Windows machine anyway.



I will try some younger Windows versions of ghostscript tomorrow and report 
back.


This morning I tried the GPL GS V8.61 windows binary using your suggested 
method too, sadly also giving bad quality/resolution results.

Any suggestion to improve the output quality?

Regards,

Tom Schlangen



Sorry for not having answered before, I was away from internet.
The dummy.eps image you provided contains some text and a frame, at 
least that's the only thing I see in gsview and Corel Draw. It is 
vectorial. The dummy2.eps generated by gs 8.62 on Windows is also a 
vectorial image (much smaller, probably because the font is not embedded 
any more). So, the result is resolution-independent: Even if I zoom a 
lot, I do not see any resolution problem in the resulting dummy2.eps.

So can you describe what you mean by "bad quality"?

Here is the output I have from the command line when converting the 
dummy.eps using gs 8.62 on Windows XP:


GPL Ghostscript 8.62 (2008-02-29)
Copyright (C) 2008 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusMonL-Regu font from C:\Program 
Files\gs\fonts/n022003l.pfb... 2566848 1084635 13472696 12176047 2 done.


Wild guess: the difference could come from the font. Do you have the 
same message ?

There is one switch related to the fonts: -dNOPLATFONTS
Perhaps it could help...
gs 8.62 changelog specifically mentions some changes in font location. 
So perhaps you should try 8.62 on Windows(*).
http://ghostscript.com/doc/current/Fonts.htm also mentions the following 
(section6):
"If you don't seem to be getting nice characters on the screen under MS 
Windows, you can try adding aliases to Fontmap, according to the 
documentation you'll find in there."


Best regards,

Olivier

(*)Not easy to find from the website, the latest ghostscript can be 
found at:

http://sourceforge.net/projects/ghostscript/



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-29 Thread Tom Schlangen
Dear LyX users,

I would like to thank all of you who helped to partly solve the problem.

For now, I will use one of the workarounds that will produce correctly 
printable ps or pdf output (after all, that´s most most important) and just 
ignore the ugly view in the LyX GUI/Editor.

I don´t know what´s the real cause that lets LyX display included eps pictures 
uncropped/unclipped, maybe it is ImageMagick, maybe it is LyX itself. At least 
the problems I encountered were reproducible by others.

If someone is able to track the (display-) problem down to LyX, I would suggest 
this person to file a bug report for that problem. I offer to supply suitable 
.eps files to demonstrate the problem.

The display problem is present in both Win and Linux LyX versions
and can be reliably demostrated using:

* WindowsXP: Lyx V1.55-1, gs 8.62 (and lots of others), and current
  Imagemagick installed as per LyX bundle installer (and many others)
  and MikTex 2.7

* Linux: Debian lenny, LyX 1.55, gs 8.62, Imagemagik 7:6.3.7.9 and
  current TexLive. (Note, all versions used as available from
  current Debian lenny repository)

Regards,

Tom
-- 



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-29 Thread Tom Schlangen
Dear Nicolás,

> Tom, you can specify the resolution with -r300 (that's the maximun)

Sorry, but that renders eps files with about 1/2 the size and horrible looking 
results. Trying -r4000 gives about the same filesize, but still horrible 
looking.

> You may find this interesting:
> http://wiki.ljackson.us/EPS_Optimization#Convert_.26_CleanUp_EPS

I will have a look, thank you for the link!

Regards,

Tom Schlangen

-- 



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-29 Thread Nicolás

Tom, you can specify the resolution with -r300 (that's the maximun)

You may also consider embedding the fonts with: -dEmbeddAllFonts=true 
-dSubsetFonts=true

You may find this interesting:

http://wiki.ljackson.us/EPS_Optimization#Convert_.26_CleanUp_EPS

Nicolás

Tom Schlangen wrote:

Dear Olivier,


I did the following in Windows (one line, mail agent may wrap it):
gswin32c -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite 
-sOutputFile=dummy2.eps dummy.eps



I tried this, but ...



The resulting image displays fine in LyX with or without the
clipping options



While this is true regarding the bounding box problem, the
resulting picture quality I get (LyX display and printout) is very
poor compared to the other method I used so far. I am using AFPL
Ghostscript V8.54, because it is installed on the Windows machine anyway.



I will try some younger Windows versions of ghostscript tomorrow and report 
back.


This morning I tried the GPL GS V8.61 windows binary using your suggested 
method too, sadly also giving bad quality/resolution results.

Any suggestion to improve the output quality?

Regards,

Tom Schlangen





Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-28 Thread Tom Schlangen
Dear Olivier,

>> I did the following in Windows (one line, mail agent may wrap it):
>> gswin32c -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite 
>> -sOutputFile=dummy2.eps dummy.eps

> I tried this, but ...

>> The resulting image displays fine in LyX with or without the
>> clipping options

> While this is true regarding the bounding box problem, the
> resulting picture quality I get (LyX display and printout) is very
> poor compared to the other method I used so far. I am using AFPL
> Ghostscript V8.54, because it is installed on the Windows machine anyway.

> I will try some younger Windows versions of ghostscript tomorrow and report 
> back.

This morning I tried the GPL GS V8.61 windows binary using your suggested 
method too, sadly also giving bad quality/resolution results.

Any suggestion to improve the output quality?

Regards,

Tom Schlangen

-- 



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-28 Thread Tom Schlangen
Dear Olivier,

thank you very much for your extensive answer!

> Now, I do not really understand why you need such a
> complex workflow. Why do you need to go in Linux ?

That´s just because so far I didn´t know better how to deal with bounding boxes 
- and I have a Linux machine running anyway.

> I did the following in Windows (one line, mail agent may wrap it):
> gswin32c -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite 
> -sOutputFile=dummy2.eps dummy.eps

I tried this, but ...

> The resulting image displays fine in LyX with or without the
> clipping options

While this is true regarding the bounding box problem, the resulting picture 
quality I get (LyX display and printout) is very poor compared to the other 
method I used so far. I am using AFPL Ghostscript V8.54, because it is 
installed on the Windows machine anyway.

I will try some younger Windows versions of ghostscript tomorrow and report 
back.

Maybe there are additional parameters that could be passed to gswin32c.exe to 
improve the picture quality?

Thank you again,

Tom Schlangen

-- 
mailto:[EMAIL PROTECTED]



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-27 Thread Nicolás
Well, it seems that I have a lucky configuration/installation in my machine. As I already said, I have LyX 1.5.5, 
ImageMagick-6.2.7-Q16, AFPL Ghostscript 8.14 and GSview 4.6, Miktex 2.7 and Acrobat Reader 7.
For me, all images except dummy_bbget_gs862.eps (which GsView reports errors when trying to open it) are correctly visualized in LyX 
and in pdf, with and w/o the clipping option selected.


Could someone explain what LyX really does when the cclipping option is 
selected?

Nicolás

Olivier Ripoll wrote:

Hi,

I tried your eps files in LyX 1.6 beta3 under windows XP. I use Adobe 
reader 8 for pdf (generated by pdflatex IIRC) and gsview 4.9 / 
ghostscript 8.62 for postscript viewing.
It does work better for me that for you it seems (you may suffer from an 
outdated/buggy imagemagick). I tried the images without checking the 
option to clip to the bounding box, and with it (ion that case, also 
with clicking on the button to get the size from the file).


Tom Schlangen wrote:
Okay, I have prepared some files to illustrate the problem, so other 
have a chance to verify.
Output from bbget, using esp-gs v7.70.x: 
http://www.ines.mynetcologne.de/dummy_bbget_espgs770.eps (64k) (works!)


displays fine in LyX with or without the clipping options
pdf/ps/dvi output is fine


Output from bbget, using gs v8.62:
http://www.ines.mynetcologne.de/dummy_bbget_gs862.eps (64k) (doesn´t 
work)


gsview 4.9 cannot even open this file... it reports errors.
displays wrong in LyX with and without the clipping options. LyX cannot 
actually read the bounding box at all.
does not display in pdf (blank pages), result in errors in gsview and 
dvi viewer.


Output from gsview v4.7, using option PS to EPS, also checkmarked 
"Automatically calculate Baounding Box". BTW, using gsview v4.9 gives 
the same result.

http://www.ines.mynetcologne.de/dummy_gsview47.eps (64k) (doesn´t work)

displays wrong (full page) in LyX with or without the clipping options
pdf/ps/dvi is fine though

Output from ps2eps v1.64 utility, parameters as suggested by 
http://www.tm.uka.de/~bless/ps2eps.html:

http://www.ines.mynetcologne.de/dummy_ps2eps164.eps (64k) (doesn´t work)
displays wrong (full page) in LyX without the clipping options and fine 
with it.

ps/dvi are correct
pdf is correct without the clipping option, but the figure is missing 
when using the clipping option (yep... it works without and _not_ with).


Now, I do not really understand why you need such a complex workflow. 
Why do you need to go in Linux ?

I did the following in Windows (one line, mail agent may wrap it):

gswin32c -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite 
-sOutputFile=dummy2.eps dummy.eps


(You need to have gs in your path)

The resulting image displays fine in LyX with or without the clipping 
options, and ps/pdf/dvi is fine also.


So my conclusion is : don't care about what LyX displays, care about the 
final result, and most encapsulated postscripts (eps) are fine there.

And also, use ghostscript 8.62 on windows.


Regards,

Tom Schlangen


Regards,

Olivier

PS: personally, I use pdf instead of eps: it takes less disc space, you 
can edit easily with inkscape, everyone can view them, and last but not 
least, it is the base format for pdf(La)TeX which is nicer (pdf bookmarks).







Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-26 Thread Olivier Ripoll

Hi,

I tried your eps files in LyX 1.6 beta3 under windows XP. I use Adobe 
reader 8 for pdf (generated by pdflatex IIRC) and gsview 4.9 / 
ghostscript 8.62 for postscript viewing.
It does work better for me that for you it seems (you may suffer from an 
outdated/buggy imagemagick). I tried the images without checking the 
option to clip to the bounding box, and with it (ion that case, also 
with clicking on the button to get the size from the file).


Tom Schlangen wrote:

Okay, I have prepared some files to illustrate the problem, so other have a 
chance to verify.
Output from bbget, using esp-gs v7.70.x: 
http://www.ines.mynetcologne.de/dummy_bbget_espgs770.eps (64k) (works!)


displays fine in LyX with or without the clipping options
pdf/ps/dvi output is fine


Output from bbget, using gs v8.62:
http://www.ines.mynetcologne.de/dummy_bbget_gs862.eps (64k) (doesn´t work)


gsview 4.9 cannot even open this file... it reports errors.
displays wrong in LyX with and without the clipping options. LyX cannot 
actually read the bounding box at all.
does not display in pdf (blank pages), result in errors in gsview and 
dvi viewer.



Output from gsview v4.7, using option PS to EPS, also checkmarked "Automatically 
calculate Baounding Box". BTW, using gsview v4.9 gives the same result.
http://www.ines.mynetcologne.de/dummy_gsview47.eps (64k) (doesn´t work)

displays wrong (full page) in LyX with or without the clipping options
pdf/ps/dvi is fine though


Output from ps2eps v1.64 utility, parameters as suggested by 
http://www.tm.uka.de/~bless/ps2eps.html:
http://www.ines.mynetcologne.de/dummy_ps2eps164.eps (64k) (doesn´t work)
displays wrong (full page) in LyX without the clipping options and fine 
with it.

ps/dvi are correct
pdf is correct without the clipping option, but the figure is missing 
when using the clipping option (yep... it works without and _not_ with).


Now, I do not really understand why you need such a complex workflow. 
Why do you need to go in Linux ?

I did the following in Windows (one line, mail agent may wrap it):

gswin32c -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=epswrite 
-sOutputFile=dummy2.eps dummy.eps


(You need to have gs in your path)

The resulting image displays fine in LyX with or without the clipping 
options, and ps/pdf/dvi is fine also.


So my conclusion is : don't care about what LyX displays, care about the 
final result, and most encapsulated postscripts (eps) are fine there.

And also, use ghostscript 8.62 on windows.


Regards,

Tom Schlangen


Regards,

Olivier

PS: personally, I use pdf instead of eps: it takes less disc space, you 
can edit easily with inkscape, everyone can view them, and last but not 
least, it is the base format for pdf(La)TeX which is nicer (pdf bookmarks).




Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-25 Thread Nicolás
Do you mean that when the eps is displayed in LyX is not clipped, as it would happen if it was opened with Gsview? In my machine I can 
see the clipped figure both in LyX and in the generated pdf/ps/dvi.

I have LyX 1.5.5, ImageMagick-6.2.7-Q16, AFPL Ghostscript 8.14 and GSview 4.6.

Nicolás


Mukhtar Ullah wrote:

Dear Tom,
I checked your figures in LyX and could verify your problem. It seems that
imagemagick is culprit. I converted your eps files to pdf and included that in
LyX. That was shown perfectly clipped. So you could consider switchin gto
pdflatex, converting all your eps files by a script using epstopdf command from
MiKTeX. That, ofcourse, will only be possible if you are not using pstricks.

Mukhtar






Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-25 Thread Mukhtar Ullah
Dear Tom,
I checked your figures in LyX and could verify your problem. It seems that
imagemagick is culprit. I converted your eps files to pdf and included that in
LyX. That was shown perfectly clipped. So you could consider switchin gto
pdflatex, converting all your eps files by a script using epstopdf command from
MiKTeX. That, ofcourse, will only be possible if you are not using pstricks.

Mukhtar



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-25 Thread Tom Schlangen
Dear Nicolás,

> Now, regarding your eps files, are the last two or three eps files
> really useless? I can see that the only difference with the ok file 
> is that their bounding box is one point bigger in both th evertical
> and horizontal dimensions. Is that really a problem?

Good point - I must admit I didn´t check DVI output (which is correct) before, 
because it looks wrong already in the LyX GUI editor - both my installed 
Windows and Linux LyX versions (V1.55 for both OS) still show the wide border 
around the bounding box in the LyX GUI/Editor for both files. That is not a big 
Problem, but just a nuisance in the LyX GUI editor - which is not the case when 
bounding boxes are computed by the bbget/ESP-gs combo.

Now I am wondering who is the transgressor regarding the wrong display (with 
white borders): ImageMagick or LyX itself?

Anyway, thank you for the workaround regarding the old ghostscript version and 
let´s hope the LyX GUI display problem will be solved soon.

Regards,

Tom Schlangen

-- 



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-25 Thread Nicolás
I you select the "Clip to bounding box" option and get the bounding box from the file, the result will be the same as if you simply do 
not select the "Clip to bounding box" option (in my experience, at least).
Now, regarding your eps files, are the last two or three eps files really useless? I can see that the only difference with the ok file 
is that their bounding box is one point bigger in both th evertical and horizontal dimensions. Is that really a problem? What you get 
is a white frame of less than 1mm of thickness, and since I assume your paper is white... no one will notice such fame! Just my opinion.


Cheers,
Nicolás

Tom Schlangen wrote:

Okay, I have prepared some files to illustrate the problem, so other have a 
chance to verify.

.EPS output file of the circuit drawing program I use:

http://www.ines.mynetcologne.de/dummy.eps (64k)

bbget script from http://silas.psfc.mit.edu/elec_fig/ :

http://www.ines.mynetcologne.de/bbget 


Output from bbget, using esp-gs v7.70.x:

http://www.ines.mynetcologne.de/dummy_bbget_espgs770.eps (64k) (works!)

Output from bbget, using gs v8.62:

http://www.ines.mynetcologne.de/dummy_bbget_gs862.eps (64k) (doesn´t work)

Output from gsview v4.7, using option PS to EPS, also checkmarked "Automatically 
calculate Baounding Box". BTW, using gsview v4.9 gives the same result.

http://www.ines.mynetcologne.de/dummy_gsview47.eps (64k) (doesn´t work)

Output from ps2eps v1.64 utility, parameters as suggested by 
http://www.tm.uka.de/~bless/ps2eps.html:

http://www.ines.mynetcologne.de/dummy_ps2eps164.eps (64k) (doesn´t work)

Just import those example eps files 


   dummy_bbget_espgs770.eps (64k) (works!)
   dummy_bbget_gs862.eps (64k) (doesn´t work)
   dummy_gsview47.eps (64k) (doesn´t work)
   dummy_ps2eps164.eps (64k) (doesn´t work)
   
to LyX always using the "Clip to bounding box" and "Read from file" options in the dialog, and have a look at the output. You will see the only file giving correct clipping is the one with the bounding box values generated by bbget and an old, discontinued ESP ghostscript version.


Now, everybody can say "that is not a problem of LyX", but on the other hand, 
the LyX image import dialogue is left pretty useless if there is only some certain 
script/program combination being able to generate bounding boxes that LyX is able to deal 
with?

Regards,

Tom Schlangen




Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-25 Thread Tom Schlangen
Okay, I have prepared some files to illustrate the problem, so other have a 
chance to verify.

.EPS output file of the circuit drawing program I use:

http://www.ines.mynetcologne.de/dummy.eps (64k)

bbget script from http://silas.psfc.mit.edu/elec_fig/ :

http://www.ines.mynetcologne.de/bbget 

Output from bbget, using esp-gs v7.70.x:

http://www.ines.mynetcologne.de/dummy_bbget_espgs770.eps (64k) (works!)

Output from bbget, using gs v8.62:

http://www.ines.mynetcologne.de/dummy_bbget_gs862.eps (64k) (doesn´t work)

Output from gsview v4.7, using option PS to EPS, also checkmarked 
"Automatically calculate Baounding Box". BTW, using gsview v4.9 gives the same 
result.

http://www.ines.mynetcologne.de/dummy_gsview47.eps (64k) (doesn´t work)

Output from ps2eps v1.64 utility, parameters as suggested by 
http://www.tm.uka.de/~bless/ps2eps.html:

http://www.ines.mynetcologne.de/dummy_ps2eps164.eps (64k) (doesn´t work)

Just import those example eps files 

   dummy_bbget_espgs770.eps (64k) (works!)
   dummy_bbget_gs862.eps (64k) (doesn´t work)
   dummy_gsview47.eps (64k) (doesn´t work)
   dummy_ps2eps164.eps (64k) (doesn´t work)
   
to LyX always using the "Clip to bounding box" and "Read from file" options in 
the dialog, and have a look at the output. You will see the only file giving 
correct clipping is the one with the bounding box values generated by bbget and 
an old, discontinued ESP ghostscript version.

Now, everybody can say "that is not a problem of LyX", but on the other hand, 
the LyX image import dialogue is left pretty useless if there is only some 
certain script/program combination being able to generate bounding boxes that 
LyX is able to deal with?

Regards,

Tom Schlangen
-- 



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-24 Thread Tom Schlangen

Dear Mukhtar,

> Since I have got a working ps2eps, you could send me
> one example eps file so

Thank you for offering! Meanwhile I tested ps2eps V1.64 myself. While it 
calculates the bounding box exactly (great!) the clipping to bounding box 
option as per the Lyx dialogue doesn´t work correctly anymore: While the bbox 
values can be read from the file by Lyx, the picture doesn´t get clipped to the 
tile but the whole page is shown.

I am really stuck with this problem 

Tom Schlangen
-- 



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Mukhtar
In continuation with my last post...
Since I have got a working ps2eps, you could send me one example eps file so
that I can check if it works.

Mukhtar



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Mukhtar
Tom Schlangen <[EMAIL PROTECTED]> writes:

> 
> Dear Mukhtar,
> 
> to clarify the problem at hand:
> 
> 1. I do have .eps files already (generated by a circuit drawing program plus
an .eps driver),
> 
> 2. but they contain bounding box information that relates to the _page_ size,
not the actual drawing _tile_ size
> 
> 3. the usual method to import something like this into LyX is to render the
.eps using ghostscript to get the
> actual drawing _tile_ size bounding box values and having that information
written back to the .eps file,
> then import it to LyX using the "get bounding box from file" option.
> 
> Now, with broken ghostscript giving back wrong tile size bounding box
information when rendering because
> of a bug as it unfortunately seems to be the case with current versions >=
8.60, an alternate method to get
> the correct _tile_ size bounding box information (without broken ghostscripz)
would be of great help to
> import those .eps drawings into LyX.
> 
> As I see it, your suggestions of using eps2eps and ps2eps wouldn´t help with
this problem.
> 
> Unfortunately, most tools dealing with bounding box information within an .eps
or ps file depend on
> working but not broken ghostscript, because most of them only are "wrappers"
around ghostscript to make
> it somewhat user friendly.
> 
> Actually, the "bbget" utility I used so far and pointed to in my first article
on this problem is just such
> "wrapper", depending on a not-broken ghostscript to do its work.
> 
> Kind regards,
> 
> Tom Schlangen
> 

Dear Tom,
The tool ps2eps I suggested has its own bbox.exe which claims to be compute the
correct bounding box (without using ghostscript). That is why I suggest that is
worth a try. The ps2eps by default uses its own bbox, however you can force it
to use ghostscript by an option.

Best wishes,

Mukhtar






Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Tom Schlangen
Dear Mukhtar,

to clarify the problem at hand:

1. I do have .eps files already (generated by a circuit drawing program plus an 
.eps driver),

2. but they contain bounding box information that relates to the _page_ size, 
not the actual drawing _tile_ size

3. the usual method to import something like this into LyX is to render the 
.eps using ghostscript to get the actual drawing _tile_ size bounding box 
values and having that information written back to the .eps file, then import 
it to LyX using the "get bounding box from file" option.

Now, with broken ghostscript giving back wrong tile size bounding box 
information when rendering because of a bug as it unfortunately seems to be the 
case with current versions >= 8.60, an alternate method to get the correct 
_tile_ size bounding box information (without broken ghostscripz) would be of 
great help to import those .eps drawings into LyX.

As I see it, your suggestions of using eps2eps and ps2eps wouldn´t help with 
this problem.

Unfortunately, most tools dealing with bounding box information within an .eps 
or ps file depend on working but not broken ghostscript, because most of them 
only are "wrappers" around ghostscript to make it somewhat user friendly.

Actually, the "bbget" utility I used so far and pointed to in my first article 
on this problem is just such "wrapper", depending on a not-broken ghostscript 
to do its work.

Kind regards,

Tom Schlangen

-- 
mailto:[EMAIL PROTECTED]



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Mukhtar
Tom Schlangen <[EMAIL PROTECTED]> writes:

> 
> Dear Mukhtar,
> 
> > If you are using MiKTeX (which is most likely), then you can use
> > eps2eps with -dNOCACHE option like this:
> > eps2eps -dNOCACHE input.eps output.eps
> > This will convert all the fonts to outlines.
> 
> Maybe, but unfortunately it does not compute any bounding box values around
the actual picture tile within
> a page - that is what I am looking for.
> 
> Thank you very much,
> 
> Tom Schlangen


Dear Tom,
Then you can try the ps2eps on http://www.tm.uka.de/~bless/ps2eps which also has
its own bbox executable. Maybe that can compute the correct bounding box for 
you.

Best regards,

Mukhtar



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Tom Schlangen
Dear Mukhtar,

> If you are using MiKTeX (which is most likely), then you can use
> eps2eps with -dNOCACHE option like this:
> eps2eps -dNOCACHE input.eps output.eps
> This will convert all the fonts to outlines.

Maybe, but unfortunately it does not compute any bounding box values around the 
actual picture tile within a page - that is what I am looking for.

Thank you very much,

Tom Schlangen
-- 



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Tom Schlangen
Some further digging the 'net for related information reveals that several 
quite current ghostscript (GS-GPL and other) versions beginning with V8.60 show 
bbox related bugs :-(

Any other idea/method _not_ using ghostscript to crop the white "frame" from 
the actual information in an .eps file to be imported to LyX?

Regards,

Tom Schlangen

-- 
mailto:[EMAIL PROTECTED]



Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Mukhtar
Tom Schlangen,
If you are using MiKTeX (which is most likely), then you can use eps2eps with
-dNOCACHE option like this:
eps2eps -dNOCACHE input.eps output.eps
This will convert all the fonts to outlines. If you don't want that, then a
better option is to use ps2eps on the link http://www.tm.uka.de/~bless/ps2eps
which requires perl.

Mukhtar






Re: Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Tom Schlangen
Hmmm, searching the 'net for the problem, the need of generating new bounding 
boxes to exclude the excessive white "frame" around the actual picture in an 
.eps file seems to be rather common.

What about a new/additional LyX graphics menue/dialog option, like "Auto 
bounding box", means, having the bbget script functionality integrated (and 
working) in the LyX GUI somehow?

Regards,

Tom Schlangen

-- 
mailto:[EMAIL PROTECTED]



Bounding box problem (not caused by LyX but ghostscript)

2008-06-17 Thread Tom Schlangen
Hello Lyx Users,

first of all I have to apologize for asking here about a problem not caused by 
LyX itself, but at least it is related since I am writing a rather extensive 
technical book using LyX (several hundred pages done already) which contains a 
lot of schematics/.eps files imported to LyX, so I hope I am not too off topic 
and someone hopefully can help me out.

I generate those schematics from a circuit drawing program as .eps (extended 
postscript) files. Sadly that drawing program cannot generate bounding box 
information suitable for the LyX graphics import  "cut to boundig box" 
dialogue, so I have to run those .eps files through the "bbget" script which is 
described here: http://silas.psfc.mit.edu/elec_fig/ (BTW, I tried to contact 
Mr. Hutcchinson on the problem, but sadly didn´t succeed to get an answer so 
far).

Using ESP ghostscript V7.07.1 as present/used in (old) Debian V3.1r2, 
everything works fine, the bounding box information is generated correctly, for 
example with a result like:

   60 214 348 379

Now, that certain old ESP ghostscript version is not present with many 
current/modern Linux versions, but usually and likely you will find GPL 
ghostscript V8.62 instead. Sadly, this current ghostview version extracts 
different numbers for the bounding box than the old version, using the same 
input file:

   63 214 342 377

which is a smaller box, which in turn cuts small parts off the 
schematic/.eps-file to be imported by LyX :-(

There might be several solutions to this problem:

1) manually changing/upping the bounding box values in the LyX bounding box 
dialogue, which is cumbersome
2) trying to get the old ESP ghostscript to port/run somehow on current Linux 
distributions together with the bbget script
3) finding a functional alternative to the bbget + ghostview method of 
generating bounding box information for .eps files

Especially 3) would be of high interest to me concearning the LyX Windows 
version I do the most work with, because the current process of:

- drawing schematics using a Windows program, exporting to .eps
- moving the .eps to a Linux machine to run the bbget utility
- moving the changed .eps back to a Windows machine to be imported to LyX 
(Windows version)

is a really cumbersome workflow to do with lots of dozens of .eps file.

So, ideally I would be looking for a Windows based method to replace the 
bbget/ghostscript stuff, also getting correct bounding boxes again. The second 
choice would be to get the bbget script working again with current GPL 
ghostscript version.

Any ideas/help appreciated, and sorry again for being only slightly LyX-related 
...

Regards,

   Tom Schlangen

-- 



Re: Bounding box on OpenOffice PDFs

2007-03-31 Thread Daniel Lohmann

John Pye schrieb:

Point is that it doesn't NEED cropping. If I open the file in Evince, it
correctly shows the image not needing cropping. I have got to pains to
change the page size in OpenOffice to just that which is requred. The
point is that LyX is not detecting the BoundingBox correctly from the
file, AFAICT.


It is good to hear from Uwe, that his problem is going to be fixed in 1.5.

However, in the meantime (or as alternative) I can really recommend to 
export to EPS from OpenOffice. If you check the "Selected Objects" option 
in the export dialog, OO saves the EPS with bounding box. LyX transparently 
converts the EPS files to PDF if using pdflatex. The quality by no means 
worse than with embedding native PDF.


(There is one exception, though: Transparencies are not well supported by 
EPS. If using pdflatex as back-end, images with transparencies should be 
directly exported to PDF.)



Daniel


Re: Bounding box on OpenOffice PDFs

2007-03-31 Thread Uwe Stöhr

John Pye schrieb:


Any time I export a 'Draw' page from OpenOffice as a PDF, and then try
to import it with LyX, LyX fails to correctly find the Bounding Box.


There was a bug in ImageMagicvk that LyX uses for this - this has been fixed in recent ImageMagick 
versions.
There was also a missing parameter when LyX calls ImageMagick to process PDFs - this has been fixed 
for the upcoming LyX 1.5.0.


regards Uwe


Re: Bounding box on OpenOffice PDFs

2007-03-31 Thread John Pye
Point is that it doesn't NEED cropping. If I open the file in Evince, it
correctly shows the image not needing cropping. I have got to pains to
change the page size in OpenOffice to just that which is requred. The
point is that LyX is not detecting the BoundingBox correctly from the
file, AFAICT.

I can send a sample file if you wish.

JP

Paul Smith wrote:
> On 3/31/07, John Pye <[EMAIL PROTECTED]> wrote:
>> Hi all
>>
>> Any time I export a 'Draw' page from OpenOffice as a PDF, and then try
>> to import it with LyX, LyX fails to correctly find the Bounding Box.
>>
>> If I open the PDF with Evince it shows the correct bounding box.
>>
>> Is there something that I can do to make LyX correctly detect the
>> bounding box? Have other people seen this?
>>
>> I'm using LyX 1.4.3 on Ubuntu 6.10.
>>
>> FWIW I saw this thread and it seems it might also be a problem with
>> 1.4.4.
>> http://www.mail-archive.com/lyx-users@lists.lyx.org/msg54249.html
>
> John,
>
> Try ps2epsi, which will crop your picture.
>
> Paul


Re: Bounding box on OpenOffice PDFs

2007-03-31 Thread Paul Smith

On 3/31/07, Paul Smith <[EMAIL PROTECTED]> wrote:

> Hi all
>
> Any time I export a 'Draw' page from OpenOffice as a PDF, and then try
> to import it with LyX, LyX fails to correctly find the Bounding Box.
>
> If I open the PDF with Evince it shows the correct bounding box.
>
> Is there something that I can do to make LyX correctly detect the
> bounding box? Have other people seen this?
>
> I'm using LyX 1.4.3 on Ubuntu 6.10.
>
> FWIW I saw this thread and it seems it might also be a problem with 1.4.4.
> http://www.mail-archive.com/lyx-users@lists.lyx.org/msg54249.html

John,

Try ps2epsi, which will crop your picture.


ps2epsi only applies to eps files, but you can export you picture as
eps and then, instead of inserting a pdf picture in LyX, insert the
eps file resulting from ps2epsi.

Paul


Re: Bounding box on OpenOffice PDFs

2007-03-31 Thread Paul Smith

On 3/31/07, John Pye <[EMAIL PROTECTED]> wrote:

Hi all

Any time I export a 'Draw' page from OpenOffice as a PDF, and then try
to import it with LyX, LyX fails to correctly find the Bounding Box.

If I open the PDF with Evince it shows the correct bounding box.

Is there something that I can do to make LyX correctly detect the
bounding box? Have other people seen this?

I'm using LyX 1.4.3 on Ubuntu 6.10.

FWIW I saw this thread and it seems it might also be a problem with 1.4.4.
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg54249.html


John,

Try ps2epsi, which will crop your picture.

Paul


Bounding box on OpenOffice PDFs

2007-03-30 Thread John Pye
Hi all

Any time I export a 'Draw' page from OpenOffice as a PDF, and then try
to import it with LyX, LyX fails to correctly find the Bounding Box.

If I open the PDF with Evince it shows the correct bounding box.

Is there something that I can do to make LyX correctly detect the
bounding box? Have other people seen this?

I'm using LyX 1.4.3 on Ubuntu 6.10.

FWIW I saw this thread and it seems it might also be a problem with 1.4.4.
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg54249.html

Cheers
JP





-- 
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Bounding box once again

2007-03-05 Thread Póta György
In a former message I complained that the new Lyx 1.4.4 neglects the 
bounding boxes of the .eps figures.


Now I would like to stress that the easy and correct treatment of .eps 
figures would be extremely important for those who, like me, use Lyx in 
their everyday's work.


In one of the answers to my original message it was raised that that the 
neglection of the bounding boxes would be a consequence of some recent 
changes in the file (script) "convert".Would the developers please 
investigate the above problem?


I would also mention that the bounding box creator in Lyx appeared far 
from perfect several months ago: a figure that seemed correctly clipped 
in Lyx, proved incorrectly clipped in Yap or in Xdvi in Linux. This and 
the lengthy trial and error procedure were the reasons why I turned to 
external clipping.


Many thanks  for your efforts and help.

With best wishes,

Gyorgy Pota





Re: Lyx 1-4-4 neglects .eps bounding box?

2007-03-01 Thread Jean-Marc Lasgouttes
>>>>> "Póta" == Póta György <[EMAIL PROTECTED]> writes:

Póta> Dear Users, Tank you all for the responses. Meanwhile it turned
Póta> out that Lyx 1.4.4-4 takes into account the bounding box when it
Póta> is used with an older version of ImageMagick. This
Póta> ImageMagick-6.3.0-Q16 came with the previous Lyx 1.4.3.

Póta> I cannot enclose the chosen problematic figure since the Lyx
Póta> list machine returned it to me, being too large to accept.
Póta> However, I know that the title does not include the string "eps"
Póta> but the figure is now shown correctly by Lyx. The bounding box
Póta> can also be seen in gsview32. I remark, that with Imagemagick
Póta> 6.3.2-Q16, used by Lyx 1.4.4-4, all my previously clipped
Póta> figures were wrong in Lyx.

Uwe, I think this is related to your recent 'convert' change.

JMarc


Re: Lyx 1-4-4 neglects .eps bounding box?

2007-03-01 Thread Póta György

Dear Users,

Tank you all for the responses. Meanwhile it turned out that Lyx 1.4.4-4 
takes into account the bounding box when it is used with an older 
version of ImageMagick. This  ImageMagick-6.3.0-Q16 came with the 
previous Lyx 1.4.3.


I cannot enclose the chosen problematic figure since the Lyx list machine returned it to me, being too large to accept. However, I know that the title does not include the string 
"eps" but the figure is now shown correctly by Lyx.  The bounding box  can also 
be seen in  gsview32. I remark, that with Imagemagick 
6.3.2-Q16, used by Lyx 1.4.4-4, all my previously clipped figures were 
wrong in Lyx.


For Paul A. Rubin: I clip the images with epstool independently of Lyx; 
Lyx only reads these images.


With best wishes,

Gyorgy Pota







Re: Lyx 1-4-4 neglects .eps bounding box?

2007-02-28 Thread Georg Baum
Jean-Pierre Chretien wrote:

> A test on the first line of the file could help: if the EPS string is
> missing, LyX thinks is PS and not EPS, even with a BB included.

True. But that does not explain why it stopped working with 1.4.4, this is
the case since a long time.


Georg



Re: Lyx 1-4-4 neglects .eps bounding box?

2007-02-28 Thread Jean-Pierre Chretien

>>To: lyx-users@lists.lyx.org
>>From: Georg Baum <[EMAIL PROTECTED]>
>>Subject: Re: Lyx 1-4-4 neglects .eps bounding box?
>>Date: Wed, 28 Feb 2007 09:48:30 +0100
>>
>>Póta György wrote:
>>
>>> Dear Users,
>>> 
>>> Under Windows the best way of creating .eps drawings was to draw the
>>> figure, to print it as an .eps file and then to use epstool to add a
>>> bounding box around the figure  in an a4 page. Thus, only the figure was
>>> seen in Lyx the a4 page was not.
>>> 
>>> However, Lyx-1-4-4 apparently neglects the bounding box created by the
>>> above method, and both in Lyx and Yap the whole a4 page is visible with
>>> the wanted figure in the middle.
>>
>>That should not happen. Your procedure is supposed to work. If you send us
>>an example .eps file (with correct bounding box) that shows this behaviour
>>we can find out whether it is a local problem with your installation, or a
>>general one. Without an example it is difficult.

A test on the first line of the file could help: if the EPS string is missing,
LyX thinks is PS and not EPS, even with a BB included.
ps2eps does add the EPS string in the first line, don't know for epstool.

Lyx does handle differently these two files:
-> head trace.eps
%!PS-Adobe-2.0
%%Title: trace.eps
%%Creator: gnuplot 4.0 patchlevel 0
%%CreationDate: Tue Nov 21 08:47:17 2006
%%DocumentFonts: (atend)
%%BoundingBox: 50 50 554 770
%%Orientation: Portrait
%%Pages: (atend)
%%EndComments

-> head tt.eps
%!PS-Adobe-2.0 EPSF-2.0
%%Title: tt.fig
%%Creator: fig2dev Version 3.2 Patchlevel 3c
%%CreationDate: Wed Jun 26 10:27:11 2002
%%BoundingBox: 0 0 249 159
%%Magnification: 1.
%%EndComments


-- 
Jean-Pierre



Re: Lyx 1-4-4 neglects .eps bounding box?

2007-02-28 Thread Georg Baum
Póta György wrote:

> Dear Users,
> 
> Under Windows the best way of creating .eps drawings was to draw the
> figure, to print it as an .eps file and then to use epstool to add a
> bounding box around the figure  in an a4 page. Thus, only the figure was
> seen in Lyx the a4 page was not.
> 
> However, Lyx-1-4-4 apparently neglects the bounding box created by the
> above method, and both in Lyx and Yap the whole a4 page is visible with
> the wanted figure in the middle.

That should not happen. Your procedure is supposed to work. If you send us
an example .eps file (with correct bounding box) that shows this behaviour
we can find out whether it is a local problem with your installation, or a
general one. Without an example it is difficult.


Georg



Re: Lyx 1-4-4 neglects .eps bounding box?

2007-02-27 Thread Paul A. Rubin

Póta György wrote:

Dear Users,

Under Windows the best way of creating .eps drawings was to draw the
figure, to print it as an .eps file and then to use epstool to add a
bounding box around the figure  in an a4 page. Thus, only the figure was
seen in Lyx the a4 page was not.

However, Lyx-1-4-4 apparently neglects the bounding box created by the
above method, and both in Lyx and Yap the whole a4 page is visible with
the wanted figure in the middle.

Do you have any idea that can help?

I usually draw with OpenOffice Draw program. This can export the figures
to .eps files but the dashed lines below 1 pt are pale or not visible.

I also tried the methods given in Lyx wiki but none of them gave really
good results, there were problems with the line thicknesses.

Thank you in advance for your help,

Gyorgy Pota



Gyorgy,

Try the following:

1.  Right click on the image.
2.  Check "Show in LyX" (if you have not already done so).
3.  Select the Clipping tab.
4.  Check "Clip to bounding box".
5.  Adjust the coordinates of the lower left and upper right corner by 
trial and error.


It helps to position the dialog to one side of the image and click Apply 
after each change, so that you see immediately what has happened.


Cheers,
/Paul



Lyx 1-4-4 neglects .eps bounding box?

2007-02-27 Thread Póta György

Dear Users,

Under Windows the best way of creating .eps drawings was to draw the
figure, to print it as an .eps file and then to use epstool to add a
bounding box around the figure  in an a4 page. Thus, only the figure was
seen in Lyx the a4 page was not.

However, Lyx-1-4-4 apparently neglects the bounding box created by the
above method, and both in Lyx and Yap the whole a4 page is visible with
the wanted figure in the middle.

Do you have any idea that can help?

I usually draw with OpenOffice Draw program. This can export the figures
to .eps files but the dashed lines below 1 pt are pale or not visible.

I also tried the methods given in Lyx wiki but none of them gave really
good results, there were problems with the line thicknesses.

Thank you in advance for your help,

Gyorgy Pota

--

Dr. Gyorgy Pota
associate professor
Institute of Physical Chemistry
University of Debrecen
H-4010 Debrecen, P. O. Box 7,
Hungary
Tel.: (36) 52-512-90022383
Fax: (36) 52-512-915
homepage: http://dragon.unideb.hu/~wwwphch/potae.htm



Re: bounding box

2007-02-23 Thread Georg Baum
Andre Poenitz wrote:

> On Thu, Feb 22, 2007 at 06:32:44PM +0100, Georg Baum wrote:
>> Andre Poenitz wrote:
>> 
>> >> If you simply used greek letters of the symbol font, then you don't
>> >> need fig2eps.
>> > 
>> > And still get the same font as in the main document?
>> 
>> No. But you get something readable as opposed to some TeX commands.
> 
> Having different fonts in figures and text is ugly.

Yes. But you would get that also with fig2eps if you don't set the 'special'
flag for text (AFAIK).


Georg



Re: bounding box

2007-02-23 Thread Jean-Pierre Chretien

>>Date: Fri, 23 Feb 2007 16:27:20 +0100
>>From: Andre Poenitz <[EMAIL PROTECTED]>
>>To: Georg Baum <[EMAIL PROTECTED]>
>>Cc: lyx-users@lists.lyx.org
>>Subject: Re: bounding box
>>X-Scan-Signature: f69c3b77c4b3e26dd0b52dac0e0ea9f8
>>
>>On Thu, Feb 22, 2007 at 06:32:44PM +0100, Georg Baum wrote:
>>> Andre Poenitz wrote:
>>> 
>>> >> If you simply used greek letters of the symbol font, then you don't need
>>> >> fig2eps.
>>> > 
>>> > And still get the same font as in the main document?
>>> 
>>> No. But you get something readable as opposed to some TeX commands.
>>
>>Having different fonts in figures and text is ugly.

A strong incentive to use special text in xfig and External
material inset IMHO. LyX eases a lot the combined export.
Many thanks to the developers for this.

xfig is however a bit limited to combine series, family and shape. 

-- 
Jean-Pierre



Re: bounding box

2007-02-23 Thread Andre Poenitz
On Thu, Feb 22, 2007 at 06:32:44PM +0100, Georg Baum wrote:
> Andre Poenitz wrote:
> 
> >> If you simply used greek letters of the symbol font, then you don't need
> >> fig2eps.
> > 
> > And still get the same font as in the main document?
> 
> No. But you get something readable as opposed to some TeX commands.

Having different fonts in figures and text is ugly.

Of course, that's the 'standard' in the known universe...

Andre'


Re: bounding box

2007-02-22 Thread Georg Baum
Andre Poenitz wrote:

>> If you simply used greek letters of the symbol font, then you don't need
>> fig2eps.
> 
> And still get the same font as in the main document?

No. But you get something readable as opposed to some TeX commands.


Georg



Re: bounding box

2007-02-22 Thread Andre Poenitz
On Thu, Feb 22, 2007 at 02:24:50PM +0100, Georg Baum wrote:
> Wolfgang Engelmann wrote:
> 
> >> Do you really need fig2eps (i.e. dou you have special text in the
> >> figures)?
> > 
> > you mean greek letters and the like? yes in some
> 
> No, I mean LaTeX code, such as $\frac{a/b}$. If you set the "special" flag
> of the text then xfig allows to input code that can be replaced by the
> LaTeX rendered result. This is what fig2eps does.
> 
> If you simply used greek letters of the symbol font, then you don't need
> fig2eps.

And still get the same font as in the main document?
[Memory is fading...]

Andre'


Re: bounding box

2007-02-22 Thread Georg Baum
Wolfgang Engelmann wrote:

>> Do you really need fig2eps (i.e. dou you have special text in the
>> figures)?
> 
> you mean greek letters and the like? yes in some

No, I mean LaTeX code, such as $\frac{a/b}$. If you set the "special" flag
of the text then xfig allows to input code that can be replaced by the
LaTeX rendered result. This is what fig2eps does.

If you simply used greek letters of the symbol font, then you don't need
fig2eps.


Georg



Re: bounding box

2007-02-22 Thread Wolfgang Engelmann
>
> Do you really need fig2eps (i.e. dou you have special text in the figures)?

you mean greek letters and the like? yes in some
>
> > The Fig was drawn in landscape, but the program reduces it in such a way
> > as it has been drawn as portrait, which results in a figure where parts
> > of the right side are gone
>
> The default converter from fig to eps of LyX produces a nice eps file
> without whitespace for me. If you want to run it by hand:
>
> fig2dev -L eps t.fig t.eps
>
> With that you don't even need the clipping option, so it should "Just work"
> if you include the .fig fiels in LyX rather than the .eps files and let LyX
> create the .eps files for you.

beautiful, and fast. Thats it.

Thanks
Wolfgang


Re: bounding box

2007-02-22 Thread Georg Baum
Wolfgang Engelmann wrote:

> Which program is used for "Clip to bounding box" in LyX to remove white
> space of figures?

LyX simply reads out the bounding box of the produced eps file, so the
result depends on the program that created that eps file.

> I produced a figure with xfig which I converted to an 
> eps file. Both have white space, but the publisher does not like it,
> understandably. I tried to use
> fig2eps --bbox=dvips
> and
> fig2eps --bbox=gs
> but both cut the figure wrongly:

Do you really need fig2eps (i.e. dou you have special text in the figures)?

> The Fig was drawn in landscape, but the program reduces it in such a way
> as it has been drawn as portrait, which results in a figure where parts of
> the right side are gone

The default converter from fig to eps of LyX produces a nice eps file
without whitespace for me. If you want to run it by hand:

fig2dev -L eps t.fig t.eps

With that you don't even need the clipping option, so it should "Just work"
if you include the .fig fiels in LyX rather than the .eps files and let LyX
create the .eps files for you.

If you have special text in the figures then I recommend to include the .fig
files via the external inset. Then LyX will do all necessary steps for you
to produce a nice .eps file, again with a tight bounding box.


Georg



Re: bounding box

2007-02-22 Thread Tom Schlangen
Hi Wolfgang,

I forgot to mention that after preparation of the .EPS by the script I 
mentioned before, you just can use the click to box / read from file options of 
the relevant LyX graphics inclusion dialogue.

Tom

-- 
mailto:[EMAIL PROTECTED]



Re: bounding box

2007-02-22 Thread Tom Schlangen
Hi Wolfgang,

> Which program is used for "Clip to bounding box" in LyX
> to remove white space of figures?

I must admit that I don´t know a point-and-click method within LyX, but maybe 
there is one - I just don´t know.

Instead, I use the shell script to be found in article 
http://silas.psfc.mit.edu/elec_fig/elec_figures.pdf (about 140kB) which renders 
the .EPS in GhostScript, removes the BBs found and replaces them with 
"thightest fit" ones. Also, it does some other cleanup, like showpage handling, 
if necessary.

Highly  recommended article anyway, since it gives a vast number of excellent 
tips to convert graphics as good as possible to be included in LaTeX (or LyX, 
for that matter). Really a "must read" for anyone who needs inclusion of 
graphics :-)

Regards

Tom Schlangen

-- 
mailto:[EMAIL PROTECTED]



bounding box

2007-02-22 Thread Wolfgang Engelmann
Which program is used for "Clip to bounding box" in LyX to remove white space 
of figures? I produced a figure with xfig which I converted to an eps file. 
Both have white space, but the publisher does not like it, understandably. 
I tried to use 
fig2eps --bbox=dvips
and
fig2eps --bbox=gs
but both cut the figure wrongly: 
The Fig was drawn in landscape, but the program reduces it in such a way as it 
has been drawn as portrait, which results in a figure where parts of the 
right side are gone

Wolfgang


Re: Can I have bounding box around floating images?

2006-03-26 Thread Paul Medwell

Nagy Gabor wrote:

Hi, I have some floating figures in my paper, and I would like to have a
rectangle around the fload (or around the picture inside the float.

How can I do that?



An easy solution would be to stick in the figure inside a 1×1 table.

Lata,
Paul



Can I have bounding box around floating images?

2006-03-23 Thread Nagy Gabor
Hi, I have some floating figures in my paper, and I would like to have a
rectangle around the fload (or around the picture inside the float.

How can I do that?

Cheers,
Gabor


matlab postscript fig bounding box path oddity

2003-09-10 Thread jorgen johansson
Hello,

I have created a postscript (eps) figure with matlab that contains and 
RGB image and a few lines (plotted with matlab).

I have some problem with the bounding box and the lyx view. The bounding 
box clip is applied only in Lyx if I give the full path to the .eps file 
(/f/chapters/figures/fig.eps). If I give only the relative path 
(figures/fig.eps) Lyx shows the whole figure even though clip to 
bounding box is selected in the graphics inset and the same bounding box 
numbers are used. The output is ok though. i.e. the figure ( with 
relative path) is clipped to the bounding box in the .dvi file.

I have reproduce the oddity with other matlab figures containing images.
How could I find out if the eps figured produced by matlab has some 
errors in it? (Gsview displays it fine.) Is this a Lyx bug?

/jorgen

lyx 1.3.1 on up todate cygwin
matlab 6.5
win XP pro.



Bug in lyx 1.2.1 Bounding Box size

2002-09-06 Thread Jan Smid

Hi,

when I choose a value higher than the size of the bounding box, Lyx 1.2.1 
crashes. Can anybody confirm this behavior?

-j



Bounding box problem and Figures UI comments

2002-05-23 Thread Rick L Vinyard Jr

Lyx version: 1.2.0-pre5

Firstly, I have noticed a problem with figures imported from a 1.1.6 file.
The displayed bounding box is much larger than the actual figure size.

I have even noticed this when opening the User Guide (particularly the
section on figures).

I'm not sure whether this is an issue that is already known, or a
non-issue entirely, but I didn't see a bug report regarding this.

Second, a few comments (hopefully constructive) on usability. I have only
been using 1.2.0-pre5 for a *very* short period of time, but there are
already a few items I miss from the 1.1.6 UI.

One of the first items I noticed missing on the figure option box was the
set of radio buttons for custom width metrics. In particular, the ones I
miss most are %col and %page. It would be nice if there were three radio
options with %col, %page and other, where other consists of the current 
drop down list.

Another item that I noticed are the separation of the LyX view and LaTeX
size. This is a great idea, but it would be nice to have an option that
locked the display options together by default, and allowed the user to vary
them independently if desired.

I know there are the "Get LyX Size" and "Get LaTeX Size" buttons, but I
think it just adds an extra click for the common case (at least what I
percive as the common case for my usage).

Finally, the LyX view lack of support for determining %text, %col and
%page size from the LaTeX size is somewhat frustrating. But, I'm not sure
how much work would be required to support these options.

Although these are my own personal preferences, and of course you never
want to customize a UI to a single user, perhaps they could serve as the
starting point for determining a reasonable set of default preferences
(at least for figures) based on the combined input of users.


-- 

Rick L. Vinyard, Jr.
http://miskatonic.cs.nmsu.edu/





Re: Getting Lyx to clip EPS image to bounding box

2002-03-15 Thread Dekel Tsur

On Fri, Mar 15, 2002 at 12:51:51AM -0800, Rudolph van der Merwe wrote:
> Well, I also thought that might work, but it doesn't. When I put the following 
> in the preamble:
> 
> \renewcommand{\includegraphics}{\includegraphics*}
> 
> I get the following Latex compilation error:
> 
>  > ! TeX capacity exceeded, sorry [input stack size=1500].
>  > \includegraphics ->\includegraphics

This doesn't work as you define an endless recursive macro.
Use

\let\oldincludegraphics=\includegraphics
\def\includegraphics{\oldincludegraphics*}



Re: Getting Lyx to clip EPS image to bounding box

2002-03-15 Thread Rudolph van der Merwe

It seems the correct way to achieve this is with the following in the preamble:

\let\foobar=\includegraphics
\renewcommand{\includegraphics}[1]{\foobar*{#1}}

Works nicely now!

R.




Rudolph van der Merwe wrote:
> Well, I also thought that might work, but it doesn't. When I put the 
> following in the preamble:
> 
> \renewcommand{\includegraphics}{\includegraphics*}
> 
> I get the following Latex compilation error:
> 
>  > ! TeX capacity exceeded, sorry [input stack size=1500].
>  > \includegraphics ->\includegraphics
>  > *
>  > l.280 ...mnwidth}{!}{\includegraphics{ut_fig.eps}}
>  >   \par}
> 
> 
> R.
> 
> 
> Guenter Milde wrote:
> 
>> On Thu, 14 Mar 2002 19:42:16 -0800 wrote Rudolph van der Merwe 
>> <[EMAIL PROTECTED]>:
>>
>>
>>> How do I get Lyx to clip an EPS image to its bounding box? I pure 
>>> Latex this
>>> is quite easy, by simply using
>>> \includegraphics*  in place of  \includegraphics . I know that Lyx 
>>> uses \includegraphics internally (its in the
>>> generated Latex source) but how do I get it to use \includegraphics* 
>>> instead from within Lyx?
>>>
>>> More generally speaking, how do you pass options/parameters to
>>> includegraphics from within Lyx?
>>
>>
>>
>> AFAIK, you cannot.
>>
>> A workaround would be to have
>>
>> \renewcommand{\includegraphics}{\*includegraphics}
>>
>> in your preamble.
>>
>> Guenter
>>
>> -- 
>> [EMAIL PROTECTED]
>>
> 
> 


-- 
Rudolph van der Merwe  |  http://ece.ogi.edu/~rvdmerwe




Re: Getting Lyx to clip EPS image to bounding box

2002-03-15 Thread Rudolph van der Merwe

Well, I also thought that might work, but it doesn't. When I put the following 
in the preamble:

\renewcommand{\includegraphics}{\includegraphics*}

I get the following Latex compilation error:

 > ! TeX capacity exceeded, sorry [input stack size=1500].
 > \includegraphics ->\includegraphics
 > *
 > l.280 ...mnwidth}{!}{\includegraphics{ut_fig.eps}}
 >   \par}


R.


Guenter Milde wrote:
> On Thu, 14 Mar 2002 19:42:16 -0800 wrote Rudolph van der Merwe 
><[EMAIL PROTECTED]>:
> 
> 
>>How do I get Lyx to clip an EPS image to its bounding box? I pure Latex this
>>is 
>>quite easy, by simply using
>>\includegraphics*  in place of  \includegraphics . I know that Lyx uses 
>>\includegraphics internally (its in the
>>generated Latex source) but how do I get it to use \includegraphics* instead 
>>from within Lyx?
>>
>>More generally speaking, how do you pass options/parameters to
>>includegraphics 
>>from within Lyx?
> 
> 
> AFAIK, you cannot.
> 
> A workaround would be to have
> 
> \renewcommand{\includegraphics}{\*includegraphics}
> 
> in your preamble.
> 
> Guenter
> 
> --
> [EMAIL PROTECTED]
> 


-- 
Rudolph van der Merwe  |  http://ece.ogi.edu/~rvdmerwe




Getting Lyx to clip EPS image to bounding box

2002-03-14 Thread Rudolph van der Merwe

How do I get Lyx to clip an EPS image to its bounding box? I pure Latex this is 
quite easy, by simply using
\includegraphics*  in place of  \includegraphics . I know that Lyx uses 
\includegraphics internally (its in the
generated Latex source) but how do I get it to use \includegraphics* instead 
from within Lyx?

More generally speaking, how do you pass options/parameters to includegraphics 
from within Lyx?

Thanks
Rudolph





Re: bounding box problem in eps file made from kontour prg

2002-02-12 Thread Dekel Tsur

On Mon, Feb 11, 2002 at 08:02:43PM -0500, Wolfgang Engelmann wrote:
> 
> I am using kontour 1.1 in KDE 2.2.2.-1 to produce eps figures.
> Exporting them gives too much white space below the figure content.

Use ps2eps to fix the files created by kontour
http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/ps2eps.html

PS: Why are you using kontour ?
Try using sketch instead.



Re: bounding box problem in eps file made from kontour prg

2002-02-12 Thread Guenter Milde

On Mon, 11 Feb 2002 20:02:43 -0500 wrote Wolfgang Engelmann 
<[EMAIL PROTECTED]>:

> 
> I am using kontour 1.1 in KDE 2.2.2.-1 to produce eps figures.
> Exporting them gives too much white space below the figure content.
> 
> In the FAQ of the kontour help it says:
> 
> 
> Question: 
> 
> 
> How can I use EPS files, which were exported from Kontour, in LATEX?
> Answer: 
> 
> 
> This is possible using the clip option (\epsfig{file=graphics.eps, width=9cm, 
> clip= })
> 
> How do I make it work in a Lyx file figure float?

Correct the bounding box. Besides looking with gv and manually editing the
bounding box, you can use one of eps2eps, ps2eps or epscrop. 
(I can send the programs privately, if needed.) 

(BTW: developers, how about adding a eps-bounding box program to the tools
list on the lyx-page? (where went the stuff that makes LyX tick section?)
Also, could we have a tip on the bounding box in the eps section of tips and tricks?)

GM

--
[EMAIL PROTECTED]




NEWBIE, please help on BOUNDING BOX problems

1999-10-25 Thread magni

I am not an expert at all, and just came from the Win world to linux.

I have some EPS images (obtained via a print to file on Postscript
device),
and when including them in a figure float they appear:
1) huge
2) half cut, since they are displaced in the lower right direction.

Somebody told me this is a bounding box problem, and although it seems
to me from
reading the mailing list archive that once it could be solved via some
option in the LyX InsertFigure popup, I cannot find it now (maybe it
worked just in old LyX versions?).

Now, I am a lazy guy and would prefer I can solve the problem in some
beautiful click-and-drag environment. Somebody told me it can be
done in Gv, but, in my version at least (3.5.8) I cannot find it.

Can somebody help me, please???

Thank you

Alessandro

--
~~
\  Dr.Alessandro Magni
/   IEN Galileo Ferraris
\   c.M.d'Azeglio 42, 10125 Torino (ITALIA)
/   [EMAIL PROTECTED]
\   Fax (39)11-6507611
/   Tel (39)11-3919757
\   Homepage at: http://alpha.ien.it/~magni/home.htm
~~





Re: Postscript Bounding box too small

1999-07-12 Thread Jerry Yuan

Use ps2epsi, it will fit your figure right,

Cheers,
Jerry


>From: Henk Coetzee <[EMAIL PROTECTED]>
>To: lyx users list <[EMAIL PROTECTED]>
>Subject: Postscript Bounding box too small
>Date: Mon, 12 Jul 1999 08:01:44 +0200
>
>Hi
>
>I use a several mapping packages (GRASS and GMT) which produce
>postscript output with a bounding box, which surrounds the map portion
>of a map, but not always the annotations on the outside. These are
>however there. Placing these into a LyX document doesn't always have the
>desired effect - annotations fall off the page or continue over the
>text. Is there a way to fix this?
>
>Henk
>
>
>--
>
>Henk Coetzee
>Geophysics Unit
>Council for Geoscience
>Private Bag X112, Pretoria, 0001, South Africa
>Tel: +27-12-841-1192   Fax: +27-12-841-1424
>


__
Get Your Private, Free Email at http://www.hotmail.com



Postscript Bounding box too small

1999-07-11 Thread Henk Coetzee

Hi

I use a several mapping packages (GRASS and GMT) which produce
postscript output with a bounding box, which surrounds the map portion
of a map, but not always the annotations on the outside. These are
however there. Placing these into a LyX document doesn't always have the
desired effect - annotations fall off the page or continue over the
text. Is there a way to fix this?

Henk


-- 

Henk Coetzee
Geophysics Unit
Council for Geoscience
Private Bag X112, Pretoria, 0001, South Africa
Tel: +27-12-841-1192   Fax: +27-12-841-1424