Re: [WINDOWS] Python scripts fail
On 02/03/2011 03:12 PM, Gabriel Kniffin wrote: I did View > PDF (pdflatex) then checked the temporary directory. It has all the EPS files with name changes as well as copies of the EPS files with .pdf extensions. There is an EPS -> PDF converter. It's ps2pdf and the converter line matches what you have. Just as a check I tried View > PDF (ps2pdf) and it generated a .pdf, but after opening it Adobe Reader crashed. Not sure why, but I opened another .pdf that I didn't just make with LyX and it crashed too, so I figured it was an Adobe Reader problem. I rebooted and tried again and it worked! I then tried View > PDF (pdflatex) and it works too. I'm not sure what changed, but I hope it stays fixed. Doesn't sound as if you changed anything, but if View > PDF (pdflatex) was creating PDFs in the temp directory (and if they were not 0 byte files), then you _should_ have been getting images in the PDF output file. So this is still a mystery. One more thing, I still get errors if I go to Document > Settings... > PDF Properties and click Use hyperref support. Can you use the hyperref package this way or is there a better way? That works (and is the designated way to do it), provided that you don't separately load hyperref in the preamble. If hyperref gets loaded twice, it usually crabs about conflicting settings. Some document classes may load hyperref automatically (I think maybe beamer does), so this can get tricky. /Paul
Re: [WINDOWS] Python scripts fail
I did View > PDF (pdflatex) then checked the temporary directory. It has all the EPS files with name changes as well as copies of the EPS files with .pdf extensions. There is an EPS -> PDF converter. It's ps2pdf and the converter line matches what you have. Just as a check I tried View > PDF (ps2pdf) and it generated a .pdf, but after opening it Adobe Reader crashed. Not sure why, but I opened another .pdf that I didn't just make with LyX and it crashed too, so I figured it was an Adobe Reader problem. I rebooted and tried again and it worked! I then tried View > PDF (pdflatex) and it works too. I'm not sure what changed, but I hope it stays fixed. One more thing, I still get errors if I go to Document > Settings... > PDF Properties and click Use hyperref support. Can you use the hyperref package this way or is there a better way? Thanks for all your help! -Gabe On Thu, Feb 3, 2011 at 6:50 AM, Paul A. Rubin wrote: > On 2/2/2011 9:35 PM, Gabriel Kniffin wrote: > >> >> Unfortunately I'm still getting the same "...cannot determine size of >> graphic in..." errors when trying to build a .pdf. >> >> You mentioned in a previous message that the images are all EPS files, > and IIRC you said that they show up in DVI and PS output but not in PDF > output. That suggests that LyX is failing to convert them to a preferred > format for PDF output. (EPS images go directly into PS output without > format change, and I believe that's also true of DVI output.) > > First check: View > PDF and, with LyX still open, peek into the temporary > directory and see if the EPS files were copied there (with name changes) and > if there are copies with the same file names but .pdf extensions. My guess > is the answers will be yes and no in that order. > > Next, go to Tools > Preferences... > File Handling > Converters and confirm > that there is at least one converter defined from EPS to PDF, and that the > converter line reads 'epstopdf --outfile=$$o $$i'. On my Windows box, the > converter is from EPS to PDF (ps2pdf) rather than to PDF (pdflatex), but > that does not seem to matter -- when I run View PDF (pdflatex), LyX runs > epstopdf. > > Finally, open a command shell and run 'kpsewhich epstopdf.exe'. If MiKTeX > is correctly installed, it should return the path to epstopdf.exe. > > /Paul > -- Gabriel Kniffin Research Assistant Northwest Electromagnetics and Acoustics Research Laboratory (NEAR-Lab) http://nearlab.ece.pdx.edu/ Electrical and Computer Engineering Dept. Portland State University (503) 725-3813 Lab (360) 521-8772 Mobile
Re: [WINDOWS] Python scripts fail
On 2/2/2011 9:35 PM, Gabriel Kniffin wrote: Unfortunately I'm still getting the same "...cannot determine size of graphic in..." errors when trying to build a .pdf. You mentioned in a previous message that the images are all EPS files, and IIRC you said that they show up in DVI and PS output but not in PDF output. That suggests that LyX is failing to convert them to a preferred format for PDF output. (EPS images go directly into PS output without format change, and I believe that's also true of DVI output.) First check: View > PDF and, with LyX still open, peek into the temporary directory and see if the EPS files were copied there (with name changes) and if there are copies with the same file names but .pdf extensions. My guess is the answers will be yes and no in that order. Next, go to Tools > Preferences... > File Handling > Converters and confirm that there is at least one converter defined from EPS to PDF, and that the converter line reads 'epstopdf --outfile=$$o $$i'. On my Windows box, the converter is from EPS to PDF (ps2pdf) rather than to PDF (pdflatex), but that does not seem to matter -- when I run View PDF (pdflatex), LyX runs epstopdf. Finally, open a command shell and run 'kpsewhich epstopdf.exe'. If MiKTeX is correctly installed, it should return the path to epstopdf.exe. /Paul
Re: [WINDOWS] Python scripts fail
Thanks! I ran bibtex as you suggested and the output looked like bibtex didn't recognize the bibstyle I was using. I changed it and now it seems to be producing .ps files with figures and bibliography without a hitch! Unfortunately I'm still getting the same "...cannot determine size of graphic in..." errors when trying to build a .pdf. Any suggestions? Thanks again, -Gabe On Wed, Feb 2, 2011 at 1:16 PM, Paul A. Rubin wrote: > On 02/02/2011 03:59 PM, Gabriel Kniffin wrote: > >> The .bbl file is there but explorer says its size is 0 KB. >> >> That means that (a) BibTeX was run (which is good) and (b) it failed (not > so good). > > Try exporting your document to a .tex file (File > Export > LaTeX (plain)). > Open a command shell and run > > latex myfile > bibtex myfile > latex myfile > > where myfile.tex is the LaTeX file you created. See what messages you get > from the bibtex run. Also see if the DVI file you wind up with has the > citations properly filled in. > > /Paul > > -- Gabriel Kniffin Research Assistant Northwest Electromagnetics and Acoustics Research Laboratory (NEAR-Lab) http://nearlab.ece.pdx.edu/ Electrical and Computer Engineering Dept. Portland State University (503) 725-3813 Lab (360) 521-8772 Mobile
Re: [WINDOWS] Python scripts fail
On 02/02/2011 03:59 PM, Gabriel Kniffin wrote: The .bbl file is there but explorer says its size is 0 KB. That means that (a) BibTeX was run (which is good) and (b) it failed (not so good). Try exporting your document to a .tex file (File > Export > LaTeX (plain)). Open a command shell and run latex myfile bibtex myfile latex myfile where myfile.tex is the LaTeX file you created. See what messages you get from the bibtex run. Also see if the DVI file you wind up with has the citations properly filled in. /Paul
Re: [WINDOWS] Python scripts fail
On 02/02/2011 3:13 PM, Gabriel Kniffin wrote: There are no strings in the log file that match the name of my .bib file (Kniffin_2011.bib) which is in the same directory (in the E: drive) as my LyX file, but there is some text at the bottom that points to a .bbl the C: drive that matches the name of my .bib file Yes probably your lyx file is Kniffin_2011.lyx ? Then lyx creates a Kniffin_2011.tex file and latex produces a Kniffin_2011.aux file and bibtex produces a Kniffin_2011.bbl file... the name of the .bib file does not matter as long as it is found by bibtex. But to answer Mr. Rubin's question: Does the LaTeX log file have anything to say about that? If all the citations show up as ?, either it can't find the .bib file or latex (or pdflatex) was not run enough times. can you confirm that in the LyX's temp dir, there are no .bib file and no .eps files? This would indicate that there is a problem with LyX copying those files there. -- Julien
Re: [WINDOWS] Python scripts fail
The .bbl file is there but explorer says its size is 0 KB. On Wed, Feb 2, 2011 at 12:34 PM, Richard Heck wrote: > On 02/02/2011 03:13 PM, Gabriel Kniffin wrote: > >> The images are all .eps files. >> >> The log file says "LaTeX Warning: Citation `' on page >> undefined on input line ." Then on the >> bottom it says "LaTeX: Warning: There were undefined references." >> >> There are no strings in the log file that match the name of my .bib file >> (Kniffin_2011.bib) which is in the same directory (in the E: drive) as my >> LyX file, but there is some text at the bottom that points to a .bbl the C: >> drive that matches the name of my .bib file: >> "[21] >> >> >> (C:\Users\kniffing\AppData\Local\Temp\lyx_tmpdir.Hp3296\lyx_tmpbuf0\Kniffin_201 >> >> 1.bbl) [22]" >> >> >> This is in LyX's temporary directory. You might want to check and see if > this file actually exists. (The directory changes each time, so start > over) > > Richard > > -- Gabriel Kniffin Research Assistant Northwest Electromagnetics and Acoustics Research Laboratory (NEAR-Lab) http://nearlab.ece.pdx.edu/ Electrical and Computer Engineering Dept. Portland State University (503) 725-3813 Lab (360) 521-8772 Mobile
Re: [WINDOWS] Python scripts fail
On 02/02/2011 03:13 PM, Gabriel Kniffin wrote: The images are all .eps files. The log file says "LaTeX Warning: Citation `' on page undefined on input line ." Then on the bottom it says "LaTeX: Warning: There were undefined references." There are no strings in the log file that match the name of my .bib file (Kniffin_2011.bib) which is in the same directory (in the E: drive) as my LyX file, but there is some text at the bottom that points to a .bbl the C: drive that matches the name of my .bib file: "[21] (C:\Users\kniffing\AppData\Local\Temp\lyx_tmpdir.Hp3296\lyx_tmpbuf0\Kniffin_201 1.bbl) [22]" This is in LyX's temporary directory. You might want to check and see if this file actually exists. (The directory changes each time, so start over) Richard
Re: [WINDOWS] Python scripts fail
The images are all .eps files. The log file says "LaTeX Warning: Citation `' on page undefined on input line ." Then on the bottom it says "LaTeX: Warning: There were undefined references." There are no strings in the log file that match the name of my .bib file (Kniffin_2011.bib) which is in the same directory (in the E: drive) as my LyX file, but there is some text at the bottom that points to a .bbl the C: drive that matches the name of my .bib file: "[21] (C:\Users\kniffing\AppData\Local\Temp\lyx_tmpdir.Hp3296\lyx_tmpbuf0\Kniffin_201 1.bbl) [22]" -Gabe On Wed, Feb 2, 2011 at 6:36 AM, Paul A. Rubin wrote: > On 2/1/2011 7:12 PM, Gabriel Kniffin wrote: > >> The image files live on my E: drive. I'm able to build a .ps or .dvi >> without any figure issues, just not a .pdf. >> > What format are the image files? I wonder if the reason DVI works and PDF > doesn't has to do with a failed attempt to convert the format. > > >> Also, I still get a [?] instead of citations in the document after I've >> added my .bib file to the LyX document using the "LyX: BibTeX Bibliography" >> dialog box. >> > Does the LaTeX log file have anything to say about that? If all the > citations show up as ?, either it can't find the .bib file or latex (or > pdflatex) was not run enough times. > > /Paul > -- Gabriel Kniffin Research Assistant Northwest Electromagnetics and Acoustics Research Laboratory (NEAR-Lab) http://nearlab.ece.pdx.edu/ Electrical and Computer Engineering Dept. Portland State University (503) 725-3813 Lab (360) 521-8772 Mobile
Re: [WINDOWS] Python scripts fail
On 2/1/2011 7:12 PM, Gabriel Kniffin wrote: The image files live on my E: drive. I'm able to build a .ps or .dvi without any figure issues, just not a .pdf. What format are the image files? I wonder if the reason DVI works and PDF doesn't has to do with a failed attempt to convert the format. Also, I still get a [?] instead of citations in the document after I've added my .bib file to the LyX document using the "LyX: BibTeX Bibliography" dialog box. Does the LaTeX log file have anything to say about that? If all the citations show up as ?, either it can't find the .bib file or latex (or pdflatex) was not run enough times. /Paul
Re: [WINDOWS] Python scripts fail
The image files live on my E: drive. I'm able to build a .ps or .dvi without any figure issues, just not a .pdf. Also, I still get a [?] instead of citations in the document after I've added my .bib file to the LyX document using the "LyX: BibTeX Bibliography" dialog box. Thanks! -Gabe On Tue, Feb 1, 2011 at 2:58 PM, Paul A. Rubin wrote: > On 02/01/2011 05:44 PM, Gabriel Kniffin wrote: > >> The -userdir switch as you suggested seems to have fixed the texfiles.py >> failing problem, although now I'm getting a bunch of the following LaTeX >> errors when I try to build a .pdf: >> >> "LaTeX Error: Cannot determine the size of graphic in <...>" >> > That usually means either that the graphic somehow was not copied to the > temp directory or was not properly converted (so, for instance, the source > file is an EPS, LyX tries but fails to convert it to a PDF, and the .tex > file has a link to a nonexistent PDF). If the image files live on a network > server, I suppose you might check whether that's the culprit (by copying > them to E: and adjusting the paths in the LyX file). > > >> Also, the user directory is only set to the E: drive when I open LyX via >> the command prompt using the -userdir switch. Is there a way to make this >> the default setting so whenever I open a .lyx file it uses this switch? Is >> that the start menu hack you mentioned? >> > Yes. > > How do I do that? >> > Right click the icon and click Properties, find the text box containing the > command (I'm on a Linux laptop right now, so I can't quote specifics), and > add the -userdir ... stuff there. If your path contains any spaces, be sure > to enclose it in quotes. > > Another way to do this is to right click the Start button and click Open, > which opens your start menu in Windows Explorer. (At least, this works on > XT; can't swear about Win 7.) Drill down to the folder containing the LyX > icon and do the right click > Properties act there. > > /Paul > > -- Gabriel Kniffin Research Assistant Northwest Electromagnetics and Acoustics Research Laboratory (NEAR-Lab) http://nearlab.ece.pdx.edu/ Electrical and Computer Engineering Dept. Portland State University (503) 725-3813 Lab (360) 521-8772 Mobile
Re: [WINDOWS] Python scripts fail
On 02/01/2011 05:44 PM, Gabriel Kniffin wrote: The -userdir switch as you suggested seems to have fixed the texfiles.py failing problem, although now I'm getting a bunch of the following LaTeX errors when I try to build a .pdf: "LaTeX Error: Cannot determine the size of graphic in <...>" That usually means either that the graphic somehow was not copied to the temp directory or was not properly converted (so, for instance, the source file is an EPS, LyX tries but fails to convert it to a PDF, and the .tex file has a link to a nonexistent PDF). If the image files live on a network server, I suppose you might check whether that's the culprit (by copying them to E: and adjusting the paths in the LyX file). Also, the user directory is only set to the E: drive when I open LyX via the command prompt using the -userdir switch. Is there a way to make this the default setting so whenever I open a .lyx file it uses this switch? Is that the start menu hack you mentioned? Yes. How do I do that? Right click the icon and click Properties, find the text box containing the command (I'm on a Linux laptop right now, so I can't quote specifics), and add the -userdir ... stuff there. If your path contains any spaces, be sure to enclose it in quotes. Another way to do this is to right click the Start button and click Open, which opens your start menu in Windows Explorer. (At least, this works on XT; can't swear about Win 7.) Drill down to the folder containing the LyX icon and do the right click > Properties act there. /Paul
Re: [WINDOWS] Python scripts fail
The -userdir switch as you suggested seems to have fixed the texfiles.py failing problem, although now I'm getting a bunch of the following LaTeX errors when I try to build a .pdf: "LaTeX Error: Cannot determine the size of graphic in <...>" Also, the user directory is only set to the E: drive when I open LyX via the command prompt using the -userdir switch. Is there a way to make this the default setting so whenever I open a .lyx file it uses this switch? Is that the start menu hack you mentioned? How do I do that? Thanks! -Gabe On Tue, Feb 1, 2011 at 12:57 PM, Paul A. Rubin wrote: > On 02/01/2011 01:42 PM, kniff...@cecs.pdx.edu wrote: > >> The E: drive is a partition of the computer's hard drive. It's the "user" >> drive of my work computer that I, as a user, am free to modify. The C: drive >> is maintained by our IT dept. >> >> It looks like my user directory is on the network. I went to Tools > >> Preferences > Paths but it doesn't look like I can change my user directory >> from there. Any suggestions? >> > Create a directory on E: for your local settings (E:\lyxuser or whatever > you want to call it), then open a command prompt and run 'lyx -userdir > E:\lyxuser' (or whatever path you chose). It should recreate your user > directory. Check your TeX info and/or try to do whatever it was that broke > before (a Bibtex bibliography?). > > If that turns out to be the problem, you can hack the Start menu icon for > LyX to include the -userdir switch. > > /Paul > -- Gabriel Kniffin Research Assistant Northwest Electromagnetics and Acoustics Research Laboratory (NEAR-Lab) http://nearlab.ece.pdx.edu/ Electrical and Computer Engineering Dept. Portland State University (503) 725-3813 Lab (360) 521-8772 Mobile
Re: [WINDOWS] Python scripts fail
On 02/01/2011 01:42 PM, kniff...@cecs.pdx.edu wrote: The E: drive is a partition of the computer's hard drive. It's the "user" drive of my work computer that I, as a user, am free to modify. The C: drive is maintained by our IT dept. It looks like my user directory is on the network. I went to Tools > Preferences > Paths but it doesn't look like I can change my user directory from there. Any suggestions? Create a directory on E: for your local settings (E:\lyxuser or whatever you want to call it), then open a command prompt and run 'lyx -userdir E:\lyxuser' (or whatever path you chose). It should recreate your user directory. Check your TeX info and/or try to do whatever it was that broke before (a Bibtex bibliography?). If that turns out to be the problem, you can hack the Start menu icon for LyX to include the -userdir switch. /Paul
Re: [WINDOWS] Python scripts fail
The E: drive is a partition of the computer's hard drive. It's the "user" drive of my work computer that I, as a user, am free to modify. The C: drive is maintained by our IT dept. It looks like my user directory is on the network. I went to Tools > Preferences > Paths but it doesn't look like I can change my user directory from there. Any suggestions? Thanks, -Gabe
Re: [WINDOWS] Python scripts fail
Gabriel Kniffin gmail.com> writes: > I opened the script with python via command line. Here's the > result: "E:\ProgramFiles\LyX16\Resources\scripts>E:\ProgramFiles\LyX16\python\ python TeXFiles.py Indexing files of type cls Indexing files of type sty Indexing files of type bst Indexing files of type bib" > The python files do show up with the python icon in explorer. When I click > Tools > TeX Information I get the same error indicating TexFiles.py > failed and the window that opens to display the file list is empty > (see attached image).Thanks,-Gabe The output from the script is correct, and obviously the Python installation that the LyX installer deposited on your system is working. I noticed that LyX is installed on your E: drive. Is this a partition of one of your hard drives, or is this a mapped network drive? Perhaps more importantly, where is your LyX user directory (Help > About LyX > Version, "user directory")? Once upon a time there were problems with running LyX from a Windows roaming profile (home directory on a mapped server); I don't know if that's still an issue. /Paul
Re: [WINDOWS] Python scripts fail
I opened the script with python via command line. Here's the result: "E:\ProgramFiles\LyX16\Resources\scripts>E:\ProgramFiles\LyX16\python\python TeXFiles.py Indexing files of type cls Indexing files of type sty Indexing files of type bst Indexing files of type bib" The python files do show up with the python icon in explorer. When I click Tools > TeX Information I get the same error indicating TexFiles.py failed and the window that opens to display the file list is empty (see attached image). Thanks, -Gabe On Fri, Jan 28, 2011 at 7:22 PM, Richard Heck wrote: > On 01/28/2011 05:35 PM, Gabriel Kniffin wrote: > >> Thanks Richard, >> >> I just reinstalled LyX using LyX-1.6.8-2-Installer.exe but I'm still >> having the same problem. >> >> I also checked to make sure TeXFiles.py file is there, which it is. >> >> I also noticed the same error happens when I go to Tools > TeX >> Information. >> >> Any suggestions? Should I try installing a full version of python? >> >> I've changed the subject to try to attract the attention of the Windows > crowd. It certainly looks as if there is some problem with your python > installation. You might want to try the alternate installer, which I think > also installs a usable version of python. > > Richard > > <>
[WINDOWS] Python scripts fail
On 01/28/2011 05:35 PM, Gabriel Kniffin wrote: Thanks Richard, I just reinstalled LyX using LyX-1.6.8-2-Installer.exe but I'm still having the same problem. I also checked to make sure TeXFiles.py file is there, which it is. I also noticed the same error happens when I go to Tools > TeX Information. Any suggestions? Should I try installing a full version of python? I've changed the subject to try to attract the attention of the Windows crowd. It certainly looks as if there is some problem with your python installation. You might want to try the alternate installer, which I think also installs a usable version of python. Richard