Seite 1 von 1

scrreprt - Seitenumbruch nach Sections und Subsections

Verfasst: Mo 15. Sep 2014, 12:05
von xjack86x
Hi Community,
In meiner DA verwende ich die Dokumentenklasse "scrreprt" .... Mein Problem ist das nach jeder
\section
bzw.
\subsection
ein Seitenumbruch gemacht wird. Kann man das unterbinden?
Mein Kopf sieht wie folgt aus:
\documentclass[12pt,toc=listof,toc=bibliography,headsepline]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usetikzlibrary{patterns}
\usepackage{graphicx}
\usepackage[bf,FIGTOPCAP]{subfigure}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{tabularx}
\usepackage{color}
\usepackage[onehalfspacing]{setspace}
\usepackage{geometry}
\usepackage{cite}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{fillbetween}
%\usepackage{tocbasic}
\usepackage{float}
\usepackage{acronym}
%\usepackage[printonlyused]{acronym}
\usepackage[automark]{scrpage2}
\usepackage{hyperref}

%\pagestyle{scrheadings}
%\automark[section]{chapter}
%\newcommand{\studienbereich}[1]{\textnormal{#1}}
%\newcommand{\matrikelnummer}{27516}
%\newcommand{\erstgutachter}{Prof. Hans-Joachim Böhme}

\newcommand{\pso}{\ac{pso}}

\ohead{\headmark}
\chead{}
\renewcommand*{\sectionmarkformat}{}
\pagestyle{scrheadings}

\makeatletter
\renewcommand{\thesubfigure}{\alph{subfigure}}% (a) -> a
\renewcommand{\@thesubfigure}{\thesubfigure)\hskip\subfiglabelskip}% a -> a)
\makeatother

\newcommand{\bs}{\ensuremath{\backslash}}

\newcommand{\sectionnumbering}[1]{\setcounter{section}{0}\renewcommand{\thesection}{\csname #1\endcsname{section}}} 

\bibliographystyle{alpha}

\parindent 0pt
\geometry{a4paper, top=30mm, left=20mm, right=20mm, bottom=20mm,includeheadfoot}



\begin{document}
...
\end{document}
Ich habe es schon mit
\nopagebreak
versucht, jedoch ohne Erfolg.

Danke für eure Hilfe Leute

Verfasst: Mo 15. Sep 2014, 12:12
von Genmutant
Kann ich mit deinem Code nicht nachvollziehen.
Der macht keine (besonderen) Seitenumbrüche bei section und subsection.

Verfasst: Mo 15. Sep 2014, 12:25
von xjack86x
Ist das bei "srcrept" normal?
Im angehängten Screenshot ist zu sehen was ich meine...

Ich wollte einen Screenshot anhängen, aber das geht nun nicht...
Upload Error: Kann das Attachment ./files/texbesipiel_132.jpg nicht hochladen.

Verfasst: Mo 15. Sep 2014, 13:01
von Genmutant
Wie gesagt, wenn ich ein \blinddocument (aus dem blindtext Paket) setze, schaut alles ohne unüblichen Seitenumbrüchen bei section oder subsection völlig normal aus. Mach mal ein Minimal(!)beispiel von deinem Problem.

Verfasst: Mo 15. Sep 2014, 13:15
von xjack86x
Beispiel:

main.tex
\documentclass[12pt,toc=listof,toc=bibliography,headsepline]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usetikzlibrary{patterns}
\usepackage{graphicx}
\usepackage[bf,FIGTOPCAP]{subfigure}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{tabularx}
\usepackage{color}
\usepackage[onehalfspacing]{setspace}
\usepackage{geometry}
\usepackage{cite}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{fillbetween}
%\usepackage{tocbasic}
\usepackage{float}
\usepackage{acronym}
%\usepackage[printonlyused]{acronym}
\usepackage[automark]{scrpage2}
\usepackage{hyperref}

%\pagestyle{scrheadings}
%\automark[section]{chapter}
%\newcommand{\studienbereich}[1]{\textnormal{#1}}
%\newcommand{\matrikelnummer}{27516}
%\newcommand{\erstgutachter}{Prof. Hans-Joachim Böhme}

\newcommand{\pso}{\ac{pso}}

\ohead{\headmark}
\chead{}
\renewcommand*{\sectionmarkformat}{}
\pagestyle{scrheadings}

\makeatletter
\renewcommand{\thesubfigure}{\alph{subfigure}}% (a) -> a
\renewcommand{\@thesubfigure}{\thesubfigure)\hskip\subfiglabelskip}% a -> a)
\makeatother

\newcommand{\bs}{\ensuremath{\backslash}}

\newcommand{\sectionnumbering}[1]{\setcounter{section}{0}\renewcommand{\thesection}{\csname #1\endcsname{section}}} 

\parindent 0pt
\geometry{a4paper, top=30mm, left=20mm, right=20mm, bottom=20mm,includeheadfoot}



\begin{document}

\tableofcontents
\clearpage

\chapter{Einleitung}
Chapter Text...
\include{Einleitung}

\chapter{Motivation}
Chapter Text
\include{Motivation1}
\include{Motivation2}


\end{document}
Einleitung.tex
\section{Sek-Einleitung}
ghhhd
\subsection{Subsek-Einleitung}
fjkhsdgjkh
Motivation1.tex
\section{Sek-Motivtion1}
ölksdghfidogh
\subsection{SubSek-Motivation1}
fseuigh
Motivation2.tex
\section{Sek-Motivtion2}
ölksdghfidogh
\subsection{SubSek-Motivation2}
fseuigh
es wird wohl eher an dem
\include
liegen befürchte ich

Verfasst: Mo 15. Sep 2014, 13:53
von Genmutant
Ja include beginnt immer (u.a.) eine neue Seite. Benutze stattdessen input falls du das nicht willst.

Verfasst: Mo 15. Sep 2014, 15:03
von Johannes_B
Lies dir bitte nochmal genau durch, was man unter einem Minimalbeispiel versteht. Den Link hast du bereits erhalten.

Was ist der Unterschied zwischen include und Input?