How to create pdf with command line using MiKTeX?











up vote
26
down vote

favorite
10












I downloaded and installed MikTeX on my machine (Windows 7), then when I run the command:



latex ex.tex 


the outputs were:




  1. ex.aux

  2. ex.dvi

  3. ex.log


So my question is, what option could I use to produce ex.pdf? Any suggestion?










share|improve this question




















  • 1




    To produce PDF output, you have 2 choices: using pdflatex only or using latex followed by dvips followed by ps2pdf. The former pdflatex allows you to import PDF, JPG, and PNG images. The latter latex-dvips-ps2pdf allows you to import EPS images and PSTricks code. It is worth using an editor to write your input file .tex. There are many editors for Windows, such as TeXnicCenter, TeXStudio (formerly named as TeXMakerX), etc.
    – xport
    Jun 22 '11 at 23:12

















up vote
26
down vote

favorite
10












I downloaded and installed MikTeX on my machine (Windows 7), then when I run the command:



latex ex.tex 


the outputs were:




  1. ex.aux

  2. ex.dvi

  3. ex.log


So my question is, what option could I use to produce ex.pdf? Any suggestion?










share|improve this question




















  • 1




    To produce PDF output, you have 2 choices: using pdflatex only or using latex followed by dvips followed by ps2pdf. The former pdflatex allows you to import PDF, JPG, and PNG images. The latter latex-dvips-ps2pdf allows you to import EPS images and PSTricks code. It is worth using an editor to write your input file .tex. There are many editors for Windows, such as TeXnicCenter, TeXStudio (formerly named as TeXMakerX), etc.
    – xport
    Jun 22 '11 at 23:12















up vote
26
down vote

favorite
10









up vote
26
down vote

favorite
10






10





I downloaded and installed MikTeX on my machine (Windows 7), then when I run the command:



latex ex.tex 


the outputs were:




  1. ex.aux

  2. ex.dvi

  3. ex.log


So my question is, what option could I use to produce ex.pdf? Any suggestion?










share|improve this question















I downloaded and installed MikTeX on my machine (Windows 7), then when I run the command:



latex ex.tex 


the outputs were:




  1. ex.aux

  2. ex.dvi

  3. ex.log


So my question is, what option could I use to produce ex.pdf? Any suggestion?







pdf compiling windows






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 6 '13 at 21:44









scravy

1524




1524










asked Jun 22 '11 at 22:24









Chan

3,892114765




3,892114765








  • 1




    To produce PDF output, you have 2 choices: using pdflatex only or using latex followed by dvips followed by ps2pdf. The former pdflatex allows you to import PDF, JPG, and PNG images. The latter latex-dvips-ps2pdf allows you to import EPS images and PSTricks code. It is worth using an editor to write your input file .tex. There are many editors for Windows, such as TeXnicCenter, TeXStudio (formerly named as TeXMakerX), etc.
    – xport
    Jun 22 '11 at 23:12
















  • 1




    To produce PDF output, you have 2 choices: using pdflatex only or using latex followed by dvips followed by ps2pdf. The former pdflatex allows you to import PDF, JPG, and PNG images. The latter latex-dvips-ps2pdf allows you to import EPS images and PSTricks code. It is worth using an editor to write your input file .tex. There are many editors for Windows, such as TeXnicCenter, TeXStudio (formerly named as TeXMakerX), etc.
    – xport
    Jun 22 '11 at 23:12










1




1




To produce PDF output, you have 2 choices: using pdflatex only or using latex followed by dvips followed by ps2pdf. The former pdflatex allows you to import PDF, JPG, and PNG images. The latter latex-dvips-ps2pdf allows you to import EPS images and PSTricks code. It is worth using an editor to write your input file .tex. There are many editors for Windows, such as TeXnicCenter, TeXStudio (formerly named as TeXMakerX), etc.
– xport
Jun 22 '11 at 23:12






To produce PDF output, you have 2 choices: using pdflatex only or using latex followed by dvips followed by ps2pdf. The former pdflatex allows you to import PDF, JPG, and PNG images. The latter latex-dvips-ps2pdf allows you to import EPS images and PSTricks code. It is worth using an editor to write your input file .tex. There are many editors for Windows, such as TeXnicCenter, TeXStudio (formerly named as TeXMakerX), etc.
– xport
Jun 22 '11 at 23:12












2 Answers
2






active

oldest

votes

















up vote
26
down vote



accepted










Run pdflatex ex.tex to produce a pdf file from the tex file directly. Alternatively, after obtaining the dvi file from latex ex.tex, run dvips -P pdf ex.dvi followed by ps2pdf ex.ps to produce a ps file and then a pdf file, or dvipdfm ex.dvi to produce a pdf file.



It is much easier to do these using a LaTeX editor. You may also want to consider using automated processes provided by say latexmk which runs various executables the required number of times (sometimes one run is not sufficient) to give the right final output. Also note that some packages cannot work with some methods. For example, pstricks does not work with pdflatex or dvipdfm.






share|improve this answer























  • Thank you. In fact, I've just figured it out ^_^! Simple enough: "pdf" prefix.
    – Chan
    Jun 22 '11 at 22:33






  • 1




    texify is preferred to latexmk in MiKTeX. And always use dvipdfmx instead of dvipdfm if possible. And there are xelatex and lualatex to produce PDF output with better Unicode support and many other features.
    – Leo Liu
    Jun 23 '11 at 4:13








  • 2




    @LeoLiu: Why is texify better for MiKTeX than latexmk? Perhaps you can share your experiences in texify or latexmk?
    – doncherry
    Aug 20 '12 at 22:44




















up vote
0
down vote













Just run the command "dvipdf ex.dvi". then, the pdf file will be created and you can see the pdf by running the command "evince ex.pdf".






share|improve this answer








New contributor




Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • Welcome to TeX.SX! This is already covered by the answer of user2265
    – Stefan Pinnow
    29 mins ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f21405%2fhow-to-create-pdf-with-command-line-using-miktex%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
26
down vote



accepted










Run pdflatex ex.tex to produce a pdf file from the tex file directly. Alternatively, after obtaining the dvi file from latex ex.tex, run dvips -P pdf ex.dvi followed by ps2pdf ex.ps to produce a ps file and then a pdf file, or dvipdfm ex.dvi to produce a pdf file.



It is much easier to do these using a LaTeX editor. You may also want to consider using automated processes provided by say latexmk which runs various executables the required number of times (sometimes one run is not sufficient) to give the right final output. Also note that some packages cannot work with some methods. For example, pstricks does not work with pdflatex or dvipdfm.






share|improve this answer























  • Thank you. In fact, I've just figured it out ^_^! Simple enough: "pdf" prefix.
    – Chan
    Jun 22 '11 at 22:33






  • 1




    texify is preferred to latexmk in MiKTeX. And always use dvipdfmx instead of dvipdfm if possible. And there are xelatex and lualatex to produce PDF output with better Unicode support and many other features.
    – Leo Liu
    Jun 23 '11 at 4:13








  • 2




    @LeoLiu: Why is texify better for MiKTeX than latexmk? Perhaps you can share your experiences in texify or latexmk?
    – doncherry
    Aug 20 '12 at 22:44

















up vote
26
down vote



accepted










Run pdflatex ex.tex to produce a pdf file from the tex file directly. Alternatively, after obtaining the dvi file from latex ex.tex, run dvips -P pdf ex.dvi followed by ps2pdf ex.ps to produce a ps file and then a pdf file, or dvipdfm ex.dvi to produce a pdf file.



It is much easier to do these using a LaTeX editor. You may also want to consider using automated processes provided by say latexmk which runs various executables the required number of times (sometimes one run is not sufficient) to give the right final output. Also note that some packages cannot work with some methods. For example, pstricks does not work with pdflatex or dvipdfm.






share|improve this answer























  • Thank you. In fact, I've just figured it out ^_^! Simple enough: "pdf" prefix.
    – Chan
    Jun 22 '11 at 22:33






  • 1




    texify is preferred to latexmk in MiKTeX. And always use dvipdfmx instead of dvipdfm if possible. And there are xelatex and lualatex to produce PDF output with better Unicode support and many other features.
    – Leo Liu
    Jun 23 '11 at 4:13








  • 2




    @LeoLiu: Why is texify better for MiKTeX than latexmk? Perhaps you can share your experiences in texify or latexmk?
    – doncherry
    Aug 20 '12 at 22:44















up vote
26
down vote



accepted







up vote
26
down vote



accepted






Run pdflatex ex.tex to produce a pdf file from the tex file directly. Alternatively, after obtaining the dvi file from latex ex.tex, run dvips -P pdf ex.dvi followed by ps2pdf ex.ps to produce a ps file and then a pdf file, or dvipdfm ex.dvi to produce a pdf file.



It is much easier to do these using a LaTeX editor. You may also want to consider using automated processes provided by say latexmk which runs various executables the required number of times (sometimes one run is not sufficient) to give the right final output. Also note that some packages cannot work with some methods. For example, pstricks does not work with pdflatex or dvipdfm.






share|improve this answer














