xbdev - software development
Wednesday February 21, 2024
home | contact | Support



Mastering LaTeX ...

Say Hello to LaTeX

Popping your 'LaTeX' Cherry!

You want to take it easy the first time you give LaTeX a try - especially if you're new to scripting languages. If you've not done any HTML or any other markup language - it'll be a big and scary step.

Now to take the pain away initially, so you're not smacked in the face and left crying in the corner by installation issues and setting up your computer - let's use 'Overleaf' to manage your LaTeX files.

As Overleaf runs in your webbrowser, so you don't have to install anything! Isn't that great?

Get on Overleaf and register with them, then:
1. Click new project
2. Select 'Blank Project' (you're going to do this from the ground up)
3. Call your project 'Hello-LaTeX'


You've been given an editor window and an output window. Overleaf spoon feeds you by even given you a simple template example! You're just spoiled. So you should see this:


\author{Your Name}
\date{December 2018}





As you'll discover, most (not all) of the commands are pretty self-explanatory, so you don't have to remember them all. Some commands you can just copy and paste them from previous documents.

Now let's take a little closer look at the command \documentclass{article}. The command is obviously named documentclass and it does exactly that, it sets the document class (to article).

LaTeX uses document classes, to influence the overall layout of your document. For instance, there's one class to layout articles, one class to layout books (called book) and many more, which we probably don't need. In this little starter, you'll use the article class. Feel free to play around and try different document classes anyway and see what happens! Don't be afraid to change the LaTeX! You learn best through trial and error.

Next, you'll notice the \begin and \end statements. In fact this is not a command, but defines an environment. An environment is simply an area of your document where certain typesetting rules apply. It is possible (and usually necessary) to have multiple environments in a document, but it is very very important the document environment is the topmost environment.

Then you've also got the statements \title, \date and \author (also within the the document environment) - which should be as they say - for setting the title, date and author name.

The \maketitle is used to automagically create the titlepage for you (i.e., it takes the title, date and author information you set and creates a front page).

There you have it, click 'Compile/Recompile' in Overleaf to create your PDF (shown on the right). You can download the pdf and use it as you want - the generated report. Anytime you need to, just log back into Overleaf, and update/add/edit your LaTeX reports as you need.. so easy and simple! Not to mention flexible and convenient ;)

How are you feeling? Are you feeling it? The success!! You've successfully created your first LaTeX document.

Advert (Support Website)

Copyright (c) 2002-2024 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.