Conversion Tools ⇒ LaTeX to PDF
LaTeX to PDF
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
LaTeX to PDF
We're waiting for the announced code. I surely won't be able to help you with this particular issue, but perhaps some other member will.simo wrote:I have figured out some way to convert .tex files to pdf using a batch file but it has some issues. like depositing .dvi files to the miktex root folder. I need help to do this better. Remember am using a batch file, I will post the cmds.
LaTeX to PDF
*****Note:***
*****1. the cmds 1st directs to the folder containing your .tex file*****
*****2. the file is compiled twice for clarity*****
***** I have named it compiler1.bat***
Code: Select all
cd\J:cd Simo Projectcd coding5thcmd /C latex "J:\Simo Project\coding5th\testfile.tex"cmd /C latex "J:\Simo Project\coding5th\testfile.tex"
Code: Select all
cd\J:cd Simo Projectcd coding5thcmd /C dvips -o "J:\Simo Project\coding5th\testfile.ps" "J:\Simo Project\coding5th\testfile.dvi"cmd /C dvips -Ppdf -t letter -o "J:\Simo Project\coding5th\testfile.ps" "J:\Simo Project\coding5th\testfile.dvi"
Code: Select all
cd\J:cd Simo Projectcd coding5thcmd /C ps2pdf14.bat "J:\Simo Project\coding5th\testfile.ps"
Code: Select all
@echo offcmd /C "J:\Simo Project\coding5th\compiler1.bat"cmd /C "J:\Simo Project\coding5th\compiler2.bat"cmd /C "J:\Simo Project\coding5th\compiler3.bat"
Miktex 2.8/2.7 0$(both should be updated)
TEXnicCenter 0$
Acrobat Reader 0$
......................
TOTAL 0$
....................
LaTeX to PDF
If you're using TexNicCenter, why not just run its LaTeX => PS => PDF routine? Why create your own?
Assuming latex, dvips and ps2pdf are all in your path, I'd just use something like:
Code: Select all
cd "%~dp1"latex --interaction=nonstopmode "%~n1.tex"bibtex "%~n1.tex"latex --interaction=nonstopmode "%~n1.tex"latex --interaction=nonstopmode "%~n1.tex"dvips "%~n1.dvi"ps2pdf "%~n1.ps"
This will allow you to pass the batch file a parameter, so that if it's called compile.bat, you could type in:
compile.bat "J:\Simo Project\coding5th\testfile.tex"
It'll compile and convert that file, but you could pass it anything else instead, including a relative path, I think.
I think that'll work anyway. Been a long time since I wrote a batch file for Windows, and I never ran ghostscript from a shell. I don't have any of these programs installed for Windows to check. (Windows sucks.)
What's wrong with that?
(Or just use pdflatex and be done with it?)
Re: LaTeX to PDF
I only needed the "interaction=nonstopmode" cmd to complete my space shuttle and am off to space.Get on board frabjous. My batch file is running perfectly well.
Good day
Re: LaTeX to PDF
And at least I was able to solve my problem.
Confirm pliz
Re: LaTeX to PDF
The commands I gave were meant for a Windows/DOS batch file, but I didn't actually test it since I don't have LaTeX installed on my Windows partition.
(Of course, writing a bash script that does the same thing for linux is even easier, but would be different.)
If it doesn't work for you, it's a little hard to diagnose without telling me what went wrong.
Run the batch file from the command line, and don't include @echo off, so it shows the actual commands, and copy all the output here, and maybe I can figure out why it isn't working.
"pliz" is not a word.
Re: LaTeX to PDF
they are available in the edit software