Run pdflatex ex.tex to produce a pdf file from the tex file directly. Alternatively, after obtaining the dvi file from latex ex.tex, run dvips -P pdf ex.dvi followed by ps2pdf ex.ps to produce a ps file and then a pdf file, or dvipdfm ex.dvi to produce a pdf file.



It is much easier to do these using a LaTeX editor. You may also want to consider using automated processes provided by say latexmk which runs various executables the required number of times (sometimes one run is not sufficient) to give the right final output. Also note that some packages cannot work with some methods. For example, pstricks does not work with pdflatex or dvipdfm.







share|improve this answer














share|improve this answer



share|improve this answer








edited Aug 20 '12 at 21:40

























answered Jun 22 '11 at 22:30







user2265



















  • Thank you. In fact, I've just figured it out ^_^! Simple enough: "pdf" prefix.
    – Chan
    Jun 22 '11 at 22:33






  • 1




    texify is preferred to latexmk in MiKTeX. And always use dvipdfmx instead of dvipdfm if possible. And there are xelatex and lualatex to produce PDF output with better Unicode support and many other features.
    – Leo Liu
    Jun 23 '11 at 4:13








  • 2




    @LeoLiu: Why is texify better for MiKTeX than latexmk? Perhaps you can share your experiences in texify or latexmk?
    – doncherry
    Aug 20 '12 at 22:44




















  • Thank you. In fact, I've just figured it out ^_^! Simple enough: "pdf" prefix.
    – Chan
    Jun 22 '11 at 22:33






  • 1




    texify is preferred to latexmk in MiKTeX. And always use dvipdfmx instead of dvipdfm if possible. And there are xelatex and lualatex to produce PDF output with better Unicode support and many other features.
    – Leo Liu
    Jun 23 '11 at 4:13








  • 2




    @LeoLiu: Why is texify better for MiKTeX than latexmk? Perhaps you can share your experiences in texify or latexmk?
    – doncherry
    Aug 20 '12 at 22:44


















Thank you. In fact, I've just figured it out ^_^! Simple enough: "pdf" prefix.
– Chan
Jun 22 '11 at 22:33




Thank you. In fact, I've just figured it out ^_^! Simple enough: "pdf" prefix.
– Chan
Jun 22 '11 at 22:33




1




1




texify is preferred to latexmk in MiKTeX. And always use dvipdfmx instead of dvipdfm if possible. And there are xelatex and lualatex to produce PDF output with better Unicode support and many other features.
– Leo Liu
Jun 23 '11 at 4:13






texify is preferred to latexmk in MiKTeX. And always use dvipdfmx instead of dvipdfm if possible. And there are xelatex and lualatex to produce PDF output with better Unicode support and many other features.
– Leo Liu
Jun 23 '11 at 4:13






2




2




@LeoLiu: Why is texify better for MiKTeX than latexmk? Perhaps you can share your experiences in texify or latexmk?
– doncherry
Aug 20 '12 at 22:44






@LeoLiu: Why is texify better for MiKTeX than latexmk? Perhaps you can share your experiences in texify or latexmk?
– doncherry
Aug 20 '12 at 22:44












up vote
0
down vote













Just run the command "dvipdf ex.dvi". then, the pdf file will be created and you can see the pdf by running the command "evince ex.pdf".






share|improve this answer








New contributor




Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • Welcome to TeX.SX! This is already covered by the answer of user2265
    – Stefan Pinnow
    29 mins ago















up vote
0
down vote













Just run the command "dvipdf ex.dvi". then, the pdf file will be created and you can see the pdf by running the command "evince ex.pdf".






share|improve this answer








New contributor




Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • Welcome to TeX.SX! This is already covered by the answer of user2265
    – Stefan Pinnow
    29 mins ago













up vote
0
down vote










up vote
0
down vote









Just run the command "dvipdf ex.dvi". then, the pdf file will be created and you can see the pdf by running the command "evince ex.pdf".






share|improve this answer








New contributor




Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









Just run the command "dvipdf ex.dvi". then, the pdf file will be created and you can see the pdf by running the command "evince ex.pdf".







share|improve this answer








New contributor




Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered 56 mins ago









Moumita Indra

1




1




New contributor




Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Moumita Indra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Welcome to TeX.SX! This is already covered by the answer of user2265
    – Stefan Pinnow
    29 mins ago


















  • Welcome to TeX.SX! This is already covered by the answer of user2265
    – Stefan Pinnow
    29 mins ago
















Welcome to TeX.SX! This is already covered by the answer of user2265
– Stefan Pinnow
29 mins ago




Welcome to TeX.SX! This is already covered by the answer of user2265
– Stefan Pinnow
29 mins ago


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f21405%2fhow-to-create-pdf-with-command-line-using-miktex%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks