Each time I compile Kile scrolls back to the beginning of the document. I would like to avoid this, it makes it very hard to write text as I need to browse back to the section I am editing each time. Any suggestions ?
When an error is encountered during the compilation, Kile opens the location of the first error. With some kinds of errors, Kile cannot determine where the error is located, and so it jumps to the beginning of the document. For example, this happens frequently with missing closing brackets.
The best thing is to investigate the error output (click on "Output" in the bottom menu and scroll until you find the error). When the output is long and/or you cannot find the error in it, run the compilation on command line (e.g.
pdflatex my-document.tex or
latex my-document.tex); the compilation will stop with a helpful message explaining where latex came to the conclusion that something is wrong, and if you investigate that spot in your input, you'll usually be able to correct it. (Press
x on the command line to stop attempting further compilation after the first message.)
If you do not care to correct the compilation error (e.g., you have a coauthor who is much better than you at finding the problematic spot), then you can switch off the "Jump to first error" option. It's a tickbox in Kile's
Settings > Configure Kile > Build > PDFLaTeX (the last part may be different; if you're compiling to DVI, it would be just