PSYPACT- Practicing Over State Lines May 2024.pptx
LaTeX-Module 3 & 4.pptx
1. Presenting By
P Srinivasa Rao
IT Mentor
2/14/2023 1
Basic typesetting
commands, font
families sizes and styles
2. Basic typesetting commands
• Latex typesetting is made by using special tags
or commands that provide a handful of ways
to format your document.
• Sometimes standard commands are not
enough to fulfill some specific needs, in such
cases new commands can be defined.
• Commands are preceded by a backslash and
may take some parameters
2/14/2023 2
3. Continue..
• Most of the LATEX commands are simple
words preceded by a special character.
• Latex commands are case sensitive
• Syntax:
commandname[opt1][opt2]{arguement1}{arg
uement2}
2/14/2023 3
5. Task 1
• Task-I
Create a document with two pages one should
be the title page with information of your
name, id, class, college, branch and second
page should contain bit information about our
college.
2/14/2023 5
6. Latex environments
• Environments are used to format blocks of
text in a LATEX documents.
• Environments are delimited by an opening tag
begin and a closing tag end.
• Everything inside those tags will be formatted
in a special manner depending on the type of
the environment.
2/14/2023 6
7. Continue..
• Syntax:
• begin{environment_name}
• Text to be inserted
• end{environment_name}
•
• Example-I:
• begin{tabular}{ c c c } %opening tag
• cell1 & cell2 & cell3
• cell4 & cell5 & cell6
• end{tabular} %Ending tag
•
• Example-2:
• begin{center}
• Contents ……………………..
• end{center}
2/14/2023 7
12. Font Sizes
• There are LATEX commands for a range of font sizes:
• Command Output in latex
• {tiny tiny words} tiny words
• {scriptsize scriptsize words} scriptsize words
• {footnotesize footnotesize words} footnotesize words
• {small small words} small words
• {normalsize normalsize words} normalsize words
• {large large words} large words
• {Large Large words} Large words
• {huge huge words} huge words
2/14/2023 12
13. Example
• For example the text is….
Hello Welcome toRGUIIIT
• If you want to show hello as large just insert
the command like below
{huge Hello } Welcome toRGUIIIT
2/14/2023 13
14. Tasks
Task-II
• Practice the above commands and observe the outputs
Task –III
• Practice the above font sizes and observe the outputs
Example code
documentclass{report}
begin{document}
Hello RGUKT
Hello welcome to rgukt
I am studying Pre University Course.
end{document}
2/14/2023 14
15. Spaces
• quad will produce a current font size space if
you are using 12 pt fonts, then the space
provided by quad will also be 12 pt(
horizontally).
• qquad will produce double amount space.
Similarly you can use
, : ; ! > ~ space
enspace etc
2/14/2023 15
17. Using hspace and vspace
• hspace is used to give horizontal space
between text
• vspace is used to give space vertically
between text.
• These are followed by some recognized units,
hspace and vspace followed by these units
like hspace{cm}, vspace{mm}, hspace{3sp},
vspace{3pt} etc..
2/14/2023 17
20. Basic formatting in latex
Bold ,Bold Italic & Under Line a text
• Some of the textbf{greatest} %textbf means text bold
• Discoveries in underline{science} %for underlined
text
• Were made by textbf{textit{accident}}.
% for underlined and italic
• This is for textit{italic text}
% for italicized text
2/14/2023 20
21. Emphasizing text
• Text can be emphasized by using emph
command.
• Sometimes the emph command behaves just
as textit, but is not exactly the same:
• Some of the greatest emph{discoveries}in science were
made by accident.
• textit{Some of the greatest emph{discoveries}in
science were made by accident.}
• textbf{Some of the greatest emph{discoveries} in
science were made by accident.}
2/14/2023 21
22. Paragraphs and new lines
begin{center}
This text will be placed in the middle of the document
end{center}
New paragraph
• par command will be used to start a new paragraph
• This is the text in first paragraph. This is the text in first
paragraph. This is the text in first paragraph. parThis is
the text in second paragraph. This is the text in second
paragraph. This is the text in second paragraph.
2/14/2023 22
23. Paragraph Indentation
• setlength{parindent}{10ex}This is the text
in first paragraph. This is the text in first
paragraph. This is the text in first paragraph.
parnoindent%The next paragraph is not
indentedThis is the text in second paragraph.
This is the text in second paragraph. This is the
text in second paragraph.
• noindent means there will be no space given
at second line starting.
2/14/2023 23
24. Text alignment
Left –justified text
Right-justified text
• The default environment for left-alignment is
flushleft
begin{flushleft}Hello! Welcome to latex, this
module is about text alignment.This is the left
alignment text. Happy learning latex.
end{flushleft}
2/14/2023 24
26. Centered text
• To centre a block of text use the environment center
• begin{center} and end{center} environment will be used
for centered text.
• Similarly centering and justify commands will be used….
• Example:
• centering
• Text will come here………….
•
• justify
• Text will come here………………..
2/14/2023 26