我完全是个新手 - 刚开始使用 Latex。但这是一个令人失望的开始!
我正在尝试使用非常简单的脚本进行 \itemize 和 \enumerate
\documentclass{article}
\begin{document}
\begin{itemize}
\item This should be the first item.
\item This should be the second item.
\end{itemize}
\end{document}
当我使用 TexWorks+pdfLaTeX 时,出现错误消息
! LaTeX Error: Something's wrong--perhaps a missing \item.
...
l.4 \item This should be the first item.
?
当将 Sublime Text 3 与 Latexing 结合使用时,我收到多达七条错误消息 - 带有 \item 的两行各有三条,而 \end{itemize} 行则有一条。
我一直在阅读参考手册和 stackexchange,但这个问题实在太愚蠢了,历史上似乎没有人遇到过。如果能提供任何提示或建议,我将不胜感激,在此先行致谢!
编辑:我按照要求发布了完整的 .log 文件。正如怀疑的那样,字体似乎有问题。
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9.6210 64-bit)
(preloaded format=pdflatex 2017.3.30) 31 MAR 2017 11:07
entering extended mode
**"C:/Luca's Documents/LaTeX/Sublime project exercising with latexing and
knitR
/Luca's Latexing page layout exercises.tex"
("C:/Luca's Documents/LaTeX/Sublime project exercising with latexing and
knitR/
Luca's Latexing page layout exercises.tex"
LaTeX2e <2017/01/01> patch level 1
Babel <3.9r> and hyphenation patterns for 75 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Luca's Documents\LaTeX\Sublime project exercising with latexing and
knitR\
Luca's_Latexing_page_layout_exercises.aux")
\openout1 = `Luca's_Latexing_page_layout_exercises.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
Missing character: There is no  in font cmr10!
Missing character: There is no in font cmr10!
Missing character: There is no  in font cmr10!
Missing character: There is no in font cmr10!
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \item T
his should be the first item.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \item T
his should be the first item.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \item T
his should be the first item.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
LaTeX Font Info: Try loading font information for OMS+cmr on input line
4.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\omscmr.fd"
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 4.
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.5 \item T
his should be the second item. Â
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.5 \item T
his should be the second item. Â
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.5 \item T
his should be the second item. Â
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Missing character: There is no  in font cmr10!
Missing character: There is no in font cmr10!
Missing character: There is no  in font cmr10!
Missing character: There is no in font cmr10!
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \end{itemize}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
[1
{C:/Users/lucav/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
("C:\Luca's Documents\LaTeX\Sublime project exercising with latexing and
knitR\
Luca's_Latexing_page_layout_exercises.aux") )
Here is how much of TeX's memory you used:
220 strings out of 493333
3381 string characters out of 3139194
53255 words of memory out of 3000000
3832 multiletter control sequences out of 15000+200000
3640 words of font info for 14 fonts, out of 3000000 for 9000
1141 hyphenation exceptions out of 8191
23i,4n,19p,240b,143s stack positions out of
5000i,500n,10000p,200000b,50000s
<C:/Program Files/MiKTeX 2.9/fonts
/type1/public/amsfonts/cm/cmr10.pfb>
Output written on "C:/Luca's Documents/LaTeX/Sublime project exercising with
la
texing and knitR/Luca's_Latexing_page_layout_exercises.pdf" (1 page, 14337
byte
s).
PDF statistics:
10 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
答案1
如日志文件所示,此处有字符被丢弃:最可能的罪魁祸首始终是类似不间断空格之类的东西。根据评论,这些似乎是通过复制粘贴文本引入的:如果源以纯文本以外的任何形式显示,则通常会很危险。
解决方案是删除有问题的字符,举个简短的例子,最好的方法是重新输入。