Re: Can't insert PDF image into LyX

2013-12-03 Thread Jens Nöckel

On Dec 3, 2013, at 2:14 PM, Jerry wrote:

> 
> On Dec 3, 2013, at 1:53 PM, Stephen Buonopane  wrote:
> 
>> Try the solution given here…
>> http://michael.orlitzky.com/articles/fixing_pdf_graphics_in_lyx.php
>> which creates a direct conversion from pdf to png.
>> 
>> It solved a related problem for me in the past where the conversion through 
>> eps subtly changed the graphics dimensions making on screen cropping near 
>> impossible.
> 
> Thanks, Stephen! That has fixed the problem.
> 
> There remain some unanswered questions. It looks like the converter pdftops 
> is broken, at least on my machine. Your fix bypassed it, and elsewhere in 
> this thread I reported that a manual conversion created an EPS file that was 
> invalid. Is this a known problem?
> 
> Since PDF is truly a native file format on OS X, it seems that your fix 
> should be incorporated into LyX permanently because OS X users are trying to 
> paste PDFs into LyX very frequently. Have you suggested this fix to the 
> developers?
> 
> Jerry


As an alternative to Stephen's suggestion, you could also add the following 
converter for PDF to PNG. In my preferences, I chose the "From format" as 

PDF (ps2pdf)

and entered this code for "Converter":

sips -s format png $$i --out $$o

This uses the OS X built-in command sips instead of Ghostscript.

Re: pleading paper

2013-12-03 Thread john White
john White  lawquest.com> writes:

> 
> 

I need some help here, guys.  I filed a brief yesterday without pleading
paper because I needed the multiple index feature more and the document as
filed had to be searchable. Will file another one today and still another
one tomorrow.  The remedy of putting pleading paper in the printer before
printing does not work in courts where the document must be searchable. 
This is not at all ideal. If anyone on any version of lyx with any styles of
any nature is able to get lyx to both print the pleading paper template
mentioned above AND do an index, please advise and if possible forward the
code.  As indicated, mine (2.06) does a bang-up job with either but errors
out when I try to do both.  



Re: Can't insert PDF image into LyX

2013-12-03 Thread Jerry

On Dec 3, 2013, at 1:53 PM, Stephen Buonopane  wrote:

> Try the solution given here…
> http://michael.orlitzky.com/articles/fixing_pdf_graphics_in_lyx.php
> which creates a direct conversion from pdf to png.
> 
> It solved a related problem for me in the past where the conversion through 
> eps subtly changed the graphics dimensions making on screen cropping near 
> impossible.

Thanks, Stephen! That has fixed the problem.

There remain some unanswered questions. It looks like the converter pdftops is 
broken, at least on my machine. Your fix bypassed it, and elsewhere in this 
thread I reported that a manual conversion created an EPS file that was 
invalid. Is this a known problem?

Since PDF is truly a native file format on OS X, it seems that your fix should 
be incorporated into LyX permanently because OS X users are trying to paste 
PDFs into LyX very frequently. Have you suggested this fix to the developers?

Jerry

> 
> 
> 
> On Dec 3, 2013, at 1:00 AM, Jerry wrote:
> 
>> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5. When I 
>> try to do this, in the area where the graphic would be displayed, I first 
>> see the message "Converting to loadable format" and then "Error converting 
>> to loadable format." The name of the file is then displayed but not the 
>> image.
>> 
>> I am trying this in a new LyX document. The graphic is a simple plot saved 
>> from Mathematica in several file formats. Of those other formats, I am able 
>> to successfully insert bmp, eps, gif, jpg, png and tiff. (svg displays 
>> incorrectly in LyX as a black rectangle even though it is displayed 
>> correctly in other viewers.)
>> 
>> I thought PDF was a "native" format for LyX, so I don't understand why it is 
>> trying to convert the PDF file into anything. Have I set a preference to 
>> something stupid?
>> 
>> Jerry
>> 
> 



Re: Can't insert PDF image into LyX

2013-12-03 Thread Jerry

On Dec 3, 2013, at 1:22 PM, Scott Kostyshak  wrote:

> On Tue, Dec 3, 2013 at 4:41 AM, Murat Yildizoglu
>  wrote:
>> Scott, are you sure that Lyx uses EPS for showing the graphics on the
>> screen? I have had the impression that it was rather using a bitmap format
>> like PNG.
> 
> Not all formats are converted to .eps. If you insert a .png it will
> not be converted to a .eps. I agree that in the end to display on a
> screen a bitmap is more useful but I think that Qt takes care of that.
> If you go to Insert > Graphics and choose a .pdf, at least on Ubuntu,
> it is converted to a .eps. You can see this by starting LyX with lyx
> -dbg graphics and looking at the output.
> 
> Below is some useful information from the output. Note all the way at
> the bottom "from_format:  pdf6
> to_format:eps"
> 

