Hello World in Tex

Published on (Updated: 30 September 2020)

Hello World in Tex

Welcome to the Hello World in Tex page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

%&pdftex

Hello, World!
\end

Hello World in Tex was written by:

If you see anything you'd like to change or update, please consider contributing.

Note: The solution shown above is the current solution in the Sample Programs repository as of Sep 04 2018 11:11:25. The solution was first committed on Aug 28 2018 15:40:04. As a result, documentation below may be outdated.

How to Implement the Solution

At any rate, let's dive right into Hello World in Tex:

%&pdftex

Hello, World!
\end

It is much simpler in Tex due to the fact the Tex is a markup language.

%&pdftex

This first line is a declaring line used to explain that the desired output of this tex file is a pdf.

Hello, World!

This is the body better known as what will be displayed. You could replace that text with anything to have it show up.

\end

Finally, this is saying the document has ended by declaring(\) an end.

How to Run the Solution

There are many options for running Tex files both online and offline. This said my personal favorite option is running it online through [Overleaf][1]. They even cover the other options including themselves on their website [here][2].