Re: export to HTML, math equation quality

2011-05-29 Thread Richard Heck
On 05/28/2011 05:39 PM, jong wrote:

 So I switched to Ubuntu 11.04 with Lyx2.0

 It came with two html export option (html and Lyxhtml) - It seems that one of
 these two utilize elyxer but not sure which one is which.

HTML uses elyxer if it is installed. LyXHTML is always the internal LyX
routine, which is new in 2.0.0. For relatively simple equations, it does
seem to work quite well.

 The second export option (Lyxhtml) really worked!! It produced all details of
 math expressions(integral, tilde, hat, etc) flawlessly. And they are all 
 vector
 graphics therefore can be scalable! 

What they are depends upon your choice of method (under
DocumentSettingsOutput). The default is that they are MathML, which
your browser renders how it likes but will scale with changes. But if
there are LaTeX constructs in your equations that we do not recognize
(packages LyX does not support, say, or XY arrows, and such), then we
fall back to image export. Making the resolution of those images
settable is on my agenda, though they can be scaled via
DocumentSettingsExport again.

Richard



Re: end flyleaf

2011-05-29 Thread Richard Heck
On 05/28/2011 01:30 PM, Richard Opheim wrote:
 Perhaps I should have said back flyleaf---the blank page(s) between
 the last printed page and the end paper of a book.

I would have thought a couple applications of InsertFormattingNew Page
(or Page Break) would do this. If there's an issue with having content
on the page, just do: InsertTex Code, and put a pair of braces: {}.
These do not render.

rh



lineno and multicol

2011-05-29 Thread Sebastian Stein
Hello!

I'm using lineno within a multicol (with two columns) environment.
The numbering doesn't change from left to right margin with the columnbreak, I 
have to do this manually. Unfortunately this doesn't work within a
paragraph, so I have to insert a new one. Sometimes within one sentence, which 
looks awfully.
Has someone a workaround?

Thanks.

Regards
Sebastian



R Gaphics for Lyx

2011-05-29 Thread Graham Smith
 I'm looking for some advice on format and quality specification for
exporting graphs from R to go into a Lyx Document, that will end up as a
printed document.

At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
using them as 9cm x 9cm in the document.

Has anyone got  a standard spec that they use for exporting from R to keep
the file size as small as possible while still giving high quality

