LaTeX is extensively used by philosophers, engineers, and mathematicians in the academic circles. Presentations, technical reports, and theses are always produced on this high-quality typesetting system. Needless to say, these scholar documents contain some confidential content more or less. You can’t ignore the possibility that your research results fall into the wrong hands. To prevent the leakage of crucial data, saving TEX files as PDF is a good choice since PDF allows you to restrict the access to documents by setting password protection. If you begin learning LaTeX documentation, I am sure you are eager to know how to turn a .tex file into PDF format. So, let’s go straight to the tutorial that gives you two easy ways to convert LaTeX file to PDF on Windows.
How to convert LaTeX document to PDF on Windows.
pdfLaTeX is an extension of LaTeX document preparation system. It’s included in the modern distributions of LaTeX including TeX Live and MikTeX. Using this extension, you can get the resultant PDF directly from the TeX file. This job can be done in either a LaTeX editor or Command Prompt.
How to compile TEX file to PDF in TeXworks.
TeXworks is a LaTeX editor, which is able to generate PDF from currently-edited TEX file via just one button click. This application is bundled with the installation of MikTeX or TeXstudio. Usually, TeXworks works as the default LaTeX editing program.
Step 1.
Open the TEX file you want to convert in Texworks.
Step 2.
Go to the menu bar and select “pdfLaTeX”.
Step 3.
Press the green arrow icon to start the process.
The PDF will be exported in the same directory with your TEX file.
How to compile TEX file to PDF in Command Prompt.
Outputting a PDF from TEX format can also be achieved by running a command in Command Prompt. For example, if you want to create a PDF from LaTeX named “sample.tex”, follow the steps below to do so.
- Press “Win+X” to bring up the Power User Tasks Menu.
- Hit the “Run” button, type cmd and then click on “OK” to launch Command Prompt.
- Type the source file path and the command line “pdflatex sample”.
- Like: C\Users\Administrator\Desktop>pdflatex sample
- Press the “Enter” key.
- When the PDF is produced, you will see the prompt “Output written on sample.pdf”.
You may want to know how to convert LaTeX to PDF in Mac.
After reading this simple guide, you must feel converting LaTeX source file to PDF is as easy as blowing off dust. And now, it is possible for you to encrypt your scientific documents to prevent unauthorized disclosure of classified information.