Search

Quick Guide to LaTeX (Part 1)

Updated: Jun 14, 2019

2) LaTeX Text editor:- To write our code

For beginners Texmaker is the best editor because it has many user friendly features.

In this blog I'm going to use Texmaker as editor.

Setting up your document

First we have to configure Texmaker. Go to Options and select Configure Texmaker

1]Under commands, check in the Embed box it will allow us to see the code and the output simultaneously

3] Under Editor select Word wrap, Completion, Show line number. If you want you can select the last option of Backup document in every 10 minutes

After Following these steps we are ready to start Texing...

Writing a Document

Before writing a document one has to save it first, otherwise the code will not get compiled.

Click on "New" & save it. Here i'm saving it as Tutorial

After saving the document, following will be the look of Texmaker

In LaTeX to write math you need to follow a simple rule, "Whenever you want to write in math use Dollar ($) sign." Now I want to write a polynomial with degree 2. I will use Caret (^) symbol to assign power. Other signs (Plus, minus, equality) have their usual meaning. Now if we are writing a paragraph which contains an equation and we are supposed to differentiate the paragraph from an equation using space-bar will be tedious work. Instead we give double dollar sign. This command tells the software to write the equation on special line. Therefore command will look like $$MATH$$. Remember that if you have used dollar sign at the beginning of Mathematical text then you are supposed to give Dollar sign at the end also. Now I am going to give an brief idea about how to write logarithmic functions, trigonometric functions, squares & square roots, Greek letters, subscripts etc. in LaTeX. Also i will give a brief idea about use of brackets Subscripts & Superscripts For subscripts we use underscore (_). For Superscripts we use Caret (^) sign Subscripts & Superscripts Greek Alphabets For Greek alphabets we use back slash and then the spelling of that alphabet Eg. For Alpha => \alpha, Pi => \pi Greek Alphabets As shown above we can use "Double Backslash (\\)" to break the line. Fractions For Fractions we use command$\frac{}{}$. First of curly bracket indicate numerator and second indicates Denominator. When we write fraction in a sentence due to the font size numerator and denominator does not get properly separated. To solve this problem we use command \displaystyle before \frac{}{} Note: 1] Command \frac{}{} must be inside dollar sign. Fractions Roots For Square roots we need to use command$\sqrt{}$. For higher roots we just have to add box bracket before curly brackets. Therefore$\sqrt[]{}$. If you write 3 in Box bracket software will show cube root and so on. Roots Logarithmic Functions For logarithmic functions we use the command$\log_n(x)$, where n denotes the base of log. For natural log we use$\ln_(x)$Logarithmic Functions Trigonometric Functions For Trigonometric functions we use command$\sin(x)$,$\cos(x)$,$\sinh(x)\$.

Trigonometric Functions

Thank you & Happy Texing....

0 views
Astro Club

©2020 by Astro Club, Fergusson College (Autonomous) Pune.