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
? h
The package inputenc has already been loaded with options:
There has now been an attempt to load it with options
Adding the global options:
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:






% character encoding





% adjust the page margins











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

Thank you in advance


  • 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.