I am less than half way through a document which currently has 122 graphs
(each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can compress the
PDF with a Nautilus script down to 11Mb, but it would make sense to export
graphs that were as small as possible. At half a Gb, the preview scrolls
really badly on my PC.

Many thanks,

Graham


Re: end flyleaf

2011-05-29 Thread Richard Opheim
Neither two page breaks nor a pair of braces in a Tex code box produced a
blank page at the end of the document.

I wonder about the white graphic solution (which I saw mentioned in the
archives), though. Will the printing press think that white has to be
printed on white? I guess the graphic could be very small, even miniscule.

On Sun, May 29, 2011 at 6:28 AM, Richard Heck rgh...@comcast.net wrote:

 On 05/28/2011 01:30 PM, Richard Opheim wrote:
  Perhaps I should have said back flyleaf---the blank page(s) between
  the last printed page and the end paper of a book.
 
 I would have thought a couple applications of InsertFormattingNew Page
 (or Page Break) would do this. If there's an issue with having content
 on the page, just do: InsertTex Code, and put a pair of braces: {}.
 These do not render.

 rh




-- 
Richard Opheim
Home: 425-486-5421
Cell: 425-381-9213


Re: R Gaphics for Lyx

2011-05-29 Thread Murat Yildizoglu
Hi Graham,

If I understand well your message, your plots have a lot of data points and
since each point is represented as a vector object, the vector based formats
like eps or pdf become huge. For such graphics, I generally choose to
flatten them using a bitmap format (jpg or png) with a sufficient density
(like 300 dpi). This gives relatively small size (in comparison with the
vector format, and acceptable print quality). These bitmap formats are
normally compatible with pdflatex. Otherwise, you can always convert them to
eps (but they will be just bitmaps enclosed in an vector enveloppe) for
using with a dvips based chain.

I hope this can help you.

Murat

2011/5/29 Graham Smith myotis...@gmail.com

  I'm looking for some advice on format and quality specification for
 exporting graphs from R to go into a Lyx Document, that will end up as a
 printed document.

 At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
 using them as 9cm x 9cm in the document.

 Has anyone got  a standard spec that they use for exporting from R to keep
 the file size as small as possible while still giving high quality

 I am less than half way through a document which currently has 122 graphs
 (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can compress the
 PDF with a Nautilus script down to 11Mb, but it would make sense to export
 graphs that were as small as possible. At half a Gb, the preview scrolls
 really badly on my PC.

 Many thanks,

 Graham






-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http:/yildizoglu.co.cc
http://www.twitter.com/yildizoglu
__


Re: R Gaphics for Lyx

2011-05-29 Thread Graham Smith
Hello Murat


 If I understand well your message, your plots have a lot of data points and
 since each point is represented as a vector object, the vector based formats
 like eps or pdf become huge.


I often use PNGs if the files are going to end up in a Windows program, but
have got used to using PDFs whenever I can.  I will give PNGs a try and see
how big a difference it makes.

Thanks,

Graham


Re: end flyleaf

2011-05-29 Thread Julien Rioux

On 29/05/2011 4:35 PM, Richard Opheim wrote:

Neither two page breaks nor a pair of braces in a Tex code box produced a
blank page at the end of the document.

I wonder about the white graphic solution (which I saw mentioned in the
archives), though. Will the printing press think that white has to be
printed on white? I guess the graphic could be very small, even miniscule.

On Sun, May 29, 2011 at 6:28 AM, Richard Heckrgh...@comcast.net  wrote:


On 05/28/2011 01:30 PM, Richard Opheim wrote:

Perhaps I should have said back flyleaf---the blank page(s) between
the last printed page and the end paper of a book.


I would have thought a couple applications of InsertFormattingNew Page
(or Page Break) would do this. If there's an issue with having content
on the page, just do: InsertTex Code, and put a pair of braces: {}.
These do not render.

rh







You can use Insert  Formatting  Vertical space to put a protected 
vfill on the last page.


To remove page numbers put
\thispagestyle{empty}
in a TeX code box.

--
Julien



Re: R Gaphics for Lyx

2011-05-29 Thread Renaud Lacour
Le Sun, 29 May 2011 21:26:57 +0100,
Graham Smith myotis...@gmail.com a écrit :

  I'm looking for some advice on format and quality specification for
 exporting graphs from R to go into a Lyx Document, that will end up as a
 printed document.
 
 At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
 using them as 9cm x 9cm in the document.
 
 Has anyone got  a standard spec that they use for exporting from R to
 keep the file size as small as possible while still giving high quality
 
 I am less than half way through a document which currently has 122
 graphs (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can
 compress the PDF with a Nautilus script down to 11Mb, but it would make
 sense to export graphs that were as small as possible. At half a Gb,
 the preview scrolls really badly on my PC.
 
 Many thanks,
 
 Graham
Hi,

You could try the R package tikzDevice which generates PGF/Tikz graphics
suitable for inclusion in your Latex/Lyx document. Contrary to pictex
which is deprecated, tikzDevice will provide you with full color high
quality graphics suitable for compilation with pdflatex. Moreover, pdf
documents that include such graphics seem to be rather small.

Regards,

-- 
Renaud Lacour ren...@home-dn.net


Re: R Gaphics for Lyx

2011-05-29 Thread Yihui Xie
I like the tikzDevice package and use it frequently, but in this case
I guess it cannot help much -- the huge tikz plots may even not be
able to get compiled to PDF successfully due to memory limits.
However, I think Graham's question has pointed out a very useful
direction -- we may consider leaving some sort of API's or hooks in
the R script in LyX which is used to process the Rnw document. I mean,
e.g., we let the user define a function to post-process all the PDF's
generated by Sweave and this function can be called after Sweave has
finished processing the Rnw document. This is not hard to implement. I
have some similar ideas implemented in my patch to the current Sweave
module (http://www.lyx.org/trac/ticket/7555; see the PDF documents
there).

A few months ago I also recommended the qpdf program to R developers
to compress PDF plots and it has been included in R now (the option
--compact-vignettes in R CMD build). Graham, is your script portable
to Windows and Mac? Could you share it with us? Maybe we can propose
this feature to LyX developers. It will be definitely helpful.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Sun, May 29, 2011 at 4:18 PM, Renaud Lacour ren...@home-dn.net wrote:
 Le Sun, 29 May 2011 21:26:57 +0100,
 Graham Smith myotis...@gmail.com a écrit :

  I'm looking for some advice on format and quality specification for
 exporting graphs from R to go into a Lyx Document, that will end up as a
 printed document.

 At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
 using them as 9cm x 9cm in the document.

 Has anyone got  a standard spec that they use for exporting from R to
 keep the file size as small as possible while still giving high quality

 I am less than half way through a document which currently has 122
 graphs (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can
 compress the PDF with a Nautilus script down to 11Mb, but it would make
 sense to export graphs that were as small as possible. At half a Gb,
 the preview scrolls really badly on my PC.

 Many thanks,

 Graham
 Hi,

 You could try the R package tikzDevice which generates PGF/Tikz graphics
 suitable for inclusion in your Latex/Lyx document. Contrary to pictex
 which is deprecated, tikzDevice will provide you with full color high
 quality graphics suitable for compilation with pdflatex. Moreover, pdf
 documents that include such graphics seem to be rather small.

 Regards,

 --
 Renaud Lacour ren...@home-dn.net



Re: export to HTML, math equation quality

2011-05-29 Thread Richard Heck
On 05/28/2011 05:39 PM, jong wrote:

 So I switched to Ubuntu 11.04 with Lyx2.0

 It came with two html export option (html and Lyxhtml) - It seems that one of
 these two utilize elyxer but not sure which one is which.

HTML uses elyxer if it is installed. LyXHTML is always the internal LyX
routine, which is new in 2.0.0. For relatively simple equations, it does
seem to work quite well.

 The second export option (Lyxhtml) really worked!! It produced all details of
 math expressions(integral, tilde, hat, etc) flawlessly. And they are all 
 vector
 graphics therefore can be scalable! 

What they are depends upon your choice of method (under
DocumentSettingsOutput). The default is that they are MathML, which
your browser renders how it likes but will scale with changes. But if
there are LaTeX constructs in your equations that we do not recognize
(packages LyX does not support, say, or XY arrows, and such), then we
fall back to image export. Making the resolution of those images
settable is on my agenda, though they can be scaled via
DocumentSettingsExport again.

Richard



Re: end flyleaf

2011-05-29 Thread Richard Heck
On 05/28/2011 01:30 PM, Richard Opheim wrote:
 Perhaps I should have said back flyleaf---the blank page(s) between
 the last printed page and the end paper of a book.

I would have thought a couple applications of InsertFormattingNew Page
(or Page Break) would do this. If there's an issue with having content
on the page, just do: InsertTex Code, and put a pair of braces: {}.
These do not render.

rh



lineno and multicol

2011-05-29 Thread Sebastian Stein
Hello!

I'm using lineno within a multicol (with two columns) environment.
The numbering doesn't change from left to right margin with the columnbreak, I 
have to do this manually. Unfortunately this doesn't work within a
paragraph, so I have to insert a new one. Sometimes within one sentence, which 
looks awfully.
Has someone a workaround?

Thanks.

Regards
Sebastian



R Gaphics for Lyx

2011-05-29 Thread Graham Smith
 I'm looking for some advice on format and quality specification for
exporting graphs from R to go into a Lyx Document, that will end up as a
printed document.

At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
using them as 9cm x 9cm in the document.

Has anyone got  a standard spec that they use for exporting from R to keep
the file size as small as possible while still giving high quality

I am less than half way through a document which currently has 122 graphs
(each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can compress the
PDF with a Nautilus script down to 11Mb, but it would make sense to export
graphs that were as small as possible. At half a Gb, the preview scrolls
really badly on my PC.

Many thanks,

Graham


Re: end flyleaf

2011-05-29 Thread Richard Opheim
Neither two page breaks nor a pair of braces in a Tex code box produced a
blank page at the end of the document.

I wonder about the white graphic solution (which I saw mentioned in the
archives), though. Will the printing press think that white has to be
printed on white? I guess the graphic could be very small, even miniscule.

On Sun, May 29, 2011 at 6:28 AM, Richard Heck rgh...@comcast.net wrote:

 On 05/28/2011 01:30 PM, Richard Opheim wrote:
  Perhaps I should have said back flyleaf---the blank page(s) between
  the last printed page and the end paper of a book.
 
 I would have thought a couple applications of InsertFormattingNew Page
 (or Page Break) would do this. If there's an issue with having content
 on the page, just do: InsertTex Code, and put a pair of braces: {}.
 These do not render.

 rh




-- 
Richard Opheim
Home: 425-486-5421
Cell: 425-381-9213


Re: R Gaphics for Lyx

2011-05-29 Thread Murat Yildizoglu
Hi Graham,

If I understand well your message, your plots have a lot of data points and
since each point is represented as a vector object, the vector based formats
like eps or pdf become huge. For such graphics, I generally choose to
flatten them using a bitmap format (jpg or png) with a sufficient density
(like 300 dpi). This gives relatively small size (in comparison with the
vector format, and acceptable print quality). These bitmap formats are
normally compatible with pdflatex. Otherwise, you can always convert them to
eps (but they will be just bitmaps enclosed in an vector enveloppe) for
using with a dvips based chain.

I hope this can help you.

Murat

2011/5/29 Graham Smith myotis...@gmail.com

  I'm looking for some advice on format and quality specification for
 exporting graphs from R to go into a Lyx Document, that will end up as a
 printed document.

 At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
 using them as 9cm x 9cm in the document.

 Has anyone got  a standard spec that they use for exporting from R to keep
 the file size as small as possible while still giving high quality

 I am less than half way through a document which currently has 122 graphs
 (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can compress the
 PDF with a Nautilus script down to 11Mb, but it would make sense to export
 graphs that were as small as possible. At half a Gb, the preview scrolls
 really badly on my PC.

 Many thanks,

 Graham






-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http:/yildizoglu.co.cc
http://www.twitter.com/yildizoglu
__


Re: R Gaphics for Lyx

2011-05-29 Thread Graham Smith
Hello Murat


 If I understand well your message, your plots have a lot of data points and
 since each point is represented as a vector object, the vector based formats
 like eps or pdf become huge.


I often use PNGs if the files are going to end up in a Windows program, but
have got used to using PDFs whenever I can.  I will give PNGs a try and see
how big a difference it makes.

Thanks,

Graham


Re: end flyleaf

2011-05-29 Thread Julien Rioux

On 29/05/2011 4:35 PM, Richard Opheim wrote:

Neither two page breaks nor a pair of braces in a Tex code box produced a
blank page at the end of the document.

I wonder about the white graphic solution (which I saw mentioned in the
archives), though. Will the printing press think that white has to be
printed on white? I guess the graphic could be very small, even miniscule.

On Sun, May 29, 2011 at 6:28 AM, Richard Heckrgh...@comcast.net  wrote:


On 05/28/2011 01:30 PM, Richard Opheim wrote:

Perhaps I should have said back flyleaf---the blank page(s) between
the last printed page and the end paper of a book.


I would have thought a couple applications of InsertFormattingNew Page
(or Page Break) would do this. If there's an issue with having content
on the page, just do: InsertTex Code, and put a pair of braces: {}.
These do not render.

rh







You can use Insert  Formatting  Vertical space to put a protected 
vfill on the last page.


To remove page numbers put
\thispagestyle{empty}
in a TeX code box.

--
Julien



Re: R Gaphics for Lyx

2011-05-29 Thread Renaud Lacour
Le Sun, 29 May 2011 21:26:57 +0100,
Graham Smith myotis...@gmail.com a écrit :

  I'm looking for some advice on format and quality specification for
 exporting graphs from R to go into a Lyx Document, that will end up as a
 printed document.
 
 At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
 using them as 9cm x 9cm in the document.
 
 Has anyone got  a standard spec that they use for exporting from R to
 keep the file size as small as possible while still giving high quality
 
 I am less than half way through a document which currently has 122
 graphs (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can
 compress the PDF with a Nautilus script down to 11Mb, but it would make
 sense to export graphs that were as small as possible. At half a Gb,
 the preview scrolls really badly on my PC.
 
 Many thanks,
 
 Graham
Hi,

You could try the R package tikzDevice which generates PGF/Tikz graphics
suitable for inclusion in your Latex/Lyx document. Contrary to pictex
which is deprecated, tikzDevice will provide you with full color high
quality graphics suitable for compilation with pdflatex. Moreover, pdf
documents that include such graphics seem to be rather small.

Regards,

-- 
Renaud Lacour ren...@home-dn.net


Re: R Gaphics for Lyx

2011-05-29 Thread Yihui Xie
I like the tikzDevice package and use it frequently, but in this case
I guess it cannot help much -- the huge tikz plots may even not be
able to get compiled to PDF successfully due to memory limits.
However, I think Graham's question has pointed out a very useful
direction -- we may consider leaving some sort of API's or hooks in
the R script in LyX which is used to process the Rnw document. I mean,
e.g., we let the user define a function to post-process all the PDF's
generated by Sweave and this function can be called after Sweave has
finished processing the Rnw document. This is not hard to implement. I
have some similar ideas implemented in my patch to the current Sweave
module (http://www.lyx.org/trac/ticket/7555; see the PDF documents
there).

A few months ago I also recommended the qpdf program to R developers
to compress PDF plots and it has been included in R now (the option
--compact-vignettes in R CMD build). Graham, is your script portable
to Windows and Mac? Could you share it with us? Maybe we can propose
this feature to LyX developers. It will be definitely helpful.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Sun, May 29, 2011 at 4:18 PM, Renaud Lacour ren...@home-dn.net wrote:
 Le Sun, 29 May 2011 21:26:57 +0100,
 Graham Smith myotis...@gmail.com a écrit :

  I'm looking for some advice on format and quality specification for
 exporting graphs from R to go into a Lyx Document, that will end up as a
 printed document.

 At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
 using them as 9cm x 9cm in the document.

 Has anyone got  a standard spec that they use for exporting from R to
 keep the file size as small as possible while still giving high quality

 I am less than half way through a document which currently has 122
 graphs (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can
 compress the PDF with a Nautilus script down to 11Mb, but it would make
 sense to export graphs that were as small as possible. At half a Gb,
 the preview scrolls really badly on my PC.

 Many thanks,

 Graham
 Hi,

 You could try the R package tikzDevice which generates PGF/Tikz graphics
 suitable for inclusion in your Latex/Lyx document. Contrary to pictex
 which is deprecated, tikzDevice will provide you with full color high
 quality graphics suitable for compilation with pdflatex. Moreover, pdf
 documents that include such graphics seem to be rather small.

 Regards,

 --
 Renaud Lacour ren...@home-dn.net



Re: export to HTML, math equation quality

2011-05-29 Thread Richard Heck
On 05/28/2011 05:39 PM, jong wrote:
>
> So I switched to Ubuntu 11.04 with Lyx2.0
>
> It came with two html export option (html and Lyxhtml) - It seems that one of
> these two utilize elyxer but not sure which one is which.
>
HTML uses elyxer if it is installed. LyXHTML is always the internal LyX
routine, which is new in 2.0.0. For relatively simple equations, it does
seem to work quite well.

> The second export option (Lyxhtml) really worked!! It produced all details of
> math expressions(integral, tilde, hat, etc) flawlessly. And they are all 
> vector
> graphics therefore can be scalable! 
>
What they are depends upon your choice of method (under
Document>Settings>Output). The default is that they are MathML, which
your browser renders how it likes but will scale with changes. But if
there are LaTeX constructs in your equations that we do not recognize
(packages LyX does not support, say, or XY arrows, and such), then we
fall back to image export. Making the resolution of those images
settable is on my agenda, though they can be scaled via
Document>Settings>Export again.

Richard



Re: end flyleaf

2011-05-29 Thread Richard Heck
On 05/28/2011 01:30 PM, Richard Opheim wrote:
> Perhaps I should have said "back flyleaf"---the blank page(s) between
> the last printed page and the end paper of a book.
>
I would have thought a couple applications of Insert>Formatting>New Page
(or Page Break) would do this. If there's an issue with having content
on the page, just do: Insert>Tex Code, and put a pair of braces: {}.
These do not render.

rh



lineno and multicol

2011-05-29 Thread Sebastian Stein
Hello!

I'm using lineno within a multicol (with two columns) environment.
The numbering doesn't change from left to right margin with the columnbreak, I 
have to do this manually. Unfortunately this doesn't work within a
paragraph, so I have to insert a new one. Sometimes within one sentence, which 
looks awfully.
Has someone a workaround?

Thanks.

Regards
Sebastian



R Gaphics for Lyx

2011-05-29 Thread Graham Smith
 I'm looking for some advice on format and quality specification for
exporting graphs from R to go into a Lyx Document, that will end up as a
printed document.

At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
using them as 9cm x 9cm in the document.

Has anyone got  a standard spec that they use for exporting from R to keep
the file size as small as possible while still giving high quality

I am less than half way through a document which currently has 122 graphs
(each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can compress the
PDF with a Nautilus script down to 11Mb, but it would make sense to export
graphs that were as small as possible. At half a Gb, the preview scrolls
really badly on my PC.

Many thanks,

Graham


Re: end flyleaf

2011-05-29 Thread Richard Opheim
Neither two page breaks nor a pair of braces in a Tex code box produced a
blank page at the end of the document.

I wonder about the white graphic solution (which I saw mentioned in the
archives), though. Will the printing press think that white has to be
printed on white? I guess the graphic could be very small, even miniscule.

On Sun, May 29, 2011 at 6:28 AM, Richard Heck  wrote:

> On 05/28/2011 01:30 PM, Richard Opheim wrote:
> > Perhaps I should have said "back flyleaf"---the blank page(s) between
> > the last printed page and the end paper of a book.
> >
> I would have thought a couple applications of Insert>Formatting>New Page
> (or Page Break) would do this. If there's an issue with having content
> on the page, just do: Insert>Tex Code, and put a pair of braces: {}.
> These do not render.
>
> rh
>
>


-- 
Richard Opheim
Home: 425-486-5421
Cell: 425-381-9213


Re: R Gaphics for Lyx

2011-05-29 Thread Murat Yildizoglu
Hi Graham,

If I understand well your message, your plots have a lot of data points and
since each point is represented as a vector object, the vector based formats
like eps or pdf become huge. For such graphics, I generally choose to
flatten them using a bitmap format (jpg or png) with a sufficient density
(like 300 dpi). This gives relatively small size (in comparison with the
vector format, and acceptable print quality). These bitmap formats are
normally compatible with pdflatex. Otherwise, you can always convert them to
eps (but they will be just bitmaps enclosed in an vector enveloppe) for
using with a dvips based chain.

I hope this can help you.

Murat

2011/5/29 Graham Smith 

>  I'm looking for some advice on format and quality specification for
> exporting graphs from R to go into a Lyx Document, that will end up as a
> printed document.
>
> At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
> using them as 9cm x 9cm in the document.
>
> Has anyone got  a standard spec that they use for exporting from R to keep
> the file size as small as possible while still giving high quality
>
> I am less than half way through a document which currently has 122 graphs
> (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can compress the
> PDF with a Nautilus script down to 11Mb, but it would make sense to export
> graphs that were as small as possible. At half a Gb, the preview scrolls
> really badly on my PC.
>
> Many thanks,
>
> Graham
>
>
>
>


-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http:/yildizoglu.co.cc
http://www.twitter.com/yildizoglu
__


Re: R Gaphics for Lyx

2011-05-29 Thread Graham Smith
Hello Murat


> If I understand well your message, your plots have a lot of data points and
> since each point is represented as a vector object, the vector based formats
> like eps or pdf become huge.


I often use PNGs if the files are going to end up in a Windows program, but
have got used to using PDFs whenever I can.  I will give PNGs a try and see
how big a difference it makes.

Thanks,

Graham


Re: end flyleaf

2011-05-29 Thread Julien Rioux

On 29/05/2011 4:35 PM, Richard Opheim wrote:

Neither two page breaks nor a pair of braces in a Tex code box produced a
blank page at the end of the document.

I wonder about the white graphic solution (which I saw mentioned in the
archives), though. Will the printing press think that white has to be
printed on white? I guess the graphic could be very small, even miniscule.

On Sun, May 29, 2011 at 6:28 AM, Richard Heck  wrote:


On 05/28/2011 01:30 PM, Richard Opheim wrote:

Perhaps I should have said "back flyleaf"---the blank page(s) between
the last printed page and the end paper of a book.


I would have thought a couple applications of Insert>Formatting>New Page
(or Page Break) would do this. If there's an issue with having content
on the page, just do: Insert>Tex Code, and put a pair of braces: {}.
These do not render.

rh







You can use Insert > Formatting > Vertical space to put a protected 
vfill on the last page.


To remove page numbers put
\thispagestyle{empty}
in a TeX code box.

--
Julien



Re: R Gaphics for Lyx

2011-05-29 Thread Renaud Lacour
Le Sun, 29 May 2011 21:26:57 +0100,
Graham Smith  a écrit :

>  I'm looking for some advice on format and quality specification for
> exporting graphs from R to go into a Lyx Document, that will end up as a
> printed document.
> 
> At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
> using them as 9cm x 9cm in the document.
> 
> Has anyone got  a standard spec that they use for exporting from R to
> keep the file size as small as possible while still giving high quality
> 
> I am less than half way through a document which currently has 122
> graphs (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can
> compress the PDF with a Nautilus script down to 11Mb, but it would make
> sense to export graphs that were as small as possible. At half a Gb,
> the preview scrolls really badly on my PC.
> 
> Many thanks,
> 
> Graham
Hi,

You could try the R package tikzDevice which generates PGF/Tikz graphics
suitable for inclusion in your Latex/Lyx document. Contrary to pictex
which is deprecated, tikzDevice will provide you with full color high
quality graphics suitable for compilation with pdflatex. Moreover, pdf
documents that include such graphics seem to be rather small.

Regards,

-- 
Renaud Lacour 


Re: R Gaphics for Lyx

2011-05-29 Thread Yihui Xie
I like the tikzDevice package and use it frequently, but in this case
I guess it cannot help much -- the huge tikz plots may even not be
able to get compiled to PDF successfully due to memory limits.
However, I think Graham's question has pointed out a very useful
direction -- we may consider leaving some sort of API's or hooks in
the R script in LyX which is used to process the Rnw document. I mean,
e.g., we let the user define a function to post-process all the PDF's
generated by Sweave and this function can be called after Sweave has
finished processing the Rnw document. This is not hard to implement. I
have some similar ideas implemented in my patch to the current Sweave
module (http://www.lyx.org/trac/ticket/7555; see the PDF documents
there).

A few months ago I also recommended the qpdf program to R developers
to compress PDF plots and it has been included in R now (the option
--compact-vignettes in R CMD build). Graham, is your script portable
to Windows and Mac? Could you share it with us? Maybe we can propose
this feature to LyX developers. It will be definitely helpful.

Regards,
Yihui
--
Yihui Xie 
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Sun, May 29, 2011 at 4:18 PM, Renaud Lacour  wrote:
> Le Sun, 29 May 2011 21:26:57 +0100,
> Graham Smith  a écrit :
>
>>  I'm looking for some advice on format and quality specification for
>> exporting graphs from R to go into a Lyx Document, that will end up as a
>> printed document.
>>
>> At the moment each graph using the R defaults is a 3 - 4mb PDF, and I am
>> using them as 9cm x 9cm in the document.
>>
>> Has anyone got  a standard spec that they use for exporting from R to
>> keep the file size as small as possible while still giving high quality
>>
>> I am less than half way through a document which currently has 122
>> graphs (each 9cm x 9cm) in it that gives me  a PDF of half a Gb. I can
>> compress the PDF with a Nautilus script down to 11Mb, but it would make
>> sense to export graphs that were as small as possible. At half a Gb,
>> the preview scrolls really badly on my PC.
>>
>> Many thanks,
>>
>> Graham
> Hi,
>
> You could try the R package tikzDevice which generates PGF/Tikz graphics
> suitable for inclusion in your Latex/Lyx document. Contrary to pictex
> which is deprecated, tikzDevice will provide you with full color high
> quality graphics suitable for compilation with pdflatex. Moreover, pdf
> documents that include such graphics seem to be rather small.
>
> Regards,
>
> --
> Renaud Lacour 
>