[Tex/LaTex] Miktex Package Installation

miktexpackagessubfloatstexmaker

I recently installed MiKTeX with the texmaker editor and cannot figure out how to update the packages. When I attempt to use the subfigure package with the following preamble

\documentclass[a4paper,12pt]{article}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{subfigure}

I then get a prompt to install a new package, which I then set to the online directory at ctan. I then get the following error:

! LaTeX Error: File `subfig.sty' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: sty)Enter file name:! Emergency stop.<read >

How do I properly install packages to miktex? I'm absolutely confused. Thanks in advance for any help.

Best Answer

Two ways:

1) Launch MiKTeX Package Manager from the Start menu, select the package you want to install and right-click on it to ask installation:

enter image description here

2) Launch MiKTeX Options and in the General tab, select Ask me first or Yes for Install packages on the fly. Thus when a package is not installed, compilation will be interrupted to propose you to install the missing package, and will resume after installation:

enter image description here

Related Question