4

I am a total newbie - just starting with Latex. But it's a disappointing start!

I am trying \itemize and \enumerate with the extremely simple script

\documentclass{article} 
\begin{document} 
\begin{itemize}   
\item This should be the first item.   
\item This should be the second item.    
\end{itemize}
\end{document}

And I get, when using TexWorks+pdfLaTeX, the error message

! LaTeX Error: Something's wrong--perhaps a missing \item.
...
l.4 \item This should be the first item. 
?

When using Sublime Text 3 with Latexing, I get as many as seven error messages - three for each of the two lines with \item and on for the the line \end{itemize}.

I have been reading the reference manuals and stackexchange, but the problem is so simply idiotic that nobody in history seems to have had it. I would greatly appreciate any tip or piece of advice, thanks in advance!

EDIT: I am posting the full .log-file as requested. As suspected there seems to be something wrong with fonts.

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)
11
  • 1
    Welcome to TeX.SX! The example produces no errors on my installation.
    – egreg
    Mar 31, 2017 at 8:58
  • I know, right? I couldn't possibly imagine a simpler script (short of just writing "Hello").
    – torwart
    Mar 31, 2017 at 8:58
  • 2
    I wonder if you have some hidden characters somewhere: can you edit in the entire .log file?
    – Joseph Wright
    Mar 31, 2017 at 8:59
  • @egreg Infact. Also with Papeeria I have no error and the output is correct.
    – Sebastiano
    Mar 31, 2017 at 9:00
  • 1
    @ManuelWeinkauf guilty as charged (I copied from a Kindle application, of all things). Such an amateur mistake, it's embarrassing (I have no computer science background, but experienced friends had been warning me to never copy and paste). Sorry for wasting your time when you could have solved more complex issues. Based on the number and speed of reactions, this is an amazing community. I promise I will get better. Thank you all.
    – torwart
    Mar 31, 2017 at 9:56

1 Answer 1

4

As the log file shows, there are characters being dropped here: the most likely culprit is always something like a non-breaking space. Based on comments, it seems that these were introduced by copy-pasting the text: often risky if the source is displayed in anything other than pure plain text.

The solution is to remove the offending characters, which with a short example is best done by re-keying.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .