Difference between revisions of "LaTeX/C2/LaTeX-on-Windows-using-TeXworks/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 242: Line 242:
  
 
Goodbye for now
 
Goodbye for now
 +
 +
|-
 +
| Show slide
 +
|Do you want to know how to solve a problem of the following type:
 +
“The required file ABC is missing.
 +
It is a part of the following package:
 +
XYZ”
 +
 +
Listen to the rest of this tutorial and practise with me
 +
  
 
|-
 
|-

Revision as of 10:40, 15 November 2017

Title of script: LaTeX on Windows using TeXworks

Author: Rupak Rokade

Keywords: video tutorial, LaTeX, TeXworks, windows, MikTeX,


Visual Cue Narration
On slide Dear Friends,

Welcome to the spoken tutorial on “LaTeX on Windows using TeXworks”

On slide



In this tutorial we will learn to,
  1. Download and install MikTeX
  2. Write basic LaTeX documents using TeXworks
  3. Configure MikTeX to download missing packages
On slide To record this tutorial, I am using Windows7 operating system and MikTeX2.9
On slide



Let us now see the salient features of TeXworks
  1. It is platform independent
  2. It has an embedded pdf reader
  3. It supports Indian language typesetting
On slide



Before we start with TeXworks, we have to install MikTeX.

MikTeX is an up-to-date implementation of TeX/LaTeX and related programs for Windows.

It contains the necessary packages to create basic documents in LaTeX on Windows

Moreover, TeXworks is a default editor available with MikTeX installation.

On the browser Go to the website www.miktex.org
Click on that link


Click on the download link for recommended MikTeX installer.

This will download the MikTeX installer.

Choose Desktop in Save location



Download and save it on your Desktop.

It is a large file, about 154 mega bytes.

Hence, it will take some time to download.

Switch to the Desktop and point to the file. I have already downloaded this file. Here it is.
Double-click >> click Run



Double click on this file to start the installation.

Check the check box and click on Next.

Choose all default options.

Show the installation process



The installation will take around 5 to 10 minutes.

I have already installed MikTeX on my computer.

Hence I will not proceed with the installation.

After successfully installing MikTeX on your computer,

let us see how to use the TeXworks editor which comes with MikTeX.

Click on Windows>>All programs >> MikTeX>>TeXworks



Click on the Windows start button.

Click on All Programs.

Click on MikTeX2.9

Click on TeXworks

TeXworks editor will open.

Let me open an already existing LaTeX document.

Click on File >> Open >> hello.tex I will click on File, then click on Open and choose the directory.

Then I will open the file hello.tex.

Point to some of the coloured text


Point also to the user content

You can see that the text written in the file is colored.

This is called syntax highlighting.

It helps the user differentiate between the user content and the LaTeX syntax.

In case the LaTeX syntax is not highlighted, do the following.
Click on Format In the TeXworks window, click on Format button available on the Menu bar.
Select Syntax Colouring>>LaTeX. Select Syntax Colouring and then click on LaTeX.
If you want TeXworks to apply syntax highlighting every time you create a LaTeX document, do the following
Click on Edit >> Preferences On the menu bar, click on Edit and then click on Preferences.
Editor tab>> dropdown>> Syntax Colouring In the Editor tab, click on the dropdown button which gives options for Syntax Colouring.
Choose LaTeX>>Ok Choose LaTeX and then click on Ok.
In this way, syntax highlighting will be applied to all documents created in the future.
Now we are ready to compile our LaTeX document.
Press Ctrl+T keys Press Ctrl and t keys together to start the compilation.
Once the document is compiled without errors, the resulting pdf will be opened.
Point to the pdf document Note that this pdf reader comes along with TeXworks.


It is the default pdf reader used by TeXworks to display the compiled pdf documents.

Show slide We have completed the basic installation of LATEX

This is sufficient for many formatting requirements

You may now leave this tutorial

Practice the remaining LATEX tutorials on the playlist


Show slide While practising other tutorials, you may get the following error message:

“The required file ABC is missing. It is a part of the following package: XYZ”

Here ABC is a file inside the package XYZ

ABC and XYZ will be specific to your case


Show slide When you get such an error message, listen to the rest of THIS tutorial

Two ways to solve that problem are explained in the rest of this tutorial

At least one of them should work for you

Goodbye for now

Show slide Do you want to know how to solve a problem of the following type:

“The required file ABC is missing. It is a part of the following package: XYZ”

Listen to the rest of this tutorial and practise with me


Now let us compile a Beamer document.
On slide



Beamer package by default is not included in the MikTeX setup that we have installed.

This means that we have to

  • download it from some source and
  • add it to our current MikTeX distribution
On slide



There are two ways of installing a missing package.

One way is to install it on the fly while we are compiling a LaTeX document

