TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a so new to Tex and I am trying to learn now.

I decided to write a so simple software (ASP.NET 4.0) book for myself to learn it with a real example. So, I have the following structure for now :

\documentclass[a4paper, 12pt]{book}
\usepackage[utf8]{inputenc} %this will support Turkish chars


\section*{Getting Started With Something}

\subsection*{Headings in the `article' Document Style}


So, it is so basic as you can see. So far, I only figured out :

  • How to begin and end a document
  • How to set sections and subsections w/o numbers
  • how to get to a new page

So, How can I define chapters?

Also, first off all I would like to have a CONTENTS section which will displays the chapters, sections, subsections and their page numbers. What is the best way of doing that?

share|improve this question
Welcome to tex.sx! For the "Contents" section (or rather, chapter), have a look at tex.stackexchange.com/questions/1605/…. – lockstep Sep 29 '11 at 20:13
@lockstep thanks a lot for the greeting and the answer :) – tugberk Sep 29 '11 at 20:14
You might want to consult some general resources about LaTeX (tex.stackexchange.com/questions/11/…) and come back with specific questions once you've understood the basics. – Joseph Wright Sep 29 '11 at 20:16
You can use \chapter to produce chapters. Using \tableofcontents (and compiling twice), you'll get a table of contents. You can find basic documentation in, for example, A short introduction to LaTeX 2e. – Gonzalo Medina Sep 29 '11 at 20:33
As Gonzalo said. You might also consider the memoir documentclass for additional and usually more customizable settings compared to book. The documentation I linked to is pretty thorough and should answer any such questions you might have. – scallops Sep 29 '11 at 20:39
up vote 7 down vote accepted

Welcome to TeX.sx once more! Now that you have some basic knowledge with regard to the \chapter and \tableofcontents commands, you should consult some of the LaTeX resources that Joseph pointed out in his comment. For specific questions, always try to add a minimal working example (MWE) that illustrates your problem.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.