Here's my .log file from running the same code, where the indentation works fine:
Code: Select all
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
entering extended mode
(./go.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, ku
rmanji, latin, latvian, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, po
lish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, span
ish, swedish, turkish, ukenglish, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2009/texmf-dist/tex/latex/koma-script/scrbook.cls
Document Class: scrbook 2010/02/15 v3.05 KOMA-Script document class (book)
(/usr/local/texlive/2009/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2009/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2009/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2009/03/25 v3.03 KOMA-Script package (loading files)
Copyright (C) Markus Kohm
))) (/usr/local/texlive/2009/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2009/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2009/texmf-dist/tex/latex/koma-script/typearea.sty
Package typearea, 2010/02/15 v3.05 KOMA-Script package (type area)
Copyright (C) Frank Neukam, 1992-1994
Copyright (C) Markus Kohm, 1994-
)) (./go.aux)
Chapter 1.
[1{/home/kck/.texlive2009/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./go.aux)
*File List*
scrbook.cls 2010/02/15 v3.05 KOMA-Script document class (book)
scrkbase.sty 2010/02/15 v3.05 KOMA-Script package (KOMA-Script-dependent bas
ics and keyval usage)
scrbase.sty 2010/02/15 v3.05 KOMA-Script package (KOMA-Script-independent b
asics and keyval usage)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty 2009/03/25 v3.03 KOMA-Script package (loading files)
tocbasic.sty 2010/01/05 v3.04b KOMA-Script package (handling toc-files)
scrsize11pt.clo 2010/02/15 v3.05 KOMA-Script font size class option (11pt)
typearea.sty 2010/02/15 v3.05 KOMA-Script package (type area)
***********
)</usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmssbx10.pfb
></usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on go.pdf (1 page, 37846 bytes).
SyncTeX written on go.synctex.gz
Transcript written on go.log.
As you can see my log is shorter than yours, and I confess I don't really understand what's going on with some of yours. (Perhaps some of the experts here would.) You can also see that I'm using newer versions of some of class and style files, though it's hard to believe that these are an issue either if you get the problem with article.cls too. I guess you could try updating everything, but I don't know whether or not that would help.
What about these steps first:
1. Does it make a difference whether you use spaces or tabs for the indenting?
2. Does it make a difference whether you load packages like
verbatim or
listings and use to display your code?