0% found this document useful (0 votes)
69 views20 pages

LaTeX Assignment

Uploaded by

as2532012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views20 pages

LaTeX Assignment

Uploaded by

as2532012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Assignment

Aakash singh
B.Sc (H) mathematics
Roll no. 22/6230

April 12, 2024


2
Contents

1 Latex 5
1.1 What is LaTeX ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Benefits of LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Virtues of open source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Creating our first document online . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Creating Tables 9
2.1 How to start making a table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Writing Math Formulas 13


3.1 Writing basic formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Adding subscripts and superscripts . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3 Using operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4 Taking roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5 Writing fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 Typesetting matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3
4 CONTENTS
Chapter 1

Latex

1.1 What is LaTeX ?

LaTeX is free, open source software for typesetting documents. In other words, it’s a document
preparation system. LaTeX is not a word processor, but it’s a document markup language. It was
initially written by Leslie Lamport and is based on the TeX typesetting engine by Donald Knuth.
People often refer to it as just TeX, meaning LaTeX It has a long history; you can read about it at
https://tug.org/whatis.html. For now, let’s continue by looking at how we can make the most of La-
TeX.

1.2 Benefits of LaTeX

LaTeX is especially well suited for scientific and technical documents. LaTeX’s superior typesetting
of mathematical formulas is legendary. Suppose you are a student or a scientist. In that case, LaTeX
is by far the best choice, and even if you don’t need its scientific capabilities, there are other uses—
it produces very high-quality output and is incredibly stable. It handles complex documents easily,
no matter how large they are. Some more remarkable strengths of LaTeX are its cross-referencing
capabilities, the ability for automatic numbering, and the generation of lists of contents, figures and
tables, indexes, glossaries, and bibliographies. It is multilingual with language-specific features, and
it can use PostScript and PDF features. Apart from being perfect for scientists, LaTeX is incredi-
bly flexible—there are templates for letters, presentations, bills, philosophy books, law texts, music
scores, and even chess game notation. Hundreds of LaTeX users have written thousands of templates,
styles, and valuable tools for every possible purpose. It is collected and categorized online on archiv-
ing servers. You could benefit from its impressive high quality by starting with its default styles and
relying on its intelligent formatting, but you are free to customize and modify everything. People of
the TeX community have already written a lot of extensions addressing nearly every formatting need.

5
6 CHAPTER 1. LATEX

1.3 Virtues of open source


The code of LaTeX is entirely open source, free, and readable for everyone. This enables you to study
and change everything, from the core of LaTeX to the latest extension packages. But what does this
mean for you as a beginner? There’s a huge LaTeX community with a lot of friendly, helpful people.
Even if you cannot benefit from the open source code directly, they can read the source and assist
you. Just join a LaTeX web forum and ask your questions there. Helpers will, if necessary, dig into
LaTeX sources and, in all probability, find a solution for you, sometimes by recommending a suitable
package, often providing a redefinition of a default command.

1.4 Creating our first document online


We want to create our own space on Overleaf in two steps. Then we will start our first LaTeX project:

1. Register for the service. Either click on Register on the Overleaf home page or go to https://www.overleaf.co
Enter your email address and choose a password.

2. Log in to Overleaf. Either click on Login on the front page or go to https://www.overleaf.com/login


:

Figure 1.1: Creating a new project

3. Click the New Project button. A drop-down list will appear, where you can choose to have a
blank project or one based on a template, such as a book, presentation, CV, or thesis template.
For now, we just choose Blank Project.
1.4. CREATING OUR FIRST DOCUMENT ONLINE 7

Figure 1.2: A new project

4. Overleaf asks you for a name; choose one. That’s it! This is what you have now: It’s not entirely
blank as it contains a small code frame, so you got a quick start, and you can begin filling in
your text. Whenever you click the Recompile button or press Ctrl + Enter, the preview on the
right side will be refreshed. You can enable automatic typesetting if you open the Recompile
menu and choose Auto Compile in the drop-down menu, which is switched on in Figure 1.2.
The document refreshes frequently and automatically while you are typing:

Figure 1.3: Compilling settings

Since Overleaf is so different from classic LaTeX editors, let’s have a closer look at it.
8 CHAPTER 1. LATEX
Chapter 2

Creating Tables

2.1 How to start making a table .


1. Create a new document . by the following command .

\documentclass{article}
\begin{document}

2. Begin a tabular environment. As a mandatory argument, provide ccc, standing for three centered
columns:

\begin{table}
\centering
\begin{tabular}{ccc}

3. Write the table head row, add & to separate column entries, and add \\ to end rows. Use \hline
to insert horizontal lines:

\hline
\head{Command} & \head{Declaration} & \head{Output}\\
\hline

4. When we write more then one line in a cell then we use the below command.

\makecell{A\\B}

5. When we have to use more than one column then we use below command

\multicolumn{2}{c}{}

6. After the table is complete use this command.

9
10 CHAPTER 2. CREATING TABLES

\end{tabular}
\end{table}
\end{document}

Try to create table using all commands

\documentclass{article}
\begin{document}
\begin{table}[ht]
\centering
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline \makecell{Period\\ days} & \makecell{ I\\ 8:30-9:30} & \makecell{II\\ 9:30-10:30}
\hline Mon& \makecell{MH-IV-B\\SSF,OB-8}&\makecell{PS-IV-B\\GP-1\\SB-2}& & & &\makecell{
\hline Tue & &&&&&&\makecell{VAC-II\\SEM,VM-1\\SB-2}&\multicolumn{2}{C|}{\makecell{VAC-I
\hline Wed&\multicolumn{8}{C|}{OFF DAY}&\\
\hline Thur & && \multicolumn{2}{C|}{\makecell{MH-VI-A ,MT, LAB \\ CA}}& \makecell{MH-IV
\hline Fri& &&&& \makecell{MH-IV-B,\\SSF,\\N-10}& \makecell{MH-VI-A\\DSE3-MF\\GP-3,OB-8}
\hline Sat& &&&& \multicolumn{4}{C|}{\makecell{SEC-IV SEM , LATEX, MTLAB\\(1 PM TO 5PM )
\hline

\end{tabular}

\label{tab:my_label}
\end{table}
\end{document}

Output
2.1. HOW TO START MAKING A TABLE . 11

Period I II III IV V VI VII V


days 8:30-9:30 9:30-10:30 10:30-11:30 11:30-12:30 12:30-1:30 1:30-2:30 2:30-3:30 3:30
PS-IV-B MH-IV-B
MH-IV-B
Mon GP-1 GP-1 SSF
SSF,OB-8
SB-2 OB-4
VAC-II VAC
Tue SEM,VM-1
SB-2
Wed OFF DAY
MH-VI-B
MH-VI-A ,MT, LAB MH-IV-B,
Thur GP-1
CA SSF,N-10
N-9
MH-IV-B, MH-VI-A
Fri SSF, DSE3-MF
N-10 GP-3,OB-8
SEC-IV SEM , LATEX, MTLAB
Sat
(1 PM TO 5PM )
12 CHAPTER 2. CREATING TABLES
Chapter 3

Writing Math Formulas

3.1 Writing basic formulas


LaTeX offers three writing modes:

• Paragraph mode: The text is typeset as a sequence of words in lines, paragraphs, and pages.
That’s what we used in the previous chapters.

• Left-to-right mode: The text is a sequence of words, but LaTeX typesets it from left to right
without breaking the line. For instance, the argument of \mbox will be typeset in this mode; so
\mbox prevents hyphenation.

• Math mode: Here, LaTeX treats letters as math symbols. That’s why they’re typeset in italics,
which is common practice for variables. A lot of symbols can only be used in math mode. Such
symbols are roots, sum signs, relation signs, math accents, arrows, and various delimiters, such
as brackets and braces. LaTeX ignores space characters between letters and symbols. Instead,
the spacing depends on the type of symbols— spacing of relation signs is different from spacing
of opening or closing delimiters. All math expressions require this mode.

Now we shall enter the math mode for the first time. Our first math text shall deal with the solutions of
quadratic equations. We will typeset formulas with constants, variables, superscripts for the square,and
subscripts for the solutions. The solution itself needs a root symbol. Finally, we will use cross-
references to formulas. That’s quite a challenge, so let’s break it down into the following steps:

1. Start a new document. For now, we don’t need any packages:

\documentclass{article}
\begin{document}
\section*{Quadratic equations}

2. State the quadratic equation with its conditions. Use an equation environment for it. Surround
small pieces of math within text using and:

13
14 CHAPTER 3. WRITING MATH FORMULAS

The quadratic equation


\begin{equation}
\label{quad}
ax^2 + bx + c = 0,
\end{equation}
where \( a, b \) and \( c \) are constants and
\( a \neq 0 \), has two solutions for the variable
\( x \):

3. Use another equation for the solutions. The command for a square root is \sqrt. The command
for a fraction is \frac:

\begin{equation}
\label{root}
x_{1,2} = \frac{-b \pm \sqrt{b^2-4ac}}{2a}.
\end{equation}

4. Let’s introduce the discriminant and discuss case zero. To get an unnumbered displayed equa-
tion, we surround the formula with \[ and \]:

If the \emph{discriminant} \( \Delta \) with


\[
\Delta = b^2 - 4ac
\]
is zero, then the equation (\ref{quad}) has a double solution:
(\ref{root}) becomes
\[
x = - \frac{b}{2a}.
\]
\end{document}

5. Click on Typeset to compile the document. The equation references are unresolved in the first
run and look like (?). Compile again to let LaTeX resolve them, and look at the result
3.1. WRITING BASIC FORMULAS 15

Quadratic equations

The quadratic equation

x2 + bx + c = 0, (3.1)

where a, b and c are constants and a ̸= 0, has two solutions for the variable x:


−b ± b2 − 4ac
x1,2 = . (3.2)
2a

If the discriminant ∆ with

∆ = b2 − 4ac

is zero, then the equation (3.1) has a double solution: (3.2) becomes

b
x=− .
2a
16 CHAPTER 3. WRITING MATH FORMULAS

3.2 Adding subscripts and superscripts


As exponents and indexes are frequently used, there are concise commands for typesetting them. An
underscore_ gives an index or subscript:

{expression}_{subscript}

A caret ^ produces an exponent or superscript:

{expression}^{superscript}

As we see here, we use braces to define the relevant part of the expression. Subscripts and superscripts
may be nested. If you use both subscripts and superscripts in the same expression, the order of ^ and
_ doesn’t matter. In the case of single letters, numerals, or symbols, you can omit the braces. Let’s
look at an example:

$$ x_1^2 + x_2^2 = 1, \quad 2^{2^x} = 64 $$

This gives us the output:


x
x21 + x22 = 1, 22 = 64
You can also notice that the exponent at the higher level is smaller than the exponent at the lower
level. When we nest subscripts or superscripts, the inner font size becomes smaller.

3.3 Using operators


Trigonometric functions, logarithmic functions, and other analytic and algebraic functions are com-
monly written with upright Roman letters. Simply typing log would otherwise look like a product
of the three variables: l, o, and g. There are commands for many common functions or so-called
operators. Here’s an alphabetical list of the predefined ones:

\arccos, \arcsin, \arctan, \arg, \cos, \cosh, \cot, \coth, \scs, \deg, \det,
\dim, \exp, \gcd, \hom, \inf, \ker, \lg, \lim, \liminf, \limsup, \ln, \log, \max,
\min, \Pr, \sec, \sin, \sinh, \sup, \tan, \tanh

We can write the modulo function in two ways – either by using \bmod for a binary relation or by
using \pmod{argument} for a modulo expression in parentheses. Some operators support subscripts,
which are set in displayed formulas below the operator as follows:

$$\lim_{n=1, 2, \ldots} a_n \qquad \max_{x<X} x $$

The output is as follows:

lim an max x
n=1,2,... x<X
3.4. TAKING ROOTS 17

3.4 Taking roots

Our first example code in this chapter, contained a square root: \sqrt{value}. As there are higher-
order roots, this command accepts an optional argument for the order. The complete definition is as
follows: \sqrt[order]{value} Roots may be nested. We can see it in this example:

$$\sqrt[64]{x} = \sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{x}}}}}}$$

The output is as follows:

vv
uus
uu rq
√ ut √
64 t
x= x

LaTeX adjusts the size of the root symbol automatically to the height and the width of the value
expression. That’s why outer roots are bigger than inner roots.

3.5 Writing fractions

Within text formulas, you may just write / to denote fractions, such as \((a+b)/2 \). For larger
fractions, there’s the \frac command: \frac{numerator}{denominator} Here is an example:

\[ \frac{n(n+1)}{2} \quad \frac{\frac{\sqrt{x}+1}{2}-x}{y^2} \]

The output is as follows:


n(n + 1)
x+1
2
−x
2 y2
18 CHAPTER 3. WRITING MATH FORMULAS

3.6 Typesetting matrices


The amsmath package provides us with many special matrix environments. A standard matrix can
be typeset by the pmatrix environment:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$
A = \begin{pmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{pmatrix}
$$
\end{document}

The following is the output


:  
a11 a12
A=
a21 a22
You may notice that the parentheses are closer to the matrix entries than in the array example in the
previous section. That tighter layout comes from the amsmath style.
These are amsmath matrix environments and their delimiters:

• matrix: no delimiters

• pmatrix: parentheses ( )

• bmatrix: square brackets [ ]

• Bmatrix: braces

• vmatrix: | |

• Vmatrix: || ||

• smallmatrix: no delimiters – can be added if needed, more compact The compact smallmatrix
environment is useful for matrices within regular text
3.6. TYPESETTING MATRICES 19

LaTeX का इ तहास

LaTeX को 1980 के दशक क शुरुआत में लेस्ली लैमपोटर् द्वारा बनाया गया था जब वह स्टैनफोडर् रसचर् इंस्टीट्यट ू
(SRI) में काम कर रहे थे।
उन्हें अपने स्वयं के उपयोग के लए TeX मैक्रोज़ लखने क आवश्यकता थी और उन्होंने सोचा िक थोड़े अ त रक्त
प्रयास के साथ, वह एक सामान्य पैकेज को दस ू रों के उपयोग योग्य बना सकते हैं। ए डसन-वेस्ले के संपादक पीटर
गॉडर् न ने उन्हें प्रकाशन के लए एक लाटेक्स उपयोगकतार् मैनुअल लखने के लए राजी िकया (लैम्पपोटर् को शुरू में
संदेह था िक कोई इसके लए पैसे देगा);
यह 1986 में प्रका शत हुआ और इसक सैकड़ों-हजारों प्र तयां िबक । इस बीच, लैमपोटर् ने 1984 और 1985 में
अपने लाटेक्स मैक्रोज़ के संस्करण जारी िकए। 21 अगस्त 1989 को, स्टैनफोडर् में एक टीएक्स उपयोगकतार् समूह
(टीयूजी) क बैठक में, लैम्पपोटर् ने लाटेक्स के रखरखाव और िवकास को फ्रैंक िमत्तेलबैक को सौंपने पर सहम त व्यक्त
क ।
फ्रैंक िमत्तेलबैक ने िक्रस रोवले और रेनर शॉफ़ के साथ िमलकर LaTeX3 टीम बनाई; 1994 में, उन्होंने वतर् मान मानक
संस्करण LaTeX2e जारी िकया। LaTeX3 को तब से रद्द कर िदया गया है और उस संस्करण के लए इ च्छत सुिवधाओं
को 2018 से LaTeX2e में वापस पोटर् िकया जा रहा है।

ओवरलीफ़

ओवरलीफ़ एक सहयोगी क्लाउड-आधा रत LaTeX संपादक है जसका उपयोग वैज्ञािनक दस्तावेज़ लखने, संपािदत
करने और प्रका शत करने के लए िकया जाता है। यह आ धका रक जनर् ल LaTeX टेम्प्लेट और सीधे सबिमशन लक
प्रदान करने के लए वैज्ञािनक प्रकाशकों क एक िवस्तृत श्रृख
ं ला के साथ साझेदारी करता है।

ओवरलीफ़ क कल्पना जॉन हैमरस्ले और जॉन लीज़-िमलर ने क थी, जन्होंने 2011 में इसे अपनी कंपनी
WriteLaTeX लिमटेड के माध्यम से WriteLaTeX के रूप में िवक सत करना शुरू िकया था । दोनों ग णतज्ञ हैं और
सहयोगात्मक वैज्ञािनक लेखन के लए बेहतर समाधान तैयार करने के लए अकादिमक क्षेत्र में अपने स्वयं के अनुभवों से
प्रे रत थे। उन्होंने 16 जनवरी 2014 को लंदन में िब्रिटश लाइब्रेरी में आयो जत पहले फ्यूचरपब कायर् क्रम में ओवरलीफ
का बीटा संस्करण लॉन्च िकया। 2017 में ShareLaTeX के साथ िवलय के बाद, उन्होंने Overleaf v2 जारी िकया,
जसमें दोनों क मूल िवशेषताओं को एक ही क्लाउड-आधा रत प्लेटफ़ॉमर् में संयो जत िकया गया।
20 CHAPTER 3. WRITING MATH FORMULAS

इ तहास
ओवरलीफ़ को उन दस टीमों में से एक के रूप में चुना गया था जन्होंने 2013 समर के बेथनल ग्रीन वेंचसर् (बीजीवी)
एक्सेलेरट
े र कायर् क्रम में भाग लया था। वह कायर् क्रम 1 जुलाई 2013 को शुरू हुआ और 3 महीने तक चला। उस
बीजीवी 2013 ग्रीष्मकालीन कायर् क्रम का डेमो िदवस 19 सतंबर 2013 को आयो जत िकया गया था।

कंपनी को 2014 में ड जटल साइंस से रणनी तक िनवेश प्राप्त हुआ । ओवरलीफ ने 2014 नॉिमनेट इंटरनेट
अवाड्सर् में इनोवेिटव इंटरनेट िबजनेस जीता , और स डकेटरूम क 2018 क िब्रटेन क शीषर् सूची में 99वें स्थान
पर रहा। 100 सबसे तेजी से बढ़ने वाला व्यवसाय।

ओवरलीफ क चचार् नेचर , साइंस , रेड हैट के ओपनसोसर् .कॉम और जमर् न आईटी पित्रका हेइज़ ऑनलाइन में
वैज्ञािनक प्रकाशन लखने के लए एक उपकरण के रूप में क गई है । "2017 में, स्वट्जरलैंड के जनेवा के पास
यूरोप क कण-भौ तक प्रयोगशाला CERN ने ओवरलीफ को अपने पसंदीदा सहयोगी लेखन मंच के रूप में अपनाया।"

ओवरलीफ वैज्ञािनक पित्रकाओं और सम्मेलनों में प्रस्तुत करने के लए टेम्पलेट प्रदान करता है। उदाहरण के लए,
आईईईई और स्प्रगर (नेचर सिहत ) ओवरलीफ़ का उपयोग करके प्रस्तुत करने क संभावना का उल्लेख करते हैं।

You might also like