我一直在处理这个文档,没有任何问题,但现在每次我编译它时,都会出现此消息:
! Package inputenc Error: Keyboard character used is undefined
(inputenc) in inputencoding `ansinew'.
\documentclass[a4paper,twoside,10pt]{report}
\usepackage[spanish]{babel} %francais, polish, spanish, ...
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{xcolor}
\usepackage{lmodern}
\usepackage{siunitx}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{enumerate}
\usepackage{a4wide}
\usepackage{fancyhdr}
\usepackage{longtable}
\begin{document}
\pagestyle{empty}
\title{INFORME ETAPA I:
DIAGNÓSTICO DE LA SITUACIÓN ACTUAL}
\author{CONTRATO No. LCC-MPORTO-2016-003}
\maketitle
\begin{abstract}
some text here
\end{abstract}
\tableofcontents
\cleardoublepage
\pagestyle{plain}
%%Chapters%%
%\include{./capitulos/parte 1}
\clearpage
\addcontentsline{toc}{chapter}{Índice de Figuras}
\listoffigures
\clearpage
\addcontentsline{toc}{chapter}{Índice de Cuadros}
\listoftables
\appendix
\end{document}
答案1
正如所发布的,您的代码是 UTF-8 的(因为整个网站都是 UTF-8),因此标题中的重音字母无法理解,而 LaTeX 期望如此ansinew
! Package inputenc Error: Keyboard character used is undefined
(inputenc) in inputencoding `ansinew'.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.2 ...nc@undefined@ {ansinew}ndice de Figuras}{3}
?
该错误来自于Í
读回目录的时候。
删除损坏的.toc
文件然后指定
\usepackage[utf8]{inputenc}
允许文档无错误运行