> 
> Scott

Scott, I ran LyX with the -dbg graphics command and got the following output. 
Not sure what to make of it but there seems to be a lot of complaining. FWIW I 
ran it again with spaces removed from path names and got the same result.

Jerry


Last login: Tue Dec  3 14:16:34 on ttys004
Hello, Jerry. Your profile is at ~/.profile.
MBPro:bin jerrybauck$ cd 
/Applications/Words/LyXOuterFolder/LyX.app/Contents/MacOS 
MBPro:MacOS jerrybauck$ ./lyx -dbg graphics
Setting debug level to graphics
Debugging `graphics' (Graphics conversion and loading)
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (945): Recognised Fileformat: agr
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (945): Recognised Fileformat: eps
support/FileName.cpp (945): Recognised Fileformat: eps
support/FileName.cpp (945): Recognised Fileformat: eps
support/FileName.cpp (945): Recognised Fileformat: pdf
support/FileName.cpp (945): Recognised Fileformat: pdf
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
Format.cpp (147):   will guess format from file extension: svg -> svg
support/FileName.cpp (945): Recognised Fileformat: eps
support/FileName.cpp (945): Recognised Fileformat: pdf
support/FileName.cpp (945): Recognised Fileformat: pdf
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)

Re: Can't insert PDF image into LyX

2013-12-03 Thread Jerry

On Dec 3, 2013, at 3:49 AM, Murat Yildizoglu  
wrote:

> Hi Jerry,
> 
> It seems that convert in on your Path.
> I do not know if this is enough, but the Path in my Lyx preferences 
> (Preferences/Paths/Path prefix) contains the MacPorts binary folder: 
> /opt/local/bin
> If it is not in your's, you could maybe add it and reconfigure Lyx.
> Maybe that could help?
> 
> Murat

Thanks for that tip, Murat. I checked the path prefix as you suggest and 
/opt/local/bin is in fact listed, as is /usr/local/bin/ where a slightly older 
version of convert exists. Since /opt/local/bin is first in the list, 
presumably the convert there is used, but which one is used shouldn't matter, I 
suppose.

So the path list shouldn't be the problem.

Jerry

> 
> 
> 2013/12/3 Jerry 
> 
> On Dec 3, 2013, at 2:41 AM, Murat Yildizoglu 
>  wrote:
> 
>> Scott, are you sure that Lyx uses EPS for showing the graphics on the 
>> screen? I have had the impression that it was rather using a bitmap format 
>> like PNG.
>> 
>> Jerry, is the ImageMagick command convert attainable from the console? What 
>> happens when you execute
>> convert -version
>> in the console?
> 
> MBPro:~ me$ convert -version
> Version: ImageMagick 6.8.0-2 2012-11-21 Q16 http://www.imagemagick.org
> Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
> Features:  OpenCL   
> 
> Jerry
> P.S. I'll be "offline" for a few hours beginning now. 8^)
> 
>> 
>> 
>> 2013/12/3 Jerry 
>> 
>> On Dec 2, 2013, at 11:20 PM, Scott Kostyshak  wrote:
>> 
>> > On Tue, Dec 3, 2013 at 1:00 AM, Jerry  wrote:
>> >> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5. When 
>> >> I try to do this, in the area where the graphic would be displayed, I 
>> >> first see the message "Converting to loadable format" and then "Error 
>> >> converting to loadable format." The name of the file is then displayed 
>> >> but not the image.
>> >>
>> >> I am trying this in a new LyX document. The graphic is a simple plot 
>> >> saved from Mathematica in several file formats. Of those other formats, I 
>> >> am able to successfully insert bmp, eps, gif, jpg, png and tiff. (svg 
>> >> displays incorrectly in LyX as a black rectangle even though it is 
>> >> displayed correctly in other viewers.)
>> >>
>> >> I thought PDF was a "native" format for LyX, so I don't understand why it 
>> >> is trying to convert the PDF file into anything. Have I set a preference 
>> >> to something stupid?
>> >>
>> >> Jerry
>> >
>> > Hi Jerry,
>> >
>> > I believe that LyX converts PDFs to EPS files. To see the command that
>> > is being run, go to Tools > Preferences > File Handling > Converters
>> > and select "PDF (graphics) -> EPS"
>> > For me the command is:
>> > pdftops -eps -f 1 -l 1 $$i $$o
>> >
>> > Best,
>> >
>> > Scott
>> 
>> Thanks, Scott. I have an item in the Converters list called PDF (ps2pdf) -> 
>> EPS which is probably the equivalent. In any case, the Converter command is 
>> pdftops -eps -f 1 -l 1 $$i $$o, the same as yours.
>> 
>> Jerry
>> 
>> P.S. Did you see Murat's comment in this thread?
>> 
>> 
>> 
>> -- 
>> Prof. Murat Yildizoglu
>> 
>> Université Montesquieu Bordeaux IV 
>> GREThA (UMR CNRS 5113)
>> Avenue Léon Duguit
>> 33608 Pessac cedex
>> France
>> 
>> Bureau : E-331
>> 
>> mail: yildi-at-u-bordeaux4.fr
>> 
>> web: yildizoglu.info
> 
> 
> 
> 
> -- 
> Prof. Murat Yildizoglu
> 
> Université Montesquieu Bordeaux IV 
> GREThA (UMR CNRS 5113)
> Avenue Léon Duguit
> 33608 Pessac cedex
> France
> 
> Bureau : E-331
> 
> mail: yildi-at-u-bordeaux4.fr
> 
> web: yildizoglu.info



Re: Can't insert PDF image into LyX

2013-12-03 Thread Stephen Buonopane
Try the solution given here…
http://michael.orlitzky.com/articles/fixing_pdf_graphics_in_lyx.php
which creates a direct conversion from pdf to png.

It solved a related problem for me in the past where the conversion through eps 
subtly changed the graphics dimensions making on screen cropping near 
impossible.

 

On Dec 3, 2013, at 1:00 AM, Jerry wrote:

> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5. When I 
> try to do this, in the area where the graphic would be displayed, I first see 
> the message "Converting to loadable format" and then "Error converting to 
> loadable format." The name of the file is then displayed but not the image.
> 
> I am trying this in a new LyX document. The graphic is a simple plot saved 
> from Mathematica in several file formats. Of those other formats, I am able 
> to successfully insert bmp, eps, gif, jpg, png and tiff. (svg displays 
> incorrectly in LyX as a black rectangle even though it is displayed correctly 
> in other viewers.)
> 
> I thought PDF was a "native" format for LyX, so I don't understand why it is 
> trying to convert the PDF file into anything. Have I set a preference to 
> something stupid?
> 
> Jerry
> 



Re: Can't insert PDF image into LyX

2013-12-03 Thread Scott Kostyshak
On Tue, Dec 3, 2013 at 4:41 AM, Murat Yildizoglu
 wrote:
> Scott, are you sure that Lyx uses EPS for showing the graphics on the
> screen? I have had the impression that it was rather using a bitmap format
> like PNG.

Not all formats are converted to .eps. If you insert a .png it will
not be converted to a .eps. I agree that in the end to display on a
screen a bitmap is more useful but I think that Qt takes care of that.
If you go to Insert > Graphics and choose a .pdf, at least on Ubuntu,
it is converted to a .eps. You can see this by starting LyX with lyx
-dbg graphics and looking at the output.

Below is some useful information from the output. Note all the way at
the bottom "from_format:  pdf6
to_format:eps"

<>
The image loader can load the following directly:

frontends/qt4/GuiApplication.cpp (215): BW,
frontends/qt4/GuiApplication.cpp (215): EPS,
frontends/qt4/GuiApplication.cpp (215): EPSF,
frontends/qt4/GuiApplication.cpp (215): EPSI,
frontends/qt4/GuiApplication.cpp (215): EXR,
frontends/qt4/GuiApplication.cpp (215): PCX,
frontends/qt4/GuiApplication.cpp (215): PSD,
frontends/qt4/GuiApplication.cpp (215): RAS,
frontends/qt4/GuiApplication.cpp (215): RGB,
frontends/qt4/GuiApplication.cpp (215): RGBA,
frontends/qt4/GuiApplication.cpp (215): SGI,
frontends/qt4/GuiApplication.cpp (215): TGA,
frontends/qt4/GuiApplication.cpp (215): XCF,
frontends/qt4/GuiApplication.cpp (215): bmp,
frontends/qt4/GuiApplication.cpp (215): bw,
frontends/qt4/GuiApplication.cpp (215): dds,
frontends/qt4/GuiApplication.cpp (215): eps,
frontends/qt4/GuiApplication.cpp (215): epsf,
frontends/qt4/GuiApplication.cpp (215): epsi,
frontends/qt4/GuiApplication.cpp (215): exr,
frontends/qt4/GuiApplication.cpp (215): gif,
frontends/qt4/GuiApplication.cpp (215): ico,
frontends/qt4/GuiApplication.cpp (215): jp2,
frontends/qt4/GuiApplication.cpp (215): jpeg,
frontends/qt4/GuiApplication.cpp (215): jpg,
frontends/qt4/GuiApplication.cpp (215): mng,
frontends/qt4/GuiApplication.cpp (215): pbm,
frontends/qt4/GuiApplication.cpp (215): pcx,
frontends/qt4/GuiApplication.cpp (215): pgm,
frontends/qt4/GuiApplication.cpp (215): pic,
frontends/qt4/GuiApplication.cpp (215): png,
frontends/qt4/GuiApplication.cpp (215): ppm,
frontends/qt4/GuiApplication.cpp (215): psd,
frontends/qt4/GuiApplication.cpp (215): ras,
frontends/qt4/GuiApplication.cpp (215): rgb,
frontends/qt4/GuiApplication.cpp (215): rgba,
frontends/qt4/GuiApplication.cpp (215): sgi,
frontends/qt4/GuiApplication.cpp (215): svg,
frontends/qt4/GuiApplication.cpp (215): svgz,
frontends/qt4/GuiApplication.cpp (215): tga,
frontends/qt4/GuiApplication.cpp (215): tif,
frontends/qt4/GuiApplication.cpp (215): tiff,
frontends/qt4/GuiApplication.cpp (215): xbm,
frontends/qt4/GuiApplication.cpp (215): xcf,
frontends/qt4/GuiApplication.cpp (215): xpm,
frontends/qt4/GuiApplication.cpp (215): xv,
graphics/GraphicsCache.cpp (91): LyX recognises the following image formats:
graphics/GraphicsCache.cpp (98): eps
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): bmp
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): eps
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): gif
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): jpg
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): jpg
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): pbm
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): pgm
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): png
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): ppm
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): svg
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): tiff
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): xbm
graphics/GraphicsCache.cpp (97): ,
graphics/GraphicsCache.cpp (98): xpm
graphics/GraphicsCache.cpp (100):

insets/InsetGraphics.cpp (145): Token: '\end_inset'
graphics/epstools.cpp (54): [readBB_from_PSFile] no(e)ps-format
frontends/qt4/GuiGraphics.cpp (347): [bb_Changed set to true]
frontends/qt4/GuiGraphics.cpp (347): [bb_Changed set to true]
frontends/qt4/GuiGraphics.cpp (347): [bb_Changed set to true]
frontends/qt4/GuiGraphics.cpp (347): [bb_Changed set to true]
insets/InsetGraphics.cpp (145): Token: 'filename'
insets/InsetGraphics.cpp (145): Token: '\end_inset'
Format.cpp (378): Recognised Fileformat: pdf6
graphics/GraphicsCacheItem.cpp (379): [CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file:
/home/scott/Desktop/WWS302_ECO359_Precept10_F13a.pdf
with displayed filename: ~/Desktop/WWS302_ECO359_Precept10_F13a.pdf
Format.cpp (378): Recognised Fileformat: pdf6
graphics/GraphicsCacheItem.cpp (386):
The file contains pdf6 format data.
graphics/GraphicsLoader.cpp (115): LoaderQueue: waking up
insets/InsetGraphics.cpp (754): insetgraphics::latex: Filename =
/home/scott/Desktop/WWS302_ECO359_Precept10_F13a.pdf
insets/Inset

Re: Can't insert PDF image into LyX

2013-12-03 Thread Murat Yildizoglu
Hi Jerry,

It seems that convert in on your Path.
I do not know if this is enough, but the Path in my Lyx preferences
(Preferences/Paths/Path prefix) contains the MacPorts binary folder:
/opt/local/bin
If it is not in your's, you could maybe add it and reconfigure Lyx.
Maybe that could help?

Murat


2013/12/3 Jerry 

>
> On Dec 3, 2013, at 2:41 AM, Murat Yildizoglu <
> murat.yildizo...@u-bordeaux4.fr> wrote:
>
> Scott, are you sure that Lyx uses EPS for showing the graphics on the
> screen? I have had the impression that it was rather using a bitmap format
> like PNG.
>
> Jerry, is the ImageMagick command convert attainable from the console?
> What happens when you execute
> convert -version
> in the console?
>
>
> MBPro:~ me$ convert -version
> Version: ImageMagick 6.8.0-2 2012-11-21 Q16 http://www.imagemagick.org
> Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
> Features:  OpenCL
>
> Jerry
> P.S. I'll be "offline" for a few hours beginning now. 8^)
>
>
>
> 2013/12/3 Jerry 
>
>>
>> On Dec 2, 2013, at 11:20 PM, Scott Kostyshak  wrote:
>>
>> > On Tue, Dec 3, 2013 at 1:00 AM, Jerry  wrote:
>> >> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5.
>> When I try to do this, in the area where the graphic would be displayed, I
>> first see the message "Converting to loadable format" and then "Error
>> converting to loadable format." The name of the file is then displayed but
>> not the image.
>> >>
>> >> I am trying this in a new LyX document. The graphic is a simple plot
>> saved from Mathematica in several file formats. Of those other formats, I
>> am able to successfully insert bmp, eps, gif, jpg, png and tiff. (svg
>> displays incorrectly in LyX as a black rectangle even though it is
>> displayed correctly in other viewers.)
>> >>
>> >> I thought PDF was a "native" format for LyX, so I don't understand why
>> it is trying to convert the PDF file into anything. Have I set a preference
>> to something stupid?
>> >>
>> >> Jerry
>> >
>> > Hi Jerry,
>> >
>> > I believe that LyX converts PDFs to EPS files. To see the command that
>> > is being run, go to Tools > Preferences > File Handling > Converters
>> > and select "PDF (graphics) -> EPS"
>> > For me the command is:
>> > pdftops -eps -f 1 -l 1 $$i $$o
>> >
>> > Best,
>> >
>> > Scott
>>
>> Thanks, Scott. I have an item in the Converters list called PDF (ps2pdf)
>> -> EPS which is probably the equivalent. In any case, the Converter command
>> is pdftops -eps -f 1 -l 1 $$i $$o, the same as yours.
>>
>> Jerry
>>
>> P.S. Did you see Murat's comment in this thread?
>
>
>
>
> --
> Prof. Murat Yildizoglu
>
> Université Montesquieu Bordeaux IV
> GREThA (UMR CNRS 5113)
> Avenue Léon Duguit
> 33608 Pessac cedex
> France
>
> Bureau : E-331
>
> mail: yildi-at-u-bordeaux4.fr
>
> web: yildizoglu.info
>
>
>


-- 
Prof. Murat Yildizoglu

Université Montesquieu Bordeaux IV
GREThA (UMR CNRS 5113)
Avenue Léon Duguit
33608 Pessac cedex
France

Bureau : E-331

mail: yildi-at-u-bordeaux4.fr

web: yildizoglu.info


Re: Can't insert PDF image into LyX

2013-12-03 Thread Jerry

On Dec 3, 2013, at 2:41 AM, Murat Yildizoglu  
wrote:

> Scott, are you sure that Lyx uses EPS for showing the graphics on the screen? 
> I have had the impression that it was rather using a bitmap format like PNG.
> 
> Jerry, is the ImageMagick command convert attainable from the console? What 
> happens when you execute
> convert -version
> in the console?

MBPro:~ me$ convert -version
Version: ImageMagick 6.8.0-2 2012-11-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features:  OpenCL   

Jerry
P.S. I'll be "offline" for a few hours beginning now. 8^)

> 
> 
> 2013/12/3 Jerry 
> 
> On Dec 2, 2013, at 11:20 PM, Scott Kostyshak  wrote:
> 
> > On Tue, Dec 3, 2013 at 1:00 AM, Jerry  wrote:
> >> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5. When 
> >> I try to do this, in the area where the graphic would be displayed, I 
> >> first see the message "Converting to loadable format" and then "Error 
> >> converting to loadable format." The name of the file is then displayed but 
> >> not the image.
> >>
> >> I am trying this in a new LyX document. The graphic is a simple plot saved 
> >> from Mathematica in several file formats. Of those other formats, I am 
> >> able to successfully insert bmp, eps, gif, jpg, png and tiff. (svg 
> >> displays incorrectly in LyX as a black rectangle even though it is 
> >> displayed correctly in other viewers.)
> >>
> >> I thought PDF was a "native" format for LyX, so I don't understand why it 
> >> is trying to convert the PDF file into anything. Have I set a preference 
> >> to something stupid?
> >>
> >> Jerry
> >
> > Hi Jerry,
> >
> > I believe that LyX converts PDFs to EPS files. To see the command that
> > is being run, go to Tools > Preferences > File Handling > Converters
> > and select "PDF (graphics) -> EPS"
> > For me the command is:
> > pdftops -eps -f 1 -l 1 $$i $$o
> >
> > Best,
> >
> > Scott
> 
> Thanks, Scott. I have an item in the Converters list called PDF (ps2pdf) -> 
> EPS which is probably the equivalent. In any case, the Converter command is 
> pdftops -eps -f 1 -l 1 $$i $$o, the same as yours.
> 
> Jerry
> 
> P.S. Did you see Murat's comment in this thread?
> 
> 
> 
> -- 
> Prof. Murat Yildizoglu
> 
> Université Montesquieu Bordeaux IV 
> GREThA (UMR CNRS 5113)
> Avenue Léon Duguit
> 33608 Pessac cedex
> France
> 
> Bureau : E-331
> 
> mail: yildi-at-u-bordeaux4.fr
> 
> web: yildizoglu.info



Re: layout for osa-revtex

2013-12-03 Thread Julien Rioux

On 02/12/2013 12:17 PM, Patrick Dupre wrote:

Hello,

I did not find a layout for osa-revtex style:
(http://www.opticsinfobase.org/josab/submit/templates/default.cfm)
Maybe some can tell me if he already built up or how I should
buid up one.

Thank.


Hi Patrick,

I've made a revtex4-1 layout that you can find at 
http://theorie.physik.uni-konstanz.de/jrioux/lyx/


Class options that are specific to the OSA can be entered in Document 
Settings > Document Class > Class options. Let us know if that works for 
you.


Cheers,
Julien



Re: Can't insert PDF image into LyX

2013-12-03 Thread Murat Yildizoglu
Scott, are you sure that Lyx uses EPS for showing the graphics on the
screen? I have had the impression that it was rather using a bitmap format
like PNG.

Jerry, is the ImageMagick command convert attainable from the console? What
happens when you execute
convert -version
in the console?


2013/12/3 Jerry 

>
> On Dec 2, 2013, at 11:20 PM, Scott Kostyshak  wrote:
>
> > On Tue, Dec 3, 2013 at 1:00 AM, Jerry  wrote:
> >> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5.
> When I try to do this, in the area where the graphic would be displayed, I
> first see the message "Converting to loadable format" and then "Error
> converting to loadable format." The name of the file is then displayed but
> not the image.
> >>
> >> I am trying this in a new LyX document. The graphic is a simple plot
> saved from Mathematica in several file formats. Of those other formats, I
> am able to successfully insert bmp, eps, gif, jpg, png and tiff. (svg
> displays incorrectly in LyX as a black rectangle even though it is
> displayed correctly in other viewers.)
> >>
> >> I thought PDF was a "native" format for LyX, so I don't understand why
> it is trying to convert the PDF file into anything. Have I set a preference
> to something stupid?
> >>
> >> Jerry
> >
> > Hi Jerry,
> >
> > I believe that LyX converts PDFs to EPS files. To see the command that
> > is being run, go to Tools > Preferences > File Handling > Converters
> > and select "PDF (graphics) -> EPS"
> > For me the command is:
> > pdftops -eps -f 1 -l 1 $$i $$o
> >
> > Best,
> >
> > Scott
>
> Thanks, Scott. I have an item in the Converters list called PDF (ps2pdf)
> -> EPS which is probably the equivalent. In any case, the Converter command
> is pdftops -eps -f 1 -l 1 $$i $$o, the same as yours.
>
> Jerry
>
> P.S. Did you see Murat's comment in this thread?




-- 
Prof. Murat Yildizoglu

Université Montesquieu Bordeaux IV
GREThA (UMR CNRS 5113)
Avenue Léon Duguit
33608 Pessac cedex
France

Bureau : E-331

mail: yildi-at-u-bordeaux4.fr

web: yildizoglu.info


Re: Can't insert PDF image into LyX

2013-12-03 Thread Jerry

On Dec 3, 2013, at 1:37 AM, Scott Kostyshak  wrote:

> On Tue, Dec 3, 2013 at 3:19 AM, Jerry  wrote:
>> 
>> On Dec 3, 2013, at 12:41 AM, Scott Kostyshak  wrote:
>> 
>>> On Tue, Dec 3, 2013 at 2:33 AM, Jerry  wrote:
 
 On Dec 2, 2013, at 11:20 PM, Scott Kostyshak  wrote:
 
> On Tue, Dec 3, 2013 at 1:00 AM, Jerry  wrote:
>> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5. 
>> When I try to do this, in the area where the graphic would be displayed, 
>> I first see the message "Converting to loadable format" and then "Error 
>> converting to loadable format." The name of the file is then displayed 
>> but not the image.
>> 
>> I am trying this in a new LyX document. The graphic is a simple plot 
>> saved from Mathematica in several file formats. Of those other formats, 
>> I am able to successfully insert bmp, eps, gif, jpg, png and tiff. (svg 
>> displays incorrectly in LyX as a black rectangle even though it is 
>> displayed correctly in other viewers.)
>> 
>> I thought PDF was a "native" format for LyX, so I don't understand why 
>> it is trying to convert the PDF file into anything. Have I set a 
>> preference to something stupid?
>> 
>> Jerry
> 
> Hi Jerry,
> 
> I believe that LyX converts PDFs to EPS files. To see the command that
> is being run, go to Tools > Preferences > File Handling > Converters
> and select "PDF (graphics) -> EPS"
> For me the command is:
> pdftops -eps -f 1 -l 1 $$i $$o
> 
> Best,
> 
> Scott
 
 Thanks, Scott. I have an item in the Converters list called PDF (ps2pdf) 
 -> EPS which is probably the equivalent. In any case, the Converter 
 command is pdftops -eps -f 1 -l 1 $$i $$o, the same as yours.
>>> 
>>> OK then you might want to try running the command manually on the pdf
>>> file. For example, you could run:
>>> pdftops -eps -f 1 -l 1 myfile.pdf myfile.eps
>>> 
>>> To get more information on what LyX is doing in the background, you
>>> could do the following:
>>> lyx -dbg graphics
>>> 
>>> I forget how you're supposed to run the command from the terminal in a
>>> Mac. I remember JMarc said something like you have to specify the full
>>> path. Hopefully you know.
>> 
>> I ran the command that you suggested and a new EPS file was created without 
>> any error code reported. I examined it in a text editor and it at least 
>> superficially looks like a valid EPS file. However, when I then try to 
>> insert it into my document, I get the "Error converting to loadable format" 
>> message in place of the image. (I don't notice the intermediate message 
>> saying that it is "Converting to a loadable format".)
>> 
>> When I attempt to open the EPS which was originally exported by Mathematica 
>> (see my original post) with Apple's Preview.app, it succeeds (by itself 
>> converting the EPS to PDF). However, when I attempt to open the new EPS made 
>> by the above command in Preview, it fails and reports "Warning PostScript 
>> error: No PDF was produced," and there is in fact no image displayed in 
>> Preview.
>> 
>> It looks like pdftops is giving me a bad result. What package
>> 
>> FWIW, the original EPS which was exported from Mathematica (and which 
>> displays correctly in LyX) is 408 KB and the new one created by the pdftops 
>> command above is only 188 KB. I don't necessarily find this worrisome but I 
>> thought I would mention it.
>> 
> 
> Sounds like you've narrowed down the problem. I've heard of similar
> reports. You could try to use a different command (different program
> than pdftops) to do the conversion. I don't have experience with this.
> 
> Best,
> 
> Scott

I see that pdftops is part of xpdf. My installed version of xpdf (via MacPorts) 
is 3.02 and pdftops is 0.20.5.

Does anyone know if there are known problems with these versions? Is it 
normally up to the LyX user to install these things? Surely I'm not the only OS 
X user to run into this problem (inserting PDF to LyX).

Jerry



Re: Can't insert PDF image into LyX

2013-12-03 Thread Scott Kostyshak
On Tue, Dec 3, 2013 at 3:19 AM, Jerry  wrote:
>
> On Dec 3, 2013, at 12:41 AM, Scott Kostyshak  wrote:
>
>> On Tue, Dec 3, 2013 at 2:33 AM, Jerry  wrote:
>>>
>>> On Dec 2, 2013, at 11:20 PM, Scott Kostyshak  wrote:
>>>
 On Tue, Dec 3, 2013 at 1:00 AM, Jerry  wrote:
> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5. When 
> I try to do this, in the area where the graphic would be displayed, I 
> first see the message "Converting to loadable format" and then "Error 
> converting to loadable format." The name of the file is then displayed 
> but not the image.
>
> I am trying this in a new LyX document. The graphic is a simple plot 
> saved from Mathematica in several file formats. Of those other formats, I 
> am able to successfully insert bmp, eps, gif, jpg, png and tiff. (svg 
> displays incorrectly in LyX as a black rectangle even though it is 
> displayed correctly in other viewers.)
>
> I thought PDF was a "native" format for LyX, so I don't understand why it 
> is trying to convert the PDF file into anything. Have I set a preference 
> to something stupid?
>
> Jerry

 Hi Jerry,

 I believe that LyX converts PDFs to EPS files. To see the command that
 is being run, go to Tools > Preferences > File Handling > Converters
 and select "PDF (graphics) -> EPS"
 For me the command is:
 pdftops -eps -f 1 -l 1 $$i $$o

 Best,

 Scott
>>>
>>> Thanks, Scott. I have an item in the Converters list called PDF (ps2pdf) -> 
>>> EPS which is probably the equivalent. In any case, the Converter command is 
>>> pdftops -eps -f 1 -l 1 $$i $$o, the same as yours.
>>
>> OK then you might want to try running the command manually on the pdf
>> file. For example, you could run:
>> pdftops -eps -f 1 -l 1 myfile.pdf myfile.eps
>>
>> To get more information on what LyX is doing in the background, you
>> could do the following:
>> lyx -dbg graphics
>>
>> I forget how you're supposed to run the command from the terminal in a
>> Mac. I remember JMarc said something like you have to specify the full
>> path. Hopefully you know.
>
> I ran the command that you suggested and a new EPS file was created without 
> any error code reported. I examined it in a text editor and it at least 
> superficially looks like a valid EPS file. However, when I then try to insert 
> it into my document, I get the "Error converting to loadable format" message 
> in place of the image. (I don't notice the intermediate message saying that 
> it is "Converting to a loadable format".)
>
> When I attempt to open the EPS which was originally exported by Mathematica 
> (see my original post) with Apple's Preview.app, it succeeds (by itself 
> converting the EPS to PDF). However, when I attempt to open the new EPS made 
> by the above command in Preview, it fails and reports "Warning PostScript 
> error: No PDF was produced," and there is in fact no image displayed in 
> Preview.
>
> It looks like pdftops is giving me a bad result. What package
>
> FWIW, the original EPS which was exported from Mathematica (and which 
> displays correctly in LyX) is 408 KB and the new one created by the pdftops 
> command above is only 188 KB. I don't necessarily find this worrisome but I 
> thought I would mention it.
>

Sounds like you've narrowed down the problem. I've heard of similar
reports. You could try to use a different command (different program
than pdftops) to do the conversion. I don't have experience with this.

Best,

Scott


Re: Can't insert PDF image into LyX

2013-12-03 Thread Jerry

On Dec 3, 2013, at 12:41 AM, Scott Kostyshak  wrote:

> On Tue, Dec 3, 2013 at 2:33 AM, Jerry  wrote:
>> 
>> On Dec 2, 2013, at 11:20 PM, Scott Kostyshak  wrote:
>> 
>>> On Tue, Dec 3, 2013 at 1:00 AM, Jerry  wrote:
 I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5. When 
 I try to do this, in the area where the graphic would be displayed, I 
 first see the message "Converting to loadable format" and then "Error 
 converting to loadable format." The name of the file is then displayed but 
 not the image.
 
 I am trying this in a new LyX document. The graphic is a simple plot saved 
 from Mathematica in several file formats. Of those other formats, I am 
 able to successfully insert bmp, eps, gif, jpg, png and tiff. (svg 
 displays incorrectly in LyX as a black rectangle even though it is 
 displayed correctly in other viewers.)
 
 I thought PDF was a "native" format for LyX, so I don't understand why it 
 is trying to convert the PDF file into anything. Have I set a preference 
 to something stupid?
 
 Jerry
>>> 
>>> Hi Jerry,
>>> 
>>> I believe that LyX converts PDFs to EPS files. To see the command that
>>> is being run, go to Tools > Preferences > File Handling > Converters
>>> and select "PDF (graphics) -> EPS"
>>> For me the command is:
>>> pdftops -eps -f 1 -l 1 $$i $$o
>>> 
>>> Best,
>>> 
>>> Scott
>> 
>> Thanks, Scott. I have an item in the Converters list called PDF (ps2pdf) -> 
>> EPS which is probably the equivalent. In any case, the Converter command is 
>> pdftops -eps -f 1 -l 1 $$i $$o, the same as yours.
> 
> OK then you might want to try running the command manually on the pdf
> file. For example, you could run:
> pdftops -eps -f 1 -l 1 myfile.pdf myfile.eps
> 
> To get more information on what LyX is doing in the background, you
> could do the following:
> lyx -dbg graphics
> 
> I forget how you're supposed to run the command from the terminal in a
> Mac. I remember JMarc said something like you have to specify the full
> path. Hopefully you know.

I ran the command that you suggested and a new EPS file was created without any 
error code reported. I examined it in a text editor and it at least 
superficially looks like a valid EPS file. However, when I then try to insert 
it into my document, I get the "Error converting to loadable format" message in 
place of the image. (I don't notice the intermediate message saying that it is 
"Converting to a loadable format".)

When I attempt to open the EPS which was originally exported by Mathematica 
(see my original post) with Apple's Preview.app, it succeeds (by itself 
converting the EPS to PDF). However, when I attempt to open the new EPS made by 
the above command in Preview, it fails and reports "Warning PostScript error: 
No PDF was produced," and there is in fact no image displayed in Preview.

It looks like pdftops is giving me a bad result. What package 

FWIW, the original EPS which was exported from Mathematica (and which displays 
correctly in LyX) is 408 KB and the new one created by the pdftops command 
above is only 188 KB. I don't necessarily find this worrisome but I thought I 
would mention it.

Jerry

> 
>> P.S. Did you see Murat's comment in this thread?
> 
> Yes. What I'm telling you is just a guess so if something I say
> contradicts what he says, try both :)
> 
> Best,
> 
> Scott