Difference between revisions of "LaTeX-Old-Version/C2/Installing-MikTeX/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with ''''You are here''': Main Page >> Spoken Tutorial Processes >> LaTeX >> Installing MikTeX ---- Note: this script has turned out to be rather verbose. Please feel free…')
 
Line 31: Line 31:
 
If you have questions, please feel free to contact user communities. For example, contact TUG India. We expect to provide some help also through fosee dot in. We also hope to create some more spoken tutorials for latex in the future . Please send your feedback back to me, This is Kannan Moudgalya from IIT Bombay signing off. Thanks for joining.
 
If you have questions, please feel free to contact user communities. For example, contact TUG India. We expect to provide some help also through fosee dot in. We also hope to create some more spoken tutorials for latex in the future . Please send your feedback back to me, This is Kannan Moudgalya from IIT Bombay signing off. Thanks for joining.
  
<comments />{{:{{TALKSPACE}}:{{PAGENAME}}}}
+
{{:{{TALKSPACE}}:{{PAGENAME}}}}

Revision as of 12:50, 27 November 2012

You are here: Main Page >> Spoken Tutorial Processes >> LaTeX >> Installing MikTeX


Note: this script has turned out to be rather verbose. Please feel free to change them, so long as the meaning does not changeKannan 07:54, 29 May 2010 (UTC)

Welcome to this tutorial on installing LaTeX on Windows. LaTeX can be used to produce outstanding documents. If you are going to create many documents in the rest of your life, it is time you started using Latex. If you are going to include a lot of mathematics, there is no substitute for latex at all. Latex documents created in one operating system, say Windows, can be reused, without any changes, in other systems, such as Linux and Mac – and conversely, Latex is free and also open source. Above all, it has excellent user communities to help you with doubts, for example, visit tug India. The following spoken tutorials on latex are available at moudgalya.org Please go through the first on the above list, namely, what is compilation, before continuing with the current tutorial. Finally web search could be the best source of information! Expect future support for latex from http fosse dot in – note two s’s and two e’s. FOSSEE stands for free and open source software in science and engineering education.

I will now explain how to use latex in windows operating system. I will begin with the installation of Miktex, a free distribution of latex. Then texnic-center, a free front end to miktex. I will show how to compile using Texnic -center and view through Adobe Reader. I will conclude with an optional pdf reader called Sumatra, that is free and open source. Miktex is a popular installation of latex for windows. Locate version 2.7 in miktex dot org. Okay let’s go there. Here it is. So you can download this. After downloading it, save it, as you may want to use it a few times if you are a beginner. The name of this file is given here. It is a large file, about 83 mega bytes. The complete version of Miktex is larger, of the order of 900 mega bytes, so we do not recommend it. IF you do not have good connectivity, use a CD, to be available in the future from fossee dot in. I have saved this installation file in my downloads directory which I will open now. I have already downloaded it here. I begin installation by clicking that icon. Give all default answers, it takes about 20 minutes to install so I will not show that here. I have already installed it; it is installed at this location.

Next adobe reader, it is a free reader that can be used to display pdf files. Your system may already have this, if so, you may skip the rest of this slide. IF you do not have it, go to adobe dot com. Download the free adobe reader. I have downloaded it in my downloads directory. So here it is. Double click it and install it, default answers are acceptable. I have already done that. Next we will install texnic-center in windows. Go to texnic center dot org, notice two c’s in texnic center. Okay let me see if I have this here. There you are. So here I have texnic center download directory. And if you go down here, let me just see, I think we are just going back to texnic center dot org. Let's just go there. So as we are doing it, lets get back to – oh there we are – So here is the texnic center homepage. You can see that it talks about texnic center. The center of your latex universe and so on. You have to click the download, this is the previous page that we had. Once you go there, the very first thing in the download’s page is to be clicked and downloaded. I have already downloaded that. So you can see that this is the downloads directory in which I have downloaded. Alright, what we will do is, we will go back to this, click the download button. It will take you to the list of downloads as I mentioned earlier. You need the texnic center installer which is first on this list. Click this, you may need to choose a mirror for download. After downloading, save it for future use, as you may want to install it a few times. I have it in my downloads folder as I mentioned. Let us now install it by double clicking and giving default answers. SO let me go there. Go to downloads. Okay, so lets get on with it. Let’s accept this gpl agreement. Next. So let’s go ahead and install it. Okay, it is getting installed.

Then texnic center gets installed with a shortcut on the desktop. So, double click the texnic center icon from the desktop and launch it. Okay, here is the desktop. Let me launch it. Let me close this. Okay, so what we will do is, we need to configure this. It says, enter the place where the tex distribution is located. So I know where it is. So let me enter that: c colon, program files, miktex 2.7, miktex, bin. Of course you can also browse for this and locate the directory. Okay, I have come to the next page, this is the post script viewer, we will accept, let’s not enter anything. Here what I will do is, I will browse and install the directory where my adobe reader is located. Okay it is in program files, adobe, reader 9.0, reader, so let me just click that. So now it is selected, so let’s next. Finish. Alright, now texnic center is configured. Now what I will do is I will make this smaller so that you can see all of it. IT has come here. Let me actually make it slightly bigger. Now we are ready to use. Now let’s go back here. So it will give a tip – close it. It will open a configuration menu and ask you to install a latex distribution and will also recommend miktex. So we already accepted that. We pressed the next button. You will be asked to provide the folder address where the binary files of Miktex are stored. We entered that also. In my directory it is located at this place. I entered this manually. PS files we don’t have to enter anything and then we browsed and located this for acrobat PDF reader. We are now ready to use texnic center. So, please go through ‘what is compilation’ a spoken tutorial available at moudgalya dot org in case you have not done so already. The rest of the tutorial assumes that you have gone through this.

So let’s go to texnic center and click the file menu. And then what do we do? If you want to create a new file, click new, type and save. I already have the file ‘hello.tex’, load it. So this is what we will do. Okay go here, File, Open, I have it in latex files, hello dot tex. So let me open this. Okay let’s come back here. The best help for texnic center comes with it. Another excellent source is texnic center dot org, which we have already seen. For now let’s go to help, click Contents, can get help on texnic center and latex. What I mean is lets come here, there is Help, Contents. So we can see that we have help available on two things. Namely on texnic center and also on latex help e-book. So if I click this, you will see lots of different things. You can also click this, you can see lots of things, for example, you can see latex maths and graphics. Maths- you can get lots of things, fractions, matrices, so on and so forth. Let’s close this. Advanced latex, environments, you have things like alignments, environments, array, pictures, maths, so on and so forth. Let’s close this also. Alright, let me just come here. So help on texnic center, the first one gives you help on font, look and feel of texnic center. It helps you on how to configure texnic center. Sometimes there could be discrepancies between the manual and actual implementation, if so, do a web search and find answers. In fact, this is the standard approach in most open source software systems – ask somebody, they will answer. The second one was latex related help – how to structure your report, how to include mathematics, how to include list environment? And so on. Of course, a web search is an excellent option too. Now let’s go back here and make the font slightly bigger. So it is here, tools, options, text format. So if I choose this size 12, okay, okay, you can see that the size has become bigger. I made the font slightly bigger. We did this. Now you may include line numbers in the editor if you like. So let’s come back here, tools, options, editor, show line numbers, okay. So you can see that line numbers have come. So now let’s proceed to compile our document. Choose the option, latex to pdf. Okay let’s do latex to pdf. Then enter, CTRL SHIFT and F5 key simultaneously. So let me do that. So if I click ctrl, shift, f5 keys simultaneously, what will happen? It will compile and the resulting pdf file is displayed. It should have one line. Let’s do that, ctrl shift, f5. You can see it is compiling. And it has opened the pdf reader. So let me bring it here. I can make it bigger. You can see only one line here. You may modify this file, compile and see the results. So let me close hello dot tex and hello dot pdf. So we can also do this later.

We will now explain a short coming that adobe reader has. To explain this, let us load the file report dot tex, used to create the spoken tutorial ‘report writing’, also available at moudgalya dot org. So let me do that. Now I will close this but I will open report dot tex. So let me take it here, so I can see some more of it. So what we will do first, is let’s first compile this, by pressing ctrl, shift f5. It compiles, 1 page report comes. So let me take it here. Okay. Let me also make it slightly bigger. Okay, what happens?

So we have done this, now what we will do is, let us change the class of this document to report. Here it is article, let me delete this, and change it to report. Save it, then let us compile – ctrl shift f5 – Alright, now it has come to two pages. Let’s take it back, make it bigger, let’s go to the second page. Alright it is on the second page. As we have seen it goes to two pages and mind you we were looking at the second page. So let’s compile it once again. So come back here. Okay, we can actually close this, we don’t need. Let’s go to this report dot pdf. Alright, what I want to say is that I am looking at the second page. You can see it here, this is the second page. We are looking at the second page, let me come back here, let me re-compile. Ctrl, shift, f5 – and you can see that it goes back to the first page. It re-opens but shows the first page. So that’s what I mentioned here, it opens in the first page. ‘We were viewing the second page, on compilation, it goes to the first page. IT is a problem, adobe reader does not remember the page that is being viewed. This could be a bigger problem for large documents. IF you use adobe reader, after every compilation, the file always opens in the first page. This is a problem with large documents. The pdf reader Sumatra solves this problem. Sumatra automatically refreshes the pdf file also, in addition it remembers the page that was viewed last. And Sumatra is free and open source. So, a search for this reader takes you to this page. I’ll show that page shortly. Okay, here it is. And go to this download page. And it shows you the file that needs to be installed. It is about 1.5 mb, that I have already downloaded. So let me just close this now. Come back here. Let’s go to, next page. Let us now double click the icon and install it by giving default answers. Let me do that now. Let me go to downloads, I have already downloaded Sumatra. Let me install it. Okay, install. Alright, it is done. Close. Sumatra is installed now. Let’s go to the next page, so in my system it gets installed at program files, Sumatra dot pdf.

First you have to tell texnic center that it should use Sumatra, so go to build, then define output profile, then we will do all of this. Then to viewer. So this is where it is. SO let’s locate this. Actually we don’t need this also. Let me close that. This is texnic center, so build, define output profile, go to viewer. So it is pointing to Adobe. Let’s say that we want to change this. Okay. Let’s go back here. Go back here. Go back here. In program files, we look at Sumatra. Her e it is. And you have to refer to this. Alright. So we are done. Okay, from now on it is going to compile using Sumatra. Okay, this is what we did. We browsed, we located, now we are ready to use Sumatra. So we close the Adobe Reader. So now let us compile report dot tex by pressing ctrl and f7 keys simultaneously. So we are going to press ctrl and f7 and not what we did earlier. So let’s do control f7, you can see that it has compiled. So what do we do next? Locate the file report dot pdf. Open it using Sumatra. Let’s go to latex file, so report dot pdf is there. So what I will do is, I will ‘open with’ Sumatra.

Alright, this is Sumatra. Let me just take it up a little bit. And lets go to the next page. Alright, this is the first page, second page we have to go from here. So what we will do is, we went to the second page, now lets add a line to the text. Let me add a line to the text. “Added Line”, Save it, then Ctrl F7. And you can see in the report dot pdf, that the page number is still the same. In fact, what I did was, it was already there, so then easiest way to convince you is, let me just, make it smaller, so I can see both simultaneously. Alright, so what I will do is, let me just delete this, save this, control f7, compiled. Open it, you can see that it is gone. In fact, what I can do is, I can also go to, let’s say ‘chapter- new”, Let me close it. Save it, ctrl f7. Now let’s come here, now we see that there are three pages, but of course we are on the second page, because we were in the second page to start with. Now we go to third page, if I compile it once again. Come back here, it doesn’t change at all. So that is the key thing about Sumatra. Okay, so we did all this, so let’s just go through this. The pdf file changes automatically, you don’t have to do anything. More importantly, it shows the same page. Add an appendix, compile it using ctrl f7, has three pages. So we can go to page three, we can re-compile it, it will continue to be in page three.

So what next? We installed only the basic version of Miktex, only a basic version of latex is available. Of course you can do a lot of things with this. Several packages, of course are not available over here, some of these are listed here. And also useful packages such as beamer. The way to include such missing packages is explained in the next slide. As soon as installing the basic miktex, update it. Click the start button, at the taskbar, which is at the bottom left hand corner of the windows screen. Click programs and then miktex 2.7. Click update, choose mirror, proxt etc., as required it will get updated. Then, proceed with the use of Texnic center as explained in this tutorial. When a package is missing, package installation of miktex will prompt you for installing it. You can install it from the internet. Or you can do it from a CD based distribution. First you have to copy the entire content to the hard disk and then install it from there. There is some difficulty in installing it from the CD. This calls for hard disk space for about 1 GB.

If you have questions, please feel free to contact user communities. For example, contact TUG India. We expect to provide some help also through fosee dot in. We also hope to create some more spoken tutorials for latex in the future . Please send your feedback back to me, This is Kannan Moudgalya from IIT Bombay signing off. Thanks for joining.

Talk:LaTeX-Old-Version/C2/Installing-MikTeX/English

Contributors and Content Editors

Chandrika, Nancyvarkey, Pravin1389