Re: Lyx + gnuplot epslatex
On Fri, Dec 11, 2009 at 12:21 PM, Jonathan Brandmeyer jbrandme...@earthlink.net wrote: I am having difficulty using Gnuplot's epslatex output in conjunction with Lyx. Gnuplot itself is capable of separately providing EPS graphics as well as text and labels as Tex code. Strictly speaking, I'm using Octave as a front-end to Gnuplot, but that shouldn't matter. So, I have the .tex and the .eps files produced by gnuplot, and a .lyx file that attempts to use the file as input. I'm testing this in Ubuntu. I am NOT testme it with LyX, since give us a LaTeX file testme.tex. Using your example code, I do get 2 graphs, one complete, one a skeleton. The second inclusion in your file is a mistake. With the attached testme.tex, I get good dvi output with latex testme.tex and if I create a pdf version of your eps file and run pdf latex thus: $ epstopdf tangent_impulse.eps $ pdflatex testme.tex Then I get good output as well. This makes me believe the problems you are having trace back to the availability of fonts to your LaTeX processing system or your pdf viewer. I also attach a LyX file pjtest.lyx I created that DOES work to include the tangent_impulse graphics and LaTeX markup. For me, the only required change from a basic lyx doc was to put \usepackage{graphicx} in the preamble. I get both dvi and pdf output that are fine. HTH pj -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas testme.tex Description: TeX document testme.dvi Description: TeX dvi file testme.pdf Description: Adobe PDF document pjtest.lyx Description: application/lyx
Re: Lyx + gnuplot epslatex
On Fri, Dec 11, 2009 at 12:21 PM, Jonathan Brandmeyer jbrandme...@earthlink.net wrote: I am having difficulty using Gnuplot's epslatex output in conjunction with Lyx. Gnuplot itself is capable of separately providing EPS graphics as well as text and labels as Tex code. Strictly speaking, I'm using Octave as a front-end to Gnuplot, but that shouldn't matter. So, I have the .tex and the .eps files produced by gnuplot, and a .lyx file that attempts to use the file as input. I'm testing this in Ubuntu. I am NOT testme it with LyX, since give us a LaTeX file testme.tex. Using your example code, I do get 2 graphs, one complete, one a skeleton. The second inclusion in your file is a mistake. With the attached testme.tex, I get good dvi output with latex testme.tex and if I create a pdf version of your eps file and run pdf latex thus: $ epstopdf tangent_impulse.eps $ pdflatex testme.tex Then I get good output as well. This makes me believe the problems you are having trace back to the availability of fonts to your LaTeX processing system or your pdf viewer. I also attach a LyX file pjtest.lyx I created that DOES work to include the tangent_impulse graphics and LaTeX markup. For me, the only required change from a basic lyx doc was to put \usepackage{graphicx} in the preamble. I get both dvi and pdf output that are fine. HTH pj -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas testme.tex Description: TeX document testme.dvi Description: TeX dvi file testme.pdf Description: Adobe PDF document pjtest.lyx Description: application/lyx
Re: Lyx + gnuplot epslatex
On Fri, Dec 11, 2009 at 12:21 PM, Jonathan Brandmeyerwrote: > I am having difficulty using Gnuplot's epslatex output in conjunction > with Lyx. Gnuplot itself is capable of separately providing EPS graphics > as well as text and labels as Tex code. Strictly speaking, I'm using > Octave as a front-end to Gnuplot, but that shouldn't matter. > > So, I have the .tex and the .eps files produced by gnuplot, and a .lyx > file that attempts to use the file as input. > I'm testing this in Ubuntu. I am NOT "testme" it with LyX, since give us a LaTeX file "testme.tex". Using your example code, I do get 2 graphs, one complete, one a skeleton. The second inclusion in your file is a mistake. With the attached "testme.tex", I get good dvi output with "latex testme.tex" and if I create a pdf version of your eps file and run pdf latex thus: $ epstopdf tangent_impulse.eps $ pdflatex testme.tex Then I get good output as well. This makes me believe the problems you are having trace back to the availability of fonts to your LaTeX processing system or your pdf viewer. I also attach a LyX file "pjtest.lyx" I created that DOES work to include the tangent_impulse graphics and LaTeX markup. For me, the only required change from a basic lyx doc was to put \usepackage{graphicx} in the preamble. I get both dvi and pdf output that are fine. HTH pj -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas testme.tex Description: TeX document testme.dvi Description: TeX dvi file testme.pdf Description: Adobe PDF document pjtest.lyx Description: application/lyx
Re: Lyx + gnuplot epslatex
Jonathan Brandmeyer jbrandme...@... writes: () Since the latex produced by lyx only uses relative path names, I don't think that the error is in Lyx - it is in some program distributed with texlive. Thanks for the help. -Jonathan Hi, I'm not a Latex/lyx expert but I have the same kind of problems with GNUPLOT in Lyx as you have. I've been searching for a solution for centuries, and for me it boils down to this: % WARNING % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) Peter
Re: Lyx + gnuplot epslatex
Jonathan Brandmeyer jbrandme...@... writes: I am having difficulty using Gnuplot's epslatex output in conjunction with Lyx. Gnuplot itself is capable of separately providing EPS graphics as well as text and labels as Tex code. Strictly speaking, I'm using Octave as a front-end to Gnuplot, but that shouldn't matter. Hi, I'm not a Latex/lyx expert but I have the same kind of problems with GNUPLOT in Lyx as you have. I've been searching for a solution for centuries, and for me it boils down to this: % WARNING % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) Peter
Re: Lyx + gnuplot epslatex
peter kint wrote: % WARNING % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) (Disclaimer: I have not tried this myself, since I don't use gnuplot.) First, you obviously need to have gnuplot installed and working. In LyX, go to Tools Preferences File Handling Converters and select (highlight) the LaTeX (pdflatex) - PDF (pdflatex) converter. In the Converter: entry, change pdflatex $$i to pdflatex --shell-escape $$i and save it. See if that helps. If it does, you might consider a fancier solution. You could go to Tools Preferences File Handling File formats and create a new format (let's call it PDF (with plots)), then back to ... Converters and create a LaTeX (pdflatex) - PDF (with plots) converter using the converter syntax above (and return the first converter to its original syntax). You would then use View PDF (with plots) rather than View PDF (pdflatex) to view files with gnuplots in them (and similarly with file export). The reason for doing this would be security -- it would allow shell escapes only for documents where you knew you needed them. FWIW, I think the low security approach is pretty safe unless you have a habit of including raw LaTeX files from unverified sources in your documents. /Paul
Re: Lyx + gnuplot epslatex
Paul A. Rubin ru...@... writes: (Disclaimer: I have not tried this myself, since I don't use gnuplot.) First, you obviously need to have gnuplot installed and working. In LyX, go to Tools Preferences File Handling Converters and /Paul Hi Paul, Your first suggestion did not work. At compiling he gives an:which he did not give before: File does not exist: /tmp/lyx_tmpdir.T15846/lyx_tmpbuf2/ex_fys_5aso_2u_kerst.pdf (ex_fys_5aso_2u_kerst is the name of my file) But my feeling is you are on the right track... The problem now is that I cant compile any lyx-file anymore :-) So , for the moment I'll try to get back to my previous Lyx-configuration. Thanks for helping, you made me feel as if I'm 'pretty close' Peter
Re: Lyx + gnuplot epslatex
Jonathan Brandmeyer jbrandme...@... writes: () Since the latex produced by lyx only uses relative path names, I don't think that the error is in Lyx - it is in some program distributed with texlive. Thanks for the help. -Jonathan Hi, I'm not a Latex/lyx expert but I have the same kind of problems with GNUPLOT in Lyx as you have. I've been searching for a solution for centuries, and for me it boils down to this: % WARNING % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) Peter
Re: Lyx + gnuplot epslatex
Jonathan Brandmeyer jbrandme...@... writes: I am having difficulty using Gnuplot's epslatex output in conjunction with Lyx. Gnuplot itself is capable of separately providing EPS graphics as well as text and labels as Tex code. Strictly speaking, I'm using Octave as a front-end to Gnuplot, but that shouldn't matter. Hi, I'm not a Latex/lyx expert but I have the same kind of problems with GNUPLOT in Lyx as you have. I've been searching for a solution for centuries, and for me it boils down to this: % WARNING % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) Peter
Re: Lyx + gnuplot epslatex
peter kint wrote: % WARNING % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) (Disclaimer: I have not tried this myself, since I don't use gnuplot.) First, you obviously need to have gnuplot installed and working. In LyX, go to Tools Preferences File Handling Converters and select (highlight) the LaTeX (pdflatex) - PDF (pdflatex) converter. In the Converter: entry, change pdflatex $$i to pdflatex --shell-escape $$i and save it. See if that helps. If it does, you might consider a fancier solution. You could go to Tools Preferences File Handling File formats and create a new format (let's call it PDF (with plots)), then back to ... Converters and create a LaTeX (pdflatex) - PDF (with plots) converter using the converter syntax above (and return the first converter to its original syntax). You would then use View PDF (with plots) rather than View PDF (pdflatex) to view files with gnuplots in them (and similarly with file export). The reason for doing this would be security -- it would allow shell escapes only for documents where you knew you needed them. FWIW, I think the low security approach is pretty safe unless you have a habit of including raw LaTeX files from unverified sources in your documents. /Paul
Re: Lyx + gnuplot epslatex
Paul A. Rubin ru...@... writes: (Disclaimer: I have not tried this myself, since I don't use gnuplot.) First, you obviously need to have gnuplot installed and working. In LyX, go to Tools Preferences File Handling Converters and /Paul Hi Paul, Your first suggestion did not work. At compiling he gives an:which he did not give before: File does not exist: /tmp/lyx_tmpdir.T15846/lyx_tmpbuf2/ex_fys_5aso_2u_kerst.pdf (ex_fys_5aso_2u_kerst is the name of my file) But my feeling is you are on the right track... The problem now is that I cant compile any lyx-file anymore :-) So , for the moment I'll try to get back to my previous Lyx-configuration. Thanks for helping, you made me feel as if I'm 'pretty close' Peter
Re: Lyx + gnuplot epslatex
Jonathan Brandmeyerwrites: > () > Since the latex produced by lyx only uses relative path names, I don't > think that the error is in Lyx - it is in some program distributed with > texlive. > > Thanks for the help. > > -Jonathan Hi, I'm not a Latex/lyx expert but I have the same kind of problems with GNUPLOT in Lyx as you have. I've been searching for a solution for centuries, and for me it boils down to this: % <<>> % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) Peter
Re: Lyx + gnuplot epslatex
Jonathan Brandmeyerwrites: > > I am having difficulty using Gnuplot's epslatex output in conjunction > with Lyx. Gnuplot itself is capable of separately providing EPS graphics > as well as text and labels as Tex code. Strictly speaking, I'm using > Octave as a front-end to Gnuplot, but that shouldn't matter. > Hi, I'm not a Latex/lyx expert but I have the same kind of problems with GNUPLOT in Lyx as you have. I've been searching for a solution for centuries, and for me it boils down to this: % <<>> % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) Peter
Re: Lyx + gnuplot epslatex
peter kint wrote: % <<>> % PGF/Tikz doesn't support the following mathematical functions: % tan, cosh, acosh, sinh, asinh, tanh, atanh % Plotting will be done using GNUPLOT % GNUPLOT must be installed and you must allow Latex to call external % programs by % Adding the following option to your compiler % shell-escapeORenable-write18 % Example: pdflatex --shell-escape file.tex Maybe this is some help to you. My question to you is: How do you add such a command to your compiler? (I wouldn't know where to start, I'm only using Linux for 3 months now) (Disclaimer: I have not tried this myself, since I don't use gnuplot.) First, you obviously need to have gnuplot installed and working. In LyX, go to Tools > Preferences > File Handling > Converters and select (highlight) the "LaTeX (pdflatex) -> PDF (pdflatex)" converter. In the "Converter:" entry, change "pdflatex $$i" to "pdflatex --shell-escape $$i" and save it. See if that helps. If it does, you might consider a fancier solution. You could go to Tools > Preferences > File Handling > File formats and create a new format (let's call it "PDF (with plots)"), then back to ... > Converters and create a "LaTeX (pdflatex) -> PDF (with plots)" converter using the converter syntax above (and return the first converter to its original syntax). You would then use "View > PDF (with plots)" rather than "View > PDF (pdflatex)" to view files with gnuplots in them (and similarly with file export). The reason for doing this would be security -- it would allow shell escapes only for documents where you knew you needed them. FWIW, I think the low security approach is pretty safe unless you have a habit of including raw LaTeX files from unverified sources in your documents. /Paul
Re: Lyx + gnuplot epslatex
Paul A. Rubinwrites: > (Disclaimer: I have not tried this myself, since I don't use gnuplot.) > > First, you obviously need to have gnuplot installed and working. > > In LyX, go to Tools > Preferences > File Handling > Converters and > /Paul Hi Paul, Your first suggestion did not work. At compiling he gives an:which he did not give before: File does not exist: /tmp/lyx_tmpdir.T15846/lyx_tmpbuf2/ex_fys_5aso_2u_kerst.pdf (ex_fys_5aso_2u_kerst is the name of my file) But my feeling is you are on the right track... The problem now is that I cant compile any lyx-file anymore :-) So , for the moment I'll try to get back to my previous Lyx-configuration. Thanks for helping, you made me feel as if I'm 'pretty close' Peter
Lyx + gnuplot epslatex
I am having difficulty using Gnuplot's epslatex output in conjunction with Lyx. Gnuplot itself is capable of separately providing EPS graphics as well as text and labels as Tex code. Strictly speaking, I'm using Octave as a front-end to Gnuplot, but that shouldn't matter. So, I have the .tex and the .eps files produced by gnuplot, and a .lyx file that attempts to use the file as input. Various tutorials, like http://psung.blogspot.com/2007/03/gnuplot-plots-in-latex.html suggest that this should work. However, I only get the labels and axes in the generated output, and none of the graphics. This happens regardless of the type of output generated by Lyx (PDF, DVI, or PS). If I manually \includegraphics the EPS, then it gets placed underneath the proper text as though it was a second figure or something. If I manually run latex on the plain LaTeX exported by Lyx, then the results are even stranger. The console output reports errors about an overfull \hbox. The graphics are displayed, as is the text for the legend, but the axes are not displayed. This is intensely frustrating. How is \input supposed to work? Its not like I'm using ERT or anything like that. A minimal example that demonstrates the problem is attached. Thanks, -Jonathan Brandmeyer OS: Debian Sid on x86_64 Lyx: 1.6.4 Gnuplot 4.2 patchlevel 6 attachment: tangent_impulse.eps% GNUPLOT: LaTeX picture with Postscript \begingroup \makeatletter \providecommand\color[2][]{% \GenericError{(gnuplot) \space\space\spa...@spaces}{% Package color not loaded in conjunction with terminal option `colourtext'% }{See the gnuplot documentation for explanation.% }{Either use 'blacktext' in gnuplot or load the package color.sty in LaTeX.}% \renewcommand\color[2][]{}% }% \providecommand\includegraphics[2][]{% \GenericError{(gnuplot) \space\space\spa...@spaces}{% Package graphicx or graphics not loaded% }{See the gnuplot documentation for explanation.% }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}% \renewcommand\includegraphics[2][]{}% }% \providecommand\rotatebox[2]{#2}% \...@ifundefined{ifgpcolor}{% \newif\ifGPcolor \GPcolorfalse }{}% \...@ifundefined{ifgpblacktext}{% \newif\ifGPblacktext \GPblacktexttrue }{}% % define a \...@addto@macro without @ in the name: \let\gplgaddtomacr...@addto@macro % define empty templates for all commands taking text: \gdef\gplbacktext{}% \gdef\gplfronttext{}% \makeatother \ifGPblacktext % no textcolor at all \def\colorrgb#1{}% \def\colorgray#1{}% \else % gray or color? \ifGPcolor \def\colorrgb#1{\color[rgb]{#1}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}% \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}% \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}% \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}% \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}% \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}% \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}% \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}% \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}% \else % gray \def\colorrgb#1{\color{black}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color{black}}% \expandafter\def\csname LT1\endcsname{\color{black}}% \expandafter\def\csname LT2\endcsname{\color{black}}% \expandafter\def\csname LT3\endcsname{\color{black}}% \expandafter\def\csname LT4\endcsname{\color{black}}% \expandafter\def\csname LT5\endcsname{\color{black}}% \expandafter\def\csname LT6\endcsname{\color{black}}% \expandafter\def\csname LT7\endcsname{\color{black}}% \expandafter\def\csname LT8\endcsname{\color{black}}% \fi \fi \setlength{\unitlength}{0.0500bp}% \begin{picture}(7200.00,5040.00)% \gplgaddtomacro\gplbacktext{% \colorrgb{0.00,0.00,0.00}% \put(1210,704){\makebox(0,0)[r]{\strut{}0}}% \colorrgb{0.00,0.00,0.00}% \put(1210,1303){\makebox(0,0)[r]{\strut{}500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,1902){\makebox(0,0)[r]{\strut{}1000}}% \colorrgb{0.00,0.00,0.00}% \put(1210,2500){\makebox(0,0)[r]{\strut{}1500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,3099){\makebox(0,0)[r]{\strut{}2000}}% \colorrgb{0.00,0.00,0.00}% \put(1210,3698){\makebox(0,0)[r]{\strut{}2500}}%
Re: Lyx + gnuplot epslatex
From: Jonathan Brandmeyer jbrandme...@earthlink.net However, I only get the labels and axes in the generated output, and none of the graphics. ... Thanks, -Jonathan Brandmeyer OS: Debian Sid on x86_64 Lyx: 1.6.4 Gnuplot 4.2 patchlevel 6 Your files compile as advertised with MikTeX 2.8 under winXP. I also tried under ubuntu 9.10 and found that evince fails to display the axis ticks and labels. xdvi shows everything fine, and in fact if I use dvips it does produce a postscript file where everything displays properly. Maybe check which viewer you are using, it might be a bug with that particular application? Julien testme.pdf Description: Adobe PDF document
Re: Lyx + gnuplot epslatex
On Fri, 2009-12-11 at 18:18 -0500, Julien Rioux wrote: From: Jonathan Brandmeyer jbrandme...@earthlink.net However, I only get the labels and axes in the generated output, and none of the graphics. ... Thanks, -Jonathan Brandmeyer OS: Debian Sid on x86_64 Lyx: 1.6.4 Gnuplot 4.2 patchlevel 6 Your files compile as advertised with MikTeX 2.8 under winXP. I also tried under ubuntu 9.10 and found that evince fails to display the axis ticks and labels. xdvi shows everything fine, and in fact if I use dvips it does produce a postscript file where everything displays properly. Maybe check which viewer you are using, it might be a bug with that particular application? Thank you for the extensive list of programs for testing purposes. For reference, evince displays the PDF you sent me just fine. When I ran dvips on the LyX-generated DVI I received the following useful error: quote dvips: Unknown keyword (project/latex//radial_impulse_latex.eps...) in \special will be ignored dvips: Could not find figure file /home/jonathan/courses/mae521/final; continuing. Note that an absolute path or a relative path with .. are denied in -R2 mode. ] /quote /me jumps up and down screaming. Yes, this means that something in my LaTeX stack doesn't work well with whitespace in directory names (one of the parents of the working directory is final project). After renaming that folder with an underscore in the space's place, we have the following status: - Postscript output from LyX works fine and looks good. - PDF output from LyX works fine. The vertical text has an oddly broken appearance, but that could be a rendering bug. - In the DVI output, the y-axis label is not rotated 90 deg, it is horizontal when viewed with xdvi. However, after conversion to .ps the file looks good. Since the latex produced by lyx only uses relative path names, I don't think that the error is in Lyx - it is in some program distributed with texlive. Thanks for the help. -Jonathan
Lyx + gnuplot epslatex
I am having difficulty using Gnuplot's epslatex output in conjunction with Lyx. Gnuplot itself is capable of separately providing EPS graphics as well as text and labels as Tex code. Strictly speaking, I'm using Octave as a front-end to Gnuplot, but that shouldn't matter. So, I have the .tex and the .eps files produced by gnuplot, and a .lyx file that attempts to use the file as input. Various tutorials, like http://psung.blogspot.com/2007/03/gnuplot-plots-in-latex.html suggest that this should work. However, I only get the labels and axes in the generated output, and none of the graphics. This happens regardless of the type of output generated by Lyx (PDF, DVI, or PS). If I manually \includegraphics the EPS, then it gets placed underneath the proper text as though it was a second figure or something. If I manually run latex on the plain LaTeX exported by Lyx, then the results are even stranger. The console output reports errors about an overfull \hbox. The graphics are displayed, as is the text for the legend, but the axes are not displayed. This is intensely frustrating. How is \input supposed to work? Its not like I'm using ERT or anything like that. A minimal example that demonstrates the problem is attached. Thanks, -Jonathan Brandmeyer OS: Debian Sid on x86_64 Lyx: 1.6.4 Gnuplot 4.2 patchlevel 6 attachment: tangent_impulse.eps% GNUPLOT: LaTeX picture with Postscript \begingroup \makeatletter \providecommand\color[2][]{% \GenericError{(gnuplot) \space\space\spa...@spaces}{% Package color not loaded in conjunction with terminal option `colourtext'% }{See the gnuplot documentation for explanation.% }{Either use 'blacktext' in gnuplot or load the package color.sty in LaTeX.}% \renewcommand\color[2][]{}% }% \providecommand\includegraphics[2][]{% \GenericError{(gnuplot) \space\space\spa...@spaces}{% Package graphicx or graphics not loaded% }{See the gnuplot documentation for explanation.% }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}% \renewcommand\includegraphics[2][]{}% }% \providecommand\rotatebox[2]{#2}% \...@ifundefined{ifgpcolor}{% \newif\ifGPcolor \GPcolorfalse }{}% \...@ifundefined{ifgpblacktext}{% \newif\ifGPblacktext \GPblacktexttrue }{}% % define a \...@addto@macro without @ in the name: \let\gplgaddtomacr...@addto@macro % define empty templates for all commands taking text: \gdef\gplbacktext{}% \gdef\gplfronttext{}% \makeatother \ifGPblacktext % no textcolor at all \def\colorrgb#1{}% \def\colorgray#1{}% \else % gray or color? \ifGPcolor \def\colorrgb#1{\color[rgb]{#1}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}% \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}% \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}% \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}% \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}% \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}% \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}% \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}% \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}% \else % gray \def\colorrgb#1{\color{black}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color{black}}% \expandafter\def\csname LT1\endcsname{\color{black}}% \expandafter\def\csname LT2\endcsname{\color{black}}% \expandafter\def\csname LT3\endcsname{\color{black}}% \expandafter\def\csname LT4\endcsname{\color{black}}% \expandafter\def\csname LT5\endcsname{\color{black}}% \expandafter\def\csname LT6\endcsname{\color{black}}% \expandafter\def\csname LT7\endcsname{\color{black}}% \expandafter\def\csname LT8\endcsname{\color{black}}% \fi \fi \setlength{\unitlength}{0.0500bp}% \begin{picture}(7200.00,5040.00)% \gplgaddtomacro\gplbacktext{% \colorrgb{0.00,0.00,0.00}% \put(1210,704){\makebox(0,0)[r]{\strut{}0}}% \colorrgb{0.00,0.00,0.00}% \put(1210,1303){\makebox(0,0)[r]{\strut{}500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,1902){\makebox(0,0)[r]{\strut{}1000}}% \colorrgb{0.00,0.00,0.00}% \put(1210,2500){\makebox(0,0)[r]{\strut{}1500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,3099){\makebox(0,0)[r]{\strut{}2000}}% \colorrgb{0.00,0.00,0.00}% \put(1210,3698){\makebox(0,0)[r]{\strut{}2500}}%
Re: Lyx + gnuplot epslatex
From: Jonathan Brandmeyer jbrandme...@earthlink.net However, I only get the labels and axes in the generated output, and none of the graphics. ... Thanks, -Jonathan Brandmeyer OS: Debian Sid on x86_64 Lyx: 1.6.4 Gnuplot 4.2 patchlevel 6 Your files compile as advertised with MikTeX 2.8 under winXP. I also tried under ubuntu 9.10 and found that evince fails to display the axis ticks and labels. xdvi shows everything fine, and in fact if I use dvips it does produce a postscript file where everything displays properly. Maybe check which viewer you are using, it might be a bug with that particular application? Julien testme.pdf Description: Adobe PDF document
Re: Lyx + gnuplot epslatex
On Fri, 2009-12-11 at 18:18 -0500, Julien Rioux wrote: From: Jonathan Brandmeyer jbrandme...@earthlink.net However, I only get the labels and axes in the generated output, and none of the graphics. ... Thanks, -Jonathan Brandmeyer OS: Debian Sid on x86_64 Lyx: 1.6.4 Gnuplot 4.2 patchlevel 6 Your files compile as advertised with MikTeX 2.8 under winXP. I also tried under ubuntu 9.10 and found that evince fails to display the axis ticks and labels. xdvi shows everything fine, and in fact if I use dvips it does produce a postscript file where everything displays properly. Maybe check which viewer you are using, it might be a bug with that particular application? Thank you for the extensive list of programs for testing purposes. For reference, evince displays the PDF you sent me just fine. When I ran dvips on the LyX-generated DVI I received the following useful error: quote dvips: Unknown keyword (project/latex//radial_impulse_latex.eps...) in \special will be ignored dvips: Could not find figure file /home/jonathan/courses/mae521/final; continuing. Note that an absolute path or a relative path with .. are denied in -R2 mode. ] /quote /me jumps up and down screaming. Yes, this means that something in my LaTeX stack doesn't work well with whitespace in directory names (one of the parents of the working directory is final project). After renaming that folder with an underscore in the space's place, we have the following status: - Postscript output from LyX works fine and looks good. - PDF output from LyX works fine. The vertical text has an oddly broken appearance, but that could be a rendering bug. - In the DVI output, the y-axis label is not rotated 90 deg, it is horizontal when viewed with xdvi. However, after conversion to .ps the file looks good. Since the latex produced by lyx only uses relative path names, I don't think that the error is in Lyx - it is in some program distributed with texlive. Thanks for the help. -Jonathan
Lyx + gnuplot epslatex
I am having difficulty using Gnuplot's epslatex output in conjunction with Lyx. Gnuplot itself is capable of separately providing EPS graphics as well as text and labels as Tex code. Strictly speaking, I'm using Octave as a front-end to Gnuplot, but that shouldn't matter. So, I have the .tex and the .eps files produced by gnuplot, and a .lyx file that attempts to use the file as input. Various tutorials, like http://psung.blogspot.com/2007/03/gnuplot-plots-in-latex.html suggest that this should work. However, I only get the labels and axes in the generated output, and none of the graphics. This happens regardless of the type of output generated by Lyx (PDF, DVI, or PS). If I manually \includegraphics the EPS, then it gets placed underneath the proper text as though it was a second figure or something. If I manually run latex on the plain LaTeX exported by Lyx, then the results are even stranger. The console output reports errors about an overfull \hbox. The graphics are displayed, as is the text for the legend, but the axes are not displayed. This is intensely frustrating. How is \input supposed to work? Its not like I'm using ERT or anything like that. A minimal example that demonstrates the problem is attached. Thanks, -Jonathan Brandmeyer OS: Debian Sid on x86_64 Lyx: 1.6.4 Gnuplot 4.2 patchlevel 6 <>% GNUPLOT: LaTeX picture with Postscript \begingroup \makeatletter \providecommand\color[2][]{% \GenericError{(gnuplot) \space\space\spa...@spaces}{% Package color not loaded in conjunction with terminal option `colourtext'% }{See the gnuplot documentation for explanation.% }{Either use 'blacktext' in gnuplot or load the package color.sty in LaTeX.}% \renewcommand\color[2][]{}% }% \providecommand\includegraphics[2][]{% \GenericError{(gnuplot) \space\space\spa...@spaces}{% Package graphicx or graphics not loaded% }{See the gnuplot documentation for explanation.% }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}% \renewcommand\includegraphics[2][]{}% }% \providecommand\rotatebox[2]{#2}% \...@ifundefined{ifgpcolor}{% \newif\ifGPcolor \GPcolorfalse }{}% \...@ifundefined{ifgpblacktext}{% \newif\ifGPblacktext \GPblacktexttrue }{}% % define a \...@addto@macro without @ in the name: \let\gplgaddtomacr...@addto@macro % define empty templates for all commands taking text: \gdef\gplbacktext{}% \gdef\gplfronttext{}% \makeatother \ifGPblacktext % no textcolor at all \def\colorrgb#1{}% \def\colorgray#1{}% \else % gray or color? \ifGPcolor \def\colorrgb#1{\color[rgb]{#1}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}% \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}% \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}% \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}% \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}% \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}% \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}% \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}% \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}% \else % gray \def\colorrgb#1{\color{black}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color{black}}% \expandafter\def\csname LT1\endcsname{\color{black}}% \expandafter\def\csname LT2\endcsname{\color{black}}% \expandafter\def\csname LT3\endcsname{\color{black}}% \expandafter\def\csname LT4\endcsname{\color{black}}% \expandafter\def\csname LT5\endcsname{\color{black}}% \expandafter\def\csname LT6\endcsname{\color{black}}% \expandafter\def\csname LT7\endcsname{\color{black}}% \expandafter\def\csname LT8\endcsname{\color{black}}% \fi \fi \setlength{\unitlength}{0.0500bp}% \begin{picture}(7200.00,5040.00)% \gplgaddtomacro\gplbacktext{% \colorrgb{0.00,0.00,0.00}% \put(1210,704){\makebox(0,0)[r]{\strut{}0}}% \colorrgb{0.00,0.00,0.00}% \put(1210,1303){\makebox(0,0)[r]{\strut{}500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,1902){\makebox(0,0)[r]{\strut{}1000}}% \colorrgb{0.00,0.00,0.00}% \put(1210,2500){\makebox(0,0)[r]{\strut{}1500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,3099){\makebox(0,0)[r]{\strut{}2000}}% \colorrgb{0.00,0.00,0.00}% \put(1210,3698){\makebox(0,0)[r]{\strut{}2500}}% \colorrgb{0.00,0.00,0.00}%
Re: Lyx + gnuplot epslatex
From: Jonathan Brandmeyer> However, I only get the labels and axes in the > generated output, and none of the graphics. ... > Thanks, > -Jonathan Brandmeyer > > OS: Debian Sid on x86_64 > Lyx: 1.6.4 > Gnuplot 4.2 patchlevel 6 > Your files compile as advertised with MikTeX 2.8 under winXP. I also tried under ubuntu 9.10 and found that evince fails to display the axis ticks and labels. xdvi shows everything fine, and in fact if I use dvips it does produce a postscript file where everything displays properly. Maybe check which viewer you are using, it might be a bug with that particular application? Julien testme.pdf Description: Adobe PDF document
Re: Lyx + gnuplot epslatex
On Fri, 2009-12-11 at 18:18 -0500, Julien Rioux wrote: > > From: Jonathan Brandmeyer> However, I only get the labels and axes in the > generated output, and none of the graphics. > > ... > Thanks, > -Jonathan Brandmeyer > > OS: Debian Sid on x86_64 > Lyx: 1.6.4 > Gnuplot 4.2 patchlevel 6 > > Your files compile as advertised with MikTeX 2.8 under winXP. I also > tried under ubuntu 9.10 and found that evince fails to display the > axis ticks and labels. xdvi shows everything fine, and in fact if I > use dvips it does produce a postscript file where everything displays > properly. Maybe check which viewer you are using, it might be a bug > with that particular application? Thank you for the extensive list of programs for testing purposes. For reference, evince displays the PDF you sent me just fine. When I ran dvips on the LyX-generated DVI I received the following useful error: dvips: Unknown keyword (project/latex/"/radial_impulse_latex.eps...) in \special will be ignored dvips: Could not find figure file /home/jonathan/courses/mae521/final; continuing. Note that an absolute path or a relative path with .. are denied in -R2 mode. ] /me jumps up and down screaming. Yes, this means that something in my LaTeX stack doesn't work well with whitespace in directory names (one of the parents of the working directory is "final project"). After renaming that folder with an underscore in the space's place, we have the following status: - Postscript output from LyX works fine and looks good. - PDF output from LyX works fine. The vertical text has an oddly broken appearance, but that could be a rendering bug. - In the DVI output, the y-axis label is not rotated 90 deg, it is horizontal when viewed with xdvi. However, after conversion to .ps the file looks good. Since the latex produced by lyx only uses relative path names, I don't think that the error is in Lyx - it is in some program distributed with texlive. Thanks for the help. -Jonathan