TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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'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?

share|improve this question
    
Welcome to tex.sx! A tip: you can use backticks ` to mark your inline code as I did in my edit. – doncherry May 6 '11 at 9:39
up vote 5 down vote accepted

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 the titlesec package, specifically the \titleformat command:

\titleformat{\section}[block]{\centering\bfseries\normalsize}{\arabic{section}}{3pt}{}
\titleformat{\subsection}[hang]{\itshape}{\arabic{section}.\arabic{subsection}}{3pt}{}

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:

Document appearance after applying \titleformat commands

For further information on the titlesec package, see its manual on CTAN.

share|improve this answer
    
yea ive been experimenting with this. I got pretty close to what i need. – Matt May 6 '11 at 21:28

Before you delve into code, it is normally best to select a document class, perhaps one that you are familiar with and then add packages and code to get to what you want. To help you here is a minimal that is based on the standard LaTeX article class. In the minimal below, I have included a couple of packages to show you how packages are added. The

\usepackage{makeidx}
\makeindex

is used to create an index. In your text whenever you need to index something you write \index{...}. To print it at the end you type \printindex.

\documentclass[11pt]{article} 
    \usepackage[utf8]{inputenc} 
    \usepackage{graphicx} 
    \usepackage{makeidx}
    \makeindex
    \usepackage{lipsum}
    \title{Recommendation report}
    \author{Dr Matt}
    \date{5th of May 2011} 
    \begin{document}
      \maketitle
      \tableofcontents   
      \listoffigures
      \listoftables
      \newpage
    \begin{abstract}
    \lipsum[3]
    \end{abstract}
    \section{First section}
    Your text\index{text} goes here.
    \subsection{A subsection}
    \lipsum[2]
     More text.
    \printindex
    \end{document}

Explore the minimal above (don't worry too much at first about the looks of the document). Once you are happy that you have a structure that reflects your requirements, you can then start thinking about presentational aspects of the document such as italic headings etc... For these there are a number of packages you can use, such as titlesec.

share|improve this answer

I recommend LyX [1]. It's great for beginners who want to learn-by-doing and don't want to learn commands or macro's. Once you get a hang of the system you can look at the LaTeX source and the output and learn how it works.

This way you can experiment while still being able to produce great documents.

[1] www.lyx.org

share|improve this answer
    
yea i saw that. been trying different IDEs. – Matt May 6 '11 at 21:31

Your Answer

 
discard

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.
http://tex.stackexchange.com/questions/17538/new-to-latex-want-to-write-recommendation-report/17567
tex.stackexchange.com
crawl=CC-MAIN-2016-18
83336
application/http; msgtype=response
sha1:GCVDPJVAMNGO2O7RKUIR6LQDRA6GYQWW
<urn:uuid:c8ef0899-60af-4cb2-b264-86e23f80eb0e>
2016-05-04T00:09:49Z
104.16.115.182
sha1:3NJIZ2VFXPHWXT2LLB33UC7V7AX5TNDC
<urn:uuid:ae43781d-1700-4066-b408-1cfd1dce4a1e>
http://tex.stackexchange.com/questions/17538/new-to-latex-want-to-write-recommendation-report/17567
response
<urn:uuid:f0734587-d685-4ae4-bbe9-5d5710e7196f>
robots: classic
hostname: ip-10-239-7-51.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2016-18
operator: CommonCrawl Admin
description: Wide crawl of the web for April 2016
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf