Top Banner
LATEX- EFFECTIVE DOCUMENT WRITING” Prof.R.N.Mahind Prof.R.S.Shinde Assistant Professor, Computer Science & Engg. DACOE,Karad. Email : [email protected] [email protected]
96

Latex for beginner

Jan 26, 2017

Download

Engineering

mahindrupali
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Latex for beginner

“LATEX- EFFECTIVE DOCUMENT WRITING”

Prof.R.N.MahindProf.R.S.Shinde

Assistant Professor, Computer Science & Engg. DACOE,Karad.

Email : [email protected] [email protected]

Page 2: Latex for beginner

Contents

Getting Started with Latex

Installation of Latex

Basic Programming

Typesetting Mathematical Equations

Report Writing

Page 3: Latex for beginner

GETTING STARTED WITH LATEX

Page 4: Latex for beginner

WHY LATEX ?

Page 5: Latex for beginner

• Modification in big docs is easy• Separation of content and style• Portability• Open Source • Page Numbers auto• Generates list • Scientific features

Advantages

Page 6: Latex for beginner
Page 7: Latex for beginner

History• Donald Knuth – January 10,

1938• “father "of analysis of algorithms• Asymptotic Notations• TeX – (1978)

Page 8: Latex for beginner

• Typesetting Mathematics & Scientific Articles.

• Knowledge of symbols & characters• LATEX input files - *.tex

Page 9: Latex for beginner

COMPILATION PROCESS

ps2pdf

dvips

tex

Page 10: Latex for beginner

WHAT IS LATEX ?

Page 11: Latex for beginner

• L. B. Lamport -• Document preparation system• LaTeX – not editing program• LATEX is a TEX macro package• LATEX provides several standard

document classes• Free s/w distributed under LPPL• LATEX input files - *.tex

LATEX

Page 12: Latex for beginner

COMPILATION PROCESS

*.tex File

tex *.dvi

File*.ps file

*.pdfFile

*.pdffile

dvips

pdflatex

dvi2pdf

ps2pdf

Page 13: Latex for beginner

simple.DVI

Page 14: Latex for beginner

simple.ps

simple.pdf

Page 15: Latex for beginner

• Install MikTex (Base System)

• Install Editor – TexMaker

• Install GhostScript & GS View

Page 17: Latex for beginner
Page 18: Latex for beginner
Page 19: Latex for beginner
Page 20: Latex for beginner
Page 21: Latex for beginner
Page 22: Latex for beginner
Page 23: Latex for beginner
Page 24: Latex for beginner
Page 25: Latex for beginner

• LEd• Emac• Vim• Texmaker• Kile• TexStudio• TexShop• TeXnicCenter

Page 26: Latex for beginner

INSTALLING EDITOR

• TexMaker - http://www.xm1math.net/texmaker/down load.html

Page 27: Latex for beginner
Page 28: Latex for beginner
Page 29: Latex for beginner
Page 30: Latex for beginner
Page 31: Latex for beginner
Page 32: Latex for beginner

INSTALLING GHOST SCRIPT & GS VIEW• Ghost Script –

gs813win32

• GS View

- gsv46win32

Page 33: Latex for beginner
Page 34: Latex for beginner
Page 35: Latex for beginner
Page 36: Latex for beginner
Page 37: Latex for beginner
Page 38: Latex for beginner
Page 39: Latex for beginner

39

BASIC PROGRAMMING

Page 40: Latex for beginner

40

\documentclass[. . . ]{ . . . }\begin{document}.....\end{document}

Environment

Page 41: Latex for beginner

41

\documentclass[<option-list>]{<classname>}

Article Report Book Letter Slides

• 10pt | 11pt | 12pt

• let terpaper| legalpaper |executivepaper| a4paper|a5paper| b5paper

• oneside| twoside• onecolumn| twocolumn

Page 42: Latex for beginner

42

FIRST SIMPLE PROGRAM

\documentclass[]{letter}

\begin{document}

Computer Science and Engineering

\end{document}

Page 43: Latex for beginner

43

Save program with

“Program_name.tex”

Eg. 1.tex

Page 44: Latex for beginner
Page 45: Latex for beginner
Page 46: Latex for beginner

OUTPUT

Page 47: Latex for beginner

47

FONT STYLECommand Font Style Output\textbf{. . . } Bold Text\textit{. . . } Italic Text\texttt{. . .} teletypefont Text

\uppercase{...}

Upper case TEXT

\emph{...} Typically Italic Text\textsc Small caps TEXT

3.Tex

Page 48: Latex for beginner

48

FONT SIZE

4.tex

Page 49: Latex for beginner

49

Font Type\fontfamily{Code}\selectfont{TEXT}

5.tex

Page 50: Latex for beginner

FONT COLOR

Package - \usepackage{color}File - color.sty

Page 51: Latex for beginner

51

TEXT COLORING

\ textcolor{color_name}{text}

6.tex

Page 52: Latex for beginner

52

COLOR BOX FOR TEXT

\ colorbox{color_name}{Text}

7.tex

Page 53: Latex for beginner

53

BOX BOUNDARY COLOR \fcolorbox{Textcolor}{Backcolor}{Text}

8.tex

Page 54: Latex for beginner

54

COLORING PAGE

\pagecolor{color_name} – page color

9.tex

Page 55: Latex for beginner

55

SOME COLORS

Page 56: Latex for beginner

56

UNDERLINE & QUOTES

Underline ( text)\u nderline{ Text }

Single Quote (‘text’)-\ lq text \ rq

Double Quotes (“text”) \lq\lq text \rq\rq

10.tex

Page 57: Latex for beginner

57

SPECIAL SYMBOLS\textbackslash\\

\\textless\\

<\textgreater\\

>\textquoteright\\ ’\ldots\\

…\$

$

11.tex

Page 58: Latex for beginner

58

• New Line

\\

\newline

• New Page

\newpage

12.tex

Page 59: Latex for beginner

59

PARAGRAPH FORMATTINGAlignment\centering \flushleft\flushrightSpacing

package - \ u sepackage{setspace}

file – setspace.sty\hspace{ . .. cm}\vspace{. . . cm}\ r enewcommand{\baselinestretch}{1.5} like line spacing

13.tex

Page 60: Latex for beginner

60

LIST itemize - unordered lists ( )

enumerate - for ordered lists (1,2,3,….)

description - lists where you want to specify your own label (∆,*)

Page 61: Latex for beginner

61

itemize

1st Output

2nd Output

14.tex

15.tex

Page 62: Latex for beginner

62

enumerate1st Output

2nd Output

16.tex

17.tex

Page 63: Latex for beginner

63

description

18.tex

Page 64: Latex for beginner

64

• Package - \usepackage{graphicx}

\includegraphics[scale= • ]{imageFile_name }

Eg. \begin{figure}[h] \includegraphics[width=4cm,height=4cm]{1.png}

\end{figure}

Inserting Image

19.tex

[h] - here[b] - bottom[t] - top[p] – separate page

Page 65: Latex for beginner

65

Eg. \rotatebox{48}{have a nice day}

65

\rotatebox{angle}{Text}

Rotating Text

\includegraphics[angle=45,width=1in,height=2in]{1.png}

Rotating image\includegraphics[angle,width,height] {imageFile_name}

20.tex

Page 66: Latex for beginner

66

REFLECTING TEXT\reflectbox{Text}

Eg. \reflectbox{Pune} \newline

Eg. \reflectbox{231} 231 --- Horizontal

Eg. \raisebox{\depth}{\scalebox{1}[-1]{WOW}}---Vertical

21.tex

Page 67: Latex for beginner

67

\scalebox{<h scale>}[<v scale>]{<text>} \scalebox{2}[5]{Satara}

\resizebox{hlength}{vlength}{some text} \resizebox{20mm}{1.7cm}{some text}

22.tex

Page 68: Latex for beginner

68

INSERTING TABLE\begin{table}

\begin{tabular}{|c|c|c|c|} \hline roll no & name & address & phone

no \\ \hline 3245 & Nitin & karad & 1234567\\ \hline \end{tabular}

\caption{Student record} \end{table}

24.tex

Page 69: Latex for beginner

69

INSERTING MULTI COLUMN TABLE

\hline roll no & name & \multicolumn{2}{c|}{contact detail}\\

25.tex

Page 70: Latex for beginner

70

TABLE ALIGNMENT \centering \flushleft \flushright

Page 71: Latex for beginner

71

INSERTING MULTI ROWPackage - \usepackage{multirow}\begin{tabular}{|c|c|c|c|}\hline 1 & 2 & \multicolumn{2}{c|}{Course}\\\hline\multicolumn{1}{|c}{\multirow{2}{*}{Powers} } &\multicolumn{1}{ |c| }{504} & 3 & 2 \\ \cline{2-4}\multicolumn{1}{ |c }{} &\multicolumn{1}{|c|}{540} & 2 & 3 \\ \cline{1-4}\hline\end{tabular}

26.tex

Page 72: Latex for beginner

72

CHANGING SIZE OF TABLE

