summaryrefslogtreecommitdiff
path: root/Latex/Latex2/latex_intro_script.rst
diff options
context:
space:
mode:
authorJovina2012-08-03 11:35:54 +0530
committerJovina2012-08-03 11:35:54 +0530
commita9c09136b785a5769d7b927c22f416f1964016fe (patch)
treea4d4b9b7b142bbe5051485d69640e17e2f32b16e /Latex/Latex2/latex_intro_script.rst
parent18d8394b05bc6cc52cd1a54a59a22163b5147c34 (diff)
parentf71e9c3a7f4407dcd1ade3858c9a3a07028ce716 (diff)
downloadsdes-stscripts-a9c09136b785a5769d7b927c22f416f1964016fe.tar.gz
sdes-stscripts-a9c09136b785a5769d7b927c22f416f1964016fe.tar.bz2
sdes-stscripts-a9c09136b785a5769d7b927c22f416f1964016fe.zip
Merge branch 'master' of http://github.com/FOSSEE/sdes-stscripts
Diffstat (limited to 'Latex/Latex2/latex_intro_script.rst')
-rw-r--r--Latex/Latex2/latex_intro_script.rst182
1 files changed, 96 insertions, 86 deletions
diff --git a/Latex/Latex2/latex_intro_script.rst b/Latex/Latex2/latex_intro_script.rst
index 390f0eb..a5cdc57 100644
--- a/Latex/Latex2/latex_intro_script.rst
+++ b/Latex/Latex2/latex_intro_script.rst
@@ -1,7 +1,7 @@
.. Objectives
.. ----------
-.. By the end of this tutorial, you will
+.. At the end of this tutorial, you will
.. 1. Get acquainted to LaTeX.
.. #. Know why we prefer LaTeX?
@@ -16,15 +16,14 @@
.. Prerequisites
.. -------------
-.. 1. Should have already installed LaTeX and its supported packages on the host machine.
-.. #. Should be comfortable using a text editor of your choice.
+.. 1. Installing LaTeX
.. Author : Harish Badrinath < harish [at] fossee [dot] in >
Internal Reviewer : Kiran Isukapatla < kiran [at] fossee [dot] in >
External Reviewer :
Langauge Reviewer :
- Checklist OK? : <put date stamp here, if OK>
+ Checklist OK? : 25-Feb-2012
Script
------
@@ -36,38 +35,39 @@ team along with the logo of MHRD }}}
.. R1
-Hello Friends and welcome to the tutorial on introduction to LaTeX.
+Hello Friends and welcome to the tutorial on 'Introduction to LaTeX'.
.. L2
-{{{ Show the objectives slide }}}
+{{{ Show the "Objectives" slide }}}
.. R2
-.. By the end of this tutorial, you will
+At the end of this tutorial, you will
-.. 1. Get acquainted to LaTeX.
-.. #. Know why we prefer LaTeX?
-.. #. Know the advantages and disadvantages of typesetting documents
-.. using the LaTeX approach.
-.. #. Have a description, of a typical work flow; which uses LaTeX to typeset
-.. documents.
-.. #. Recognize and differentiate between LaTeX commands, LaTeX comments and
-.. special characters, spacing and actual document content.
-.. #. Be able to create and compile a very simple LaTeX document.
+1. Get acquainted to LaTeX.
+#. Know why we prefer LaTeX?
+#. Know the advantages and disadvantages of typesetting documents
+ using the LaTeX approach.
+#. Have a description of a typical work flow; which uses LaTeX to typeset
+ documents.
+#. Recognize and differentiate between LaTeX commands, LaTeX comments and
+ special characters, spacing and actual document content.
+#. Be able to create and compile a very simple LaTeX document.
.. L3
-{{{ Switch to the pre-requisite slide }}}
+{{{ Show the "Pre-requisite" slide }}}
.. R3
-Before beginning this tutorial, we would suggest having a working installation of
-LaTeX on your computer. You can do this by completing the tutorial titled
+Before beginning this tutorial, we would suggest having a working installation
+of LaTeX on your computer. You can do this by completing the tutorial on
"Installing LaTeX".
.. L4
+{{{ Show the "Introduction" slide }}}
.. R4
@@ -75,10 +75,10 @@ LaTeX began as TeX, a computer program originally created by
Donald E. Knuth. Its was designed mainly to aid typesetting
of text and mathematical formulae.
-LaTeX is a typesetting program that produces excellently typeset documents.
+It is a typesetting program that produces excellently typeset documents.
Typesetting is placing text onto a page with all the style formatting defined,
-so that content looks as intended. It is extensively used for producing high
-quality scientific and mathematical documents. It may also be used for
+so that the content looks as intended. It is extensively used for producing
+high quality scientific and mathematical documents. It may also be used for
producing other kinds of documents, ranging from simple one page articles to
complete books.
@@ -88,29 +88,37 @@ technology.
.. L5
+{{{ Show the "Why LaTeX?" slide }}}
.. R5
-Below are some of the reasons we prefer LaTeX
+Why we prefer LaTeX?
(a) LaTeX offers excellent visual quality.
-(b) It handles typesetting and lets you focus on content.
-(c) Its makes writing complex math equation extremely simple.
+(b) Handles typesetting and lets you focus on content.
+(c) Makes writing complex math equation extremely simple.
(d) It is also a standard used widely, especially by the scientific community.
+.. L6
+
+{{{ Show the "Why LaTeX? ..." slide }}}
+
+.. R6
+
We can define LaTex as a document based markup language. This sentence is
deceptively simple, as it reveals a lot about LaTex. We now break this sentence
up as follows
-Mark-up — a system of annotating text, adding extra information to
-specify structure and presentation of text
-Document based markup - you don’t have to worry about each
-element individually.
+Mark-up: a system of annotating text, adding extra information to specify
+structure and presentation of text.
+Document based markup: you don’t have to worry about each element individually.
+
This is essentially a fancy way of saying,LaTeX handles typesetting and lets
you focus on content.
-.. L6
+.. L7
+{{{ Show the "Advantages of using LaTeX" slide }}}
-.. R6
+.. R7
Some of the advantages of using LaTeX approach to typesetting are
(1) Easy availability of professionally crafted layouts.
@@ -122,20 +130,22 @@ of the document.
(4) Presence of lots of add-on packages.
(5) It encourages creation of well structured texts.
-.. L7
+.. L8
+{{{ Show the "Disadvantages of using LaTeX" slide }}}
-.. R7
+.. R8
-Some of the disadvantages of using LaTeX approach to typesetting is
+Some of the disadvantages of using LaTeX approach to typesetting are
(1) Designing a whole new layout is difficult.
(2) LaTeX is not a word processor, that is the document author is not expected
to worry about presentation details like the size of font, for example.
-.. L8
+.. L9
+{{{ Show the "LaTeX input file format" slide }}}
-.. R8
+.. R9
LaTeX input files are simple ASCII text files that are processed by a TeX
processing engine.
@@ -152,13 +162,14 @@ The command pdflatex is used to convert LaTeX input files directly to pdf files.
The resultant PDF files can be viewed using standard tools on most platforms
(Eg: evince on Gnu/Linux). PDF file are also widely supported.
-.. L9
+.. L10
+{{{ Show the "Commands,Comments&Special Characters" slide }}}
-.. R9
+.. R10
LaTeX, like most utilities in Linux, LaTeX is case sensitive. Commands begin
-with a backslash.LaTeX environments have a begin and end marker. The begin and
+with a backslash. LaTeX environments have a begin and end marker. The begin and
end document commands, mark the beginning and the end of the content of the
LaTeX document. The text in between the begin and end commands is typeset in
the output document.Any content after \end{document} is ignored. The type of
@@ -170,20 +181,22 @@ command and ends with an end command.
So, as expected LaTeX ignores anything that is written after the \end{document}
command. Essentially, anything written after the \end{document} command turns
-out to be a comment. But, how do we write comments with in the document. % is
-the character to indicate comments. Anything written after a % symbol in a
-line, is ignored.
+out to be a comment.
-.. L10
+.. L11
+{{{ Show the "Commands,Comments&Special Characters ..." slide }}}
-.. R10
+.. R11
+But, how do we write comments with in the document. % is
+the character to indicate comments. Anything written after a % symbol in a
+line, is ignored.
But what if we wanted to insert the % symbol in the document? We can do so by
escaping it with a \ (backslash). % is one of the many special characters in
-LaTeX. The others are, ~ # $ ^ & _ { } \. All of them, except the \ itself, can
-be inserted by escaping it with a \. To insert a \ in our document, we use the
-command \textbackslash.
+LaTeX. The others are shown on the screen. All of them, except the \ itself,
+can be inserted by escaping it with a \. To insert a \ in our document, we use
+the command \textbackslash.
What would happen if we escape a \ with a \?
A double backslash is actually another command. It inserts a new line in the
@@ -191,26 +204,28 @@ typeset document. Normally LaTeX automatically spaces the given input optimally.
But, sometimes we have to insert manual line breaks. The \\ command or \newline
command is used to insert a newline in the output document. Line breaks in the
input document, do not translate into line breaks in the output document. A
-single line break in the input document, doesn't cause any change in the output.
+single line break in the input document, doesn't cause any change in the
+output document.
A single empty line causes a change in paragraphs in the output. (Multiple
empty lines are equivalent to a single empty line.) Similarly, multiple spaces
are treated as a single space.
-.. L11
+.. L12
-{{{ Show slide with exercise 1 }}}
+{{{ Show the "Typesetting a minimal document" slide }}}
-.. R11
+.. R12
-Now, we try to create a simple LaTeX document. Pause the tutorial and type the
+Now, try to create a simple LaTeX document. Pause the tutorial and type the
content shown on the screen in a text editor. Save the file as temp.tex
-.. L12
+.. L13
{{{continue from paused state}}}
+{{{ Show the "Compiling to DVI" slide }}}
-.. R12
+.. R13
Now we compile the commands in the LaTeX input file that is, temp.tex into a
typeset file.
@@ -221,13 +236,13 @@ file temp.tex into a DVI file, we use the following command
latex temp.tex.
-The output file would be temp.dvi.On Gnu/Linux use a program like xdvi to view
-the output file.
+The output file would be temp.dvi.
-.. L13
+.. L14
+{{{ Show the "Compiling to PDF" slide }}}
-.. R13
+.. R14
The other alternative is to create PDF files from LaTeX input files.
We use the pdflatex command for this purpose. For compiling the LaTeX input
@@ -235,35 +250,32 @@ file temp.tex into a PDF file, we use the following command
pdflatex temp.tex
-The output file would be temp.pdf.On Gnu/Linux use a program like evince to
-view the output file.
-
Please note that, throughout this course we shall be using pdflatex to compile
our documents.
-.. L14
+.. L15
-{{{ Show summary slide }}}
+{{{ Show the "Summary" slide }}}
-.. R14
+.. R15
This brings us to the end of this tutorial. In this tutorial, we have learnt
-.. 1. About LaTeX.
-.. #. why we prefer LaTeX.
-.. #. About the advantages and disadvantages of typesetting documents
-.. using the LaTeX approach.
-.. #. A description, of a typical work flow; which uses LaTeX to typeset
-.. documents.
-.. #. The ability to recognize and differentiate between LaTeX commands, LaTeX
-.. comments and special characters, spacing and actual document content.
-.. #. Created and compiled a very simple LaTeX document.
+1. About LaTeX.
+#. why we prefer LaTeX.
+#. About the advantages and disadvantages of typesetting documents
+ using the LaTeX approach.
+#. A description, of a typical work flow; which uses LaTeX to typeset
+ documents.
+#. The ability to recognize and differentiate between LaTeX commands, LaTeX
+ comments and special characters, spacing and actual document content.
+#. Created and compiled a very simple LaTeX document.
-.. L15
+.. L16
-{{{Show self assessment questions slide}}}
+{{{ Show the "Self assessment questions" slide }}}
-.. R15
+.. R16
Here are some self assessment questions for you to solve
@@ -274,25 +286,23 @@ using the dvips command. Verify that the two files indeed look the same.
temp_1.pdf using the dvipdfm command. Verify that the two files indeed look the
same.
-.. L16
+.. L17
-{{{Show self assessment questions slide}}}
+{{{ Show the "Solutions" slide }}}
-.. R16
+.. R17
And the answers,
-1. We can use the following command to convert temp.dvi to temp_1.ps
-dvips -o temp_1.ps temp.dvi
+1. dvips -o temp_1.ps temp.dvi
-2. We can use the following command to convert temp.dvi to temp_1.pdf
-dvipdfm -o temp_1.pdf temp.dvi
+2. dvipdfm -o temp_1.pdf temp.dvi
-.. L17
+.. L18
-{{{ Show the thank you slide }}}
+{{{ Show the "Thank you" slide }}}
-.. R17
+.. R18
Hope you have enjoyed this tutorial and found it useful.
Thank you!