1

I have installed yesterday MikTex and WinEdt 10.3 version on my computer. I have opened my file which I want to generate, however it always reports a mistake:

! LaTeX Error: Option clash for package inputenc.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.21 \usepackage
                {comment}
? h
The package inputenc has already been loaded with options:
  [utf8]
There has now been an attempt to load it with options
  [ansinew]
Adding the global options:
  utf8,ansinew
to your \documentclass declaration may fix this.
Try typing  <return>  to proceed.
? 

The tex file worked on my old computer where I had Microsoft 10 (two days ago), however on new computer not. Is it maybe because of Microsoft 7?

Here is the beginning of my tex file:


%\documentclass[11pt,a4paper]{moderncv}

\documentclass[sans]{moderncv}

\moderncvstyle[left]{casual}

\moderncvcolor{grey}

\usepackage[utf8]{inputenc}

% character encoding

\usepackage[english,ngerman]{babel}

\usepackage[ansinew]{inputenc}

\usepackage{comment}

\usepackage{textcomp}               
 
\usepackage[version=3]{mhchem}

% adjust the page margins

\usepackage[scale=0.84]{geometry}

\recomputelengths

\usepackage{graphicx}

%\usepackage{paralist}

\usepackage{enumitem}

%\usepackage{xcolor}

\usepackage{color}

\usepackage{wrapfig}

\setlength{\hintscolumnwidth}{3.0cm}    
                
\AtBeginDocument{\recomputelengths}

.........................

I would be very happy if someone could help me with this issue.

Thank you in advance

Katarina

5
  • As the error says, you can try to remove the line with \usepackage[ansinew]{inputenc} --- That should have errored out anyway... (Your preamble is strange... are you sure is not the result of pasting two different ones together?) – Rmano Jun 30 at 7:45
  • 1
    If your file is utf8 encoded you can remove both lines with inputenc as utf8 is the default now, if your file is ansinew encoded, remove the line with [utf8]. – Ulrike Fischer Jun 30 at 7:47
  • @UlrikeFischer did Windows 7 use utf8 by default? Now that you mention it, maybe not... – Rmano Jun 30 at 7:49
  • @Rmano there is quite large probability that the file is ansinew encoded. (But naturally it would be a good idea to convert it to utf8, winedt has a menu entry for this). – Ulrike Fischer Jun 30 at 8:03
  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – dexteritas Jun 30 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.