Javatpoint Logo
Javatpoint Logo

How to use Latex

As soon as the software MikTex and Texmaker are downloaded, you can now start your Latex. The Texmaker is used here because it is considered as the best software used as the Latex editor. The steps to use Latex through the editor Texmaker are given below:

  • All the commands in the Latex begin with the backslash' \.'
  • The first step is to open the Texmaker or any corresponding editor you are using for the Latex.
  • Here, we have used the Textmaker, and it will look like the below image:
How to use Latex

You can click on the File menu and select New file. You can now start your programming or writing the code on the screen.

  • Let's understand the Latex programming or code by an example. We will be writing code on the screen, and the corresponding output will be printed, after the compilation of the code. If there are errors, then at the white bottom window, as shown above, the errors will be displayed with the line number.
  • The example is to print a 'thought of the day.' The same code is written on the Texmaker screen.

The code is given below:

Explanation:

{center} is used to align the text to the center.
\textbf is used to display the text in bold.
{large} is a type of font size.

The same code on the Texmaker screen will look like the image provided below:

How to use Latex

After writing the code, save the file and then click on the Quick Build option at the top to view the output.

The output of this code is shown in the image below:

How to use Latex

Similarly, you can write as much data and commands to format your document.

It depends on the user, which type and style he/she wants to use in the particular document. Another example to write a paragraph is shown below:

The same code on the Texmaker screen will look like the image provided below:

How to use Latex

The output of this code is shown in the below image:

How to use Latex

How does Latex work?

The first step to use Latex is to create the file using the editor and give the name ending with .tex. In this file, you can type the text of your document as well as the commands to format it.

There are two ways to print your .tex file. The methods are listed below:

1) The traditional way is to create a .dvi file (device-independent), which has a binary format and cannot be viewed directly. For viewing purposes, you can run a previewing program or a PostScript program and printing can be done via GSView.

How to use Latex

The second method is direct but not as quick as the first one.

2) The other alternative way to run the recent relative pdflatex program to create a PDF file for viewing or printing.

How to use Latex
Next TopicLATEX Symbols





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA