How to change the first page (layout + geometry) of each chapter in a report?

I have the following problem: I want to lift the title of each chapter (so there's less vertical free space) and put the number before. Which means the layout from default settings

*much free space*

Chapter 1

Intro

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...

to

1. Intro

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...

The thing is, I added, as shown in another question,

\documentclass[a4paper,12pt]{report}
\usepackage[latin1]{inputenc}\usepackage[german]{babel}
\usepackage{ngerman}\usepackage[T1]{fontenc}\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{lipsum}
\usepackage[nodisplayskipstretch,doublespacing]{setspace}\usepackage{fancyhdr}\usepackage{layout}\usepackage[top=25mm,bottom=25mm,left=3cm,right=3cm]{geometry}\usepackage{atbegshi}
\usepackage{float}
\usepackage{subfig}
\usepackage{rotating}
\usepackage{eurosym}
\usepackage{amsmath}\usepackage{amssymb}\usepackage{calc}
%\usepackage{color}\usepackage[table]{xcolor} % Do I need these when I include images with colors?
\usepackage{caption}\usepackage{section}\usepackage{csquotes}
\usepackage{hyperref}\usepackage[all]{hypcap}
\makeatletter
%    \z@
\raggedright    \normalfont    \interlinepenalty\@M    \Huge \bfseries    \c@chapter    #1\par\nobreak    \vskip 20\p@}}
\makeatother
\setlength{\parindent}{0pt}
\begin{document}

\pagestyle{empty}
\newgeometry{top=25mm,bottom=25mm,left=3cm,right=3cm}
\include{titlepage} %This is the manually made title page plus a 2^nd page, which contains an acknowledgement.
\tableofcontents
\renewcommand{\baselinestretch}{2} %line pitch: double
\pagestyle{fancy}
\newgeometry{top=25mm,bottom=25mm,left=3cm,right=3cm}
\fancyhf{}
\renewcommand{\footrulewidth}{1pt}
\fancyfoot[R]{\thepage}
\include{Intro}
\include{nextpart} %Every chapter is in an exxtra .tex-file.
\end{document}


And here the code of Intro.tex:

\fussy %Only in first chapter.
\chapter{Intro}
\thispagestyle{fancy} %I changed in titlepage.tex; appearing only in this chapter.
\pagenumbering{arabic} %I changed in titlepage.tex; appearing only in this chapter.
Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...


But I get an extra "502040 " in my text right in front of the content of each chapter and also as an extre line in my list of tables. I think I just misspelled some commands, but I don't get which ones they could be. The .log-file doesn't tell me (or I'm just blind).

Actual output:

Intro

502040 Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...

Maybe some package is confusing my compiler because I also get an Illegal parameter number in definition of \rmn@originalTeX.<to be read again> } \begin{document}.-error which repeats 8 times. But this error seems to do nothing. (Sorry for being so uninformed.)

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Null Jan 14 '16 at 14:35
• The spacing before the chapter title is controlled by \vspace*{-50\p@}. This can't be changed directly. – user31729 Jan 14 '16 at 15:17
• Use a package dedicated to this task, such as titlesec. – Bernard Jan 14 '16 at 15:59

As was suggested to you in the comments, load the titlesec package. Then add the following commands:

\titleformat{\chapter}{\normalfont\bfseries\Large}{\thechapter.\quad}{0pt}{}
\titlespacing{\chapter}{0pt}{-50pt}{40pt}


The second one is what you're looking for. The values are respectively:

• left space
• space before (above)
• space after (below)

So you get

and here's the code:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{titlesec}
\usepackage{lipsum}


• I just can't install/use the titlesec-package. The error output says "File 'titlesec.sty' not found. And it gives a fatal error while loading the next package... – Nepumuk Jan 14 '16 at 19:50