2

Some time ago I deleted my .tex files, however I never cared to learn the preamble, whenever I wanted to make a new .tex I just copied the preamble from another file. Now that I have need of latex again, but no file to copy the preamble from, I have no idea how to get the look that I had in my other documents. I've read the not so short intro to latex, googled etc but haven't found what I've been looking for.

In the image in the link, the look to the left is what I'm after, and the one on the right is what I'm able to produce now. Those are sections; I want it to say just 1, not 0.1, 1.0, or anything like that. Furthermore, I can't get title/author/date to look the way I want. \maketitle produces a title centered on a separate (first) page; I want to be as in the file on the left.

image

So my question is, what do I write in the preamble to get the title and sections to look the way I want? Thanks so much!

Current preamble:

\documentclass[a4paper,11pt]{report} 
\pagestyle{plain} 
\usepackage[latin1]{inputenc} 
\usepackage[swedish]{babel} 
\usepackage{a4wide} 
\usepackage{graphics} 
\usepackage{amsmath} 
\newtheorem{theorem}{Theorem}[section] 
\newtheorem{lemma}[theorem]{Lemma} 
\newtheorem{proposition}[theorem]{Proposition} 
\newtheorem{corollary}[theorem]{Corollary}

\newenvironment{proof}[1][Proof]{\begin{trivlist} 
  \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}} 

\newenvironment{definition}[1][Definition]{\begin{trivlist} 
  \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}} 

\newenvironment{example}[1][Example]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}} 

\newenvironment{remark}[1][Remark]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}

\newcommand{\qed}{\nobreak \ifvmode \relax \else
      \ifdim\lastskip<1.5em \hskip-\lastskip
      \hskip1.5em plus0em minus0.5em \fi \nobreak
      \vrule height0.75em width0.5em depth0.25em\fi} 

\begin{document}
2
  • Use the article class, if you don't have chapters.
    – egreg
    Commented Sep 16, 2014 at 21:10
  • I do have chapters, but I don't want chapters. Commented Sep 16, 2014 at 21:13

1 Answer 1

0

Alright I got it. I tried @egreg's suggestion, partially, and changed to article. Then added \author{} and \title{} before \begin{document} (in that order), and then \maketitle.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .