I'm just starting LaTeX, but i want to learn how to write documents with it. I have to write a recommendation report and thought this would be as good of a time as any to learn. I started looking at the wiki tutorial here
http://en.wikibooks.org/wiki/LaTeX, but I was wondering if there is something I could look at that's related to a recommendation report.
One thing I'm not sure how to do is create sections. I know there is \section{}
and \subsection{}
, but it's not what I am looking for. I am looking for formatting like \begin{abstract}
where it will center it. And the subsections will be italicized and left justified.
Is there a way to do this, so when creating the table of contents, it will still create a full table of contents?
Best Answer
Generally, selecting a suitable document class is the "correct" solution. Unfortunately, most document styles either look the same (LaTeX default styles) or are very complicated (
memoir
and other highly customizable styles). To apply a hotfix to one of the standard LaTeX styles, use thetitlesec
package, specifically the\titleformat
command:What you're doing then is redefining the style of the
\section
and\subsection
commands, i.e. how they're typeset. Their regular semantic meaning (among other things giving them an entry in the table of contents) will remain the same. The resulting section and subsection titles will look like this:For further information on the
titlesec
package, see its manual on CTAN.