This LaTeX document will typically require a package not available in your MikTeX distribution.


Other way, is to manually choose and install a package using Package Manager of MikTeX.

Let us see the first method.
We will
  • open and compile a LaTeX document,
  • which requires MikTeX
  • to install packages from the internet.
Close TeXworks First close the TeXworks editor.
Click on Start>> All programs >> MikTeX



It is required that we open the tex file with administrator privileges.

Click on the start button.

Then click on All programs.

Click on MikTeX2.9

Right-click TeXworks >> Run as Administrator Right click on TeXworks and choose Run as Administrator

This will launch the TeXworks editor with administrator privileges.

Click on File>> Open>> beamer.tex Now click on File.

Then click on Open

Choose the file beamer.tex

Press Ctrl+T keys Press Ctrl and t keys together to start the compilation.
Dialog box A Package Installation dialog box will open.

It will ask to install the missing package beamer.cls.

Click Change Click on Change button on this dialog box.
Dialog box Change Package Repository dialog box will open.
Choose as told Choose the option Packages shall be installed from the internet option.
Click Connection Settings Click on Connection Settings.
It will prompt you to configure the proxy settings.
Point to Use proxy server option If you are not on a proxy network then leave the Use proxy server checkbox unchecked.
Click on the checkbox Since i am on a proxy network, i will enable the option by clicking on the checkbox
Type proxy address I will enter the proxy address.
Type the port number I will enter proxy port number.
Click on Authentication required checkbox I will enable the option Authentication required by clicking on the corresponding checkbox
Click OK>>Next Click on Ok. And then click on Next
It will ask me the proxy username and password.
Enter proxy>>OK I will enter the information and click on OK.
Choose one repository >> Finish It will show a list of various remote package repositories.

Choose one from the list and click on Finish.

Click Install Click on Install.

It will install the beamer.cls package

Dialog box Once again the Package Installation dialog box will open.
Point to pgfcore.sty It will prompt to install the missing package pgfcore.sty.
Uncheck the checkbox You may uncheck the option Always show this dialog before installing packages.

If you do this, MikTeX will not prompt you again, if it encounters a missing package.

Click Install Click on Install.
Now if there any more missing packages, it will automatically install it, without asking for your permission.
Point to the output side. Once the installation completes, it will finish the compilation and open the pdf output.

We can see that we have successfully compiled a Beamer document.

Click on Start >>All programs >>MikTeX>> Maintenance(Admin) >> Package Manager(Admin)




Now let us see the second method of installing missing packages.

Click on the Windows start button.

Click on All Programs.

Click on MikTeX2.9

Click on Maintenance (Admin)

Cick on Package Manager (Admin)

It will show a list of various packages available

Now let us take a look at this list.

Point to the columns There are six columns in this list.

These are Name, Category, Size, Packaged date, Installed on date and Title.

The Installed on column is very important to us.
Point to the blank column entries The packages for which this column is blank indicates that these packages are not installed.
Let us see how to install a particular package.
check this step of proxy authentication Let me choose the package abc, for example.
Point to the plus button Notice that the moment I choose the package, the plus button on the top left side gets enabled.
Click on the plus button The plus button is the install button.

Click on the plus button.

A window will open which will list the number of packages you have chosen to install or uninstall.
Click Proceed Click on Proceed.
Proxy dialog box Since I have configured a proxy network connection, it will prompt me for the proxy username and password.
Type proxy Let me type my username and password
Click Ok Click on Ok
Window




A window will open which will show the download progress of the package selected for installation.

It may happen that it fails to download the requested package due to remote server connectivity issues.

In that case, change the package repository and try again.

Click Close We can see that the installation of selected package is completed.

Click on Close.

Point to the entry The package list will get refreshed.

Notice that 11 september 2013 appears in the Installed on column for package abc.

This completes the tutorial LaTeX on Windows using TeXworks
On slide




In this tutorial we learnt to -
  • Download and install MikTeX
  • Write a basic LaTeX document using TeXworks
  • Configure MikTeX to download missing packages in 2 different ways
On slide * Watch the video available at , http://spoken-tutorial.org/What_is_a_Spoken_Tutorial
  • It summarizes the Spoken Tutorial project
  • If you do not have good bandwidth, you can download and watch it.


On slide The Spoken Tutorial Project Team
  • Conducts workshops using spoken tutorials
  • Gives certificates to those who pass an online test .
  • For more details, please write to contact@spoken-tutorial.org
On slide * Spoken Tutorial Project is a part of the Talk to a Teacher project
  • It is supported by the National Mission on Education through ICT, MHRD, Government of India.
  • More information on the same is available at, http://spoken-tutorial.org /NMEICT-Intro
This is Rupak Rokade from IIT Bombay signing off. Thanks for watching.

Contributors and Content Editors

Nancyvarkey, Rupakrokade