% horizontal size(height) i.e. size of row\renewcommand{\arraystretch}{2}%vertical size(width)i.e. size of column \begin{tabular}{|p{3cm}|p{4cm}|} \hline name & roll \\ \hline abc & 324 \\ \hline \end{tabular}

27.tex

Page 73: Latex for beginner

73

ASSIGNMENT

Department Information

Dept. No. ofStudent

Result Year

CSEIT

6060

8080

20152015

28.tex

Page 74: Latex for beginner

74

Package - \usepackage{fancyheadings}File – fancyheading.sty\pagestyle{fancy}\lhead{}\chead{}\rhead{}\lfoot{}\cfoot{}\rfoot{}

Header & Footer

29.tex

Page 75: Latex for beginner

75

\ pagenumbering{ . . . }RomanArabicromanAlphalph

Page Numbering

Page 76: Latex for beginner

76

MARGIN\ evensidemargin . .pt\ oddsidemargin . . pt\ topmargin . . pt\ headheight . . pt \ paperwidth . . pt \ paperheight . . pt

Page 77: Latex for beginner

77

TO SET PAR INDENT

\setlength{\parindent}{28pt}

30.tex

Page 78: Latex for beginner

78

PAGE BORDER

Package - \u sepackage{fancybox}\ t hisfancyput(-0.6in,-9.8in){\ setlength{\ unitlength}{1in}\f ramebox(7.5,10)}

31.tex

Page 79: Latex for beginner

79

MATHEMATICAL FORMULA

Donald Knuth says that his aim in creating TEX is to beautifully typeset technical documents especially those containing a lot of Mathematics. It is very difficult to produce complex mathematical formulas using a word processor.

Page 80: Latex for beginner

80

Package -\usepackage{amsmath,amsthm}Symbols

➢Relation - >, < , =, Π, ∑ ,∩ ……➢Arrow - ↑, ↔ , ← …..➢Miscellaneous - √ , ∆, ̸ …..➢Delimiters - [ , ] ,{ ,} ,|➢Greek Letters – Ø, ø, α. Β, γ, η …..

Page 81: Latex for beginner

81

Eg. y = mx + c

\begin{displaymath} y = mx + c \end{displaymath}

Eg. y = mx +c --------- (1) \begin{equation} y = mx + c \end{equation}

SIMPLE EQUATION

32.tex

Page 82: Latex for beginner

82

a = \int_{i}^{j}+\frac{x}{y\sqrt{z}}

\Sigma_{i}^{j}=(a+b)*c

33.tex

Page 83: Latex for beginner

83

\numberwithin{equation}{section}

\begin{equation}

a = \int_{i}^{j}+\frac{x}{y\sqrt{z}}

\end{equation}

According to section & Chapter

34.tex

Page 84: Latex for beginner

84

MATRIX• vmatrix –

• Vmatrix –

• bmatrix –

• Bmatrix –

• pmatrix

$\begin{vmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{vmatrix}$

Page 85: Latex for beginner

85

Report Writing

Page 86: Latex for beginner

CONTENTS IN REPORT Title page Declaration Abstract Index – Content, Table, Figure Nomenclature Abbreviations Chapter Section Bibliography

Page 87: Latex for beginner

CLASSESClass Chapter Section

Book Yes Yes

Report Yes Yes

Article No Yes

Paper No Yes

Page 88: Latex for beginner

88

\title{. . . . .}\author{. . . .}\date{ . . . }\maketitle

\begin{titlepage}\end{titlepage}

Title page

36.tex

Page 89: Latex for beginner

Package - \usepackage{titlesec}File - titlesec.sty

\titleformat{\chapter}[display]{\normalfont\huge\bfseries\centering}{\chaptertitlename\\thechapter}{20pt}{\Huge}

Chapter Alignment

37.tex

Page 90: Latex for beginner

Section Alignment

\titleformat{\section}{\normalfont\Large\bfseries\flushright}{\thesection}{1em}{}

Section Alignment

38.tex

Page 91: Latex for beginner

INDEX

\tableofcontents\listoftables\listoffigures

Page 92: Latex for beginner

RPackage - \usepackage[english]{babel}

\begin{thebibliography}{31}\bibitem{…} author list,paper name

\end{thebibliography}

Bibliography

Page 93: Latex for beginner

HYPERLINKS

Table reference Figure reference Equation reference

Page 94: Latex for beginner

Hyperlinks

Package - \usepackage{hyperref}[]

Page 95: Latex for beginner
Page 96: Latex for beginner

It’s not the design of your template, it’s what you do with it that counts

Beyond Bullet Points

PowerPoint Slides

PowerPoint Training

m62 visualcommunications is the global leader in presentation effectiveness, from offices in the UK, USA, and Singapore