General ⇒ LaTeX error, .sty not found
-
- Posts: 3
- Joined: Tue Apr 27, 2010 6:34 am
LaTeX error, .sty not found
I'm pretty familiar with LaTeX, I've been using it for about 2 years. I'm using windows 7 and MikTex 2.8 and I'm trying to use the install mcode package. I put it under C:\Program Files\MiKTeX 2.8\tex\latex\mcode (mcode is the file that contains mcode.sty)
I went to the MikTex Options program and refreshed the FNDB. I went to the windows command center and typed in the command texhash (both were successful, and I've done both multiple times). I restarted my computer too.
For some reason, mcode.sty is still not found. The frustrating thing is that it used to work, but I recently wiped my hard drive and have been putting LaTeX back on it. Did I forget something?
Thanks.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
-
- Posts: 3
- Joined: Tue Apr 27, 2010 6:34 am
LaTeX error, .sty not found
Re: LaTeX error, .sty not found
(I'm not suggesting that as a long term solution, just a diagnostic.)
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
Re: LaTeX error, .sty not found
(I should add that you really should put locally-installed files in a local root, not inside \Program Files.)
-
- Posts: 3
- Joined: Tue Apr 27, 2010 6:34 am
Re: LaTeX error, .sty not found
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
Re: LaTeX error, .sty not found
LaTeX error, .sty not found
I'm a student and I use latex for about 9 months now.
I'm trying to use the mcode package but no mater what I do I just won't work.
I've tried :
- put the mcode.sty in the same folder => didn't work.
- copy the mcode folder in "C:\Program Files (x86)\MiKTeX 2.8\tex\latex\mcode" then refresh the FNDB (using the admin right of course).
- reboot my laptop.
I'm on Win7Pro, I use MikTex 2.8 and TeXnicCenter 1.0.
Here's my header :
Code: Select all
%=== SET UP/HEADER ===============
\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[english,francais]{babel}
\usepackage{graphicx}
\usepackage{mcode}
\usepackage{fancyhdr}
\usepackage[hmargin=2.5cm,vmargin=3cm]{geometry}
\author{XmH}
\title{title}
\date{13/10/2010}
\begin{document}
%=== COVER ===============
\maketitle
\thispagestyle{empty}
\newpage
\pagestyle{fancy}
\lhead{}
\chead{}
%\rhead{}
\lfoot{XmH}
\cfoot{\thepage}
\rfoot{XXX}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
%=== TABLE OF CONTENTS ===============
\tableofcontents
\newpage
%=== INTRO ================
[...]
%=== ANNEXES ===============
\appendix
\section{Annexes}
\subsection{Code Matlab - SEM Labo01 221}
\lstinputlisting{code/SEM_Labo01_221.m}
%=== EOF ===============
\end{document}
The log dialogs box of TeXnicCenter does help much but it seams it can find mcode :
Code: Select all
[...]
("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\mcode\mcode.sty"
-- Package: `mcode' 1.9 <2010/05/04> --
Package: mcode 2010/05/04 1.9
- settings optimized for display (colour formating)
[...]
Bye
LaTeX error, .sty not found
LaTeX error, .sty not found
What would we do without people like you... Thanks a million!josephwright wrote:Refreshes the per-user FNDB. As I said, you really should install files for you (as opposed to those managed by MiKTeX) on a per-user basis.