LaTeX ExamplesΒΆ

  • Make a folder named tutorial anywhere on your computer

  • Open VS Code

  • Go to File - Open Folder and select the tutorial folder you just created

  • Create a new file named document.tex in the folder (see figure below).

Creating a new file in VS Code

Copy and paste the following code into document.tex:

\documentclass{article}

\title{Put Title Here}
\author{Put Your Name Here}

\begin{document}

    \maketitle

\end{document}

Click the Build LaTeX project button in the top right corner of VS Code (shown with the red arrow in the figure below). This will compile your LaTeX document and generate a PDF file named document.pdf in the same folder.

Build LaTeX Project Button in VS Code

Notice the PDF and other files generated in the folder in the figure below.

Generated PDF Files in VS Code

Click the View LaTeX PDF button (shown with the red arrow in the figure below) that appears after building the project to view the generated PDF file.

View LaTeX PDF Button in VS Code