Your problem can be solved with “widetext.sty”. This package mimicing the mechanism with the same name from RevTeX4 was written by Anjishnu Sarkar. Alas, the original home went away. Luckily, we can get a copy from a svn site of Einstein Toolkit, because they have used it for a document (direct link): https://svn.einsteintoolkit.org/documents/Paper_EinsteinToolkit_2010/widetext.sty
Save this package file and put it into your folder for your actual document or, in my eyes better: put into a local TEXMF directory. Since you mentioned MiKTeX in a comment, see Create a local texmf tree in MiKTeX. But if your later want to give away the sources, do not forget to add “widetext.sty”, then.
Here’s an MWE, some explication follows below:
\documentclass[twocolumn]{scrbook}
\usepackage[nohints]{minitoc}
\usepackage{amsmath, amsthm, amssymb, amsfonts, amsbsy}
\usepackage{bigints}
\usepackage{mathtools}
\usepackage{lipsum,kantlipsum}
\usepackage{widetext}% needs packages "flushend" & "cuted" of "sttools"
% bundle, which perhaps must separately be installed
\newcommand{\dd}[1]{\hspace{2pt}d#1}
\begin{document}
\chapter{One}
\lipsum[1]
\begin{widetext}
\begin{equation}\label{fyz:fey_eq_elstat18}
E_x(x_1, y_1, z_1) =
\int\limits_{\substack{\text{all}\\\text{area}}}\varrho(x_2, y_2, z_2)
\frac{x_1-x_2}{[(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2]^{\frac{3}{2}}}\dd{x_2}\dd{y_2}\dd{z_2}
\end{equation}
\end{widetext}
\kant[1]
\end{document}
I intentionally added kantlipsum
, another dummy text package, which produces English text. So you can see, how the columns get broken.
There still seem to exist some issues, though, especially with footnotes and floats, coming from the underlying package cuted
. Its documentation says, for footnotes you should use \footnotemark
plus \footnotetext
, but in tests I was not successfull – the notes were printed much to low inside or on top of the right column below the equation depending on the actual text length, cf. code below (I added only modified parts). With \leavevmode\begin{widetext}
the output is not perfect, but much better.
Also see on TeX.SE Problems using widetext.sty (do not overlook comments to answers).
\chapter{One}
Text\footnotemark{}
\lipsum[1]
Text\footnotemark
\addtocounter{footnote}{-1}
\footnotetext{Note \thefootnote}
\stepcounter{footnote}
\footnotetext{Note \thefootnote}
\begin{widetext}
...
\end{widetext}
Text\footnote{Note \thefootnote}
\kant[1]
Text\footnote{Note \thefootnote}
Update
KOMA-Script version 3.26 introduces two new keys to \RedeclareSectionCommand
and \RedeclareSectionCommands
: runin
and afterindent
. Possible values for both keys are bysign
, true
and false
.
runin
:
This key is only defined for sectioning commands with style=section
, eg section
, subsection
, subsubsection
, paragraph
, subparagraph
.
By default runin=bysign
is set. Then the sign of afterskip
decides if the heading is a runin heading (negative sign) or not (positive value) and the absolute value of afterskip
is used for the horizontal or vertical skip after the heading. This is the same behavior as explained in the original answer below.
With runin=true
it is a runin heading and the sign of afterskip
has no meaning anymore. Note that the absolute value of afterskip
is used as the horizontal skip. So even a negative value of afterskip
will result in positive horizontal skip.
With runin=false
it is a freestanding heading and the value of afterskip
is used as vertical skip. Note that with runin=false
a negative value of afterskip
results in a negative vertical skip.
afterindent
:
By default
afterindent=bysign
is set for style=section
and style=chapter
afterindent=true
is set for style=part
and class scrartcl
afterindent=false
is set for style=part
and class scrbook
With afterindent=bysign
the sign of beforeskip
determines if the first line after the heading uses the paragraph indentation or not. With afterskip=bysign
the absolute value of beforeskip
is used as vertical skip above the heading. This is the same behavior as explained in the original answer below.
With afterindent=true
the paragraph indentation is used for the first line following a freestanding heading. With afterindent=false
this first line is not indented. With both afterindent=true
or afterindent=false
the value of beforeskip
is used as the skip above the heading. So a negative value of beforeskip
results in a negative skip, even for a runin heading.
Example:
\documentclass{scrreprt}
\RedeclareSectionCommand[
%runin=false,
afterindent=false,
beforeskip=0pt,
afterskip=2\baselineskip]{chapter}
\RedeclareSectionCommand[
%runin=false,
afterindent=false,
beforeskip=\baselineskip,
afterskip=.5\baselineskip]{section}
\RedeclareSectionCommand[
%runin=false,
afterindent=false,
beforeskip=.75\baselineskip,
afterskip=.5\baselineskip]{subsection}
\RedeclareSectionCommand[
%runin=false,
afterindent=false,
beforeskip=.5\baselineskip,
afterskip=.25\baselineskip]{subsubsection}
\RedeclareSectionCommand[
runin=true,
%afterindent=false,
beforeskip=.5\baselineskip,
afterskip=1em]{paragraph}
\RedeclareSectionCommand[
runin=true,
%afterindent=false,
beforeskip=.5\baselineskip,
afterskip=1em]{subparagraph}
\begin{document}
\chapter{Erde}
Der eigentliche Text.\par
Test
\section{Europa}
Der eigentliche Text.
\subsection{Italien}
Der eigentliche Text.
\subsubsection{Toskana}
Der eigentliche Text.
\paragraph{Florenz}
Der eigentliche Text.
\subparagraph{Dom}
Der eigentliche Text
\end{document}
Original answer
It is easy with the new macros \RedeclareSectionCommand
and \RedeclareSectionCommands
of the KOMA-Script version 3.15.
\documentclass{scrreprt}
\RedeclareSectionCommand[
beforeskip=-1sp,
afterskip=2\baselineskip]{chapter}
\RedeclareSectionCommand[
beforeskip=-\baselineskip,
afterskip=.5\baselineskip]{section}
\RedeclareSectionCommand[
beforeskip=-.75\baselineskip,
afterskip=.5\baselineskip]{subsection}
\RedeclareSectionCommand[
beforeskip=-.5\baselineskip,
afterskip=.25\baselineskip]{subsubsection}
\RedeclareSectionCommand[
beforeskip=.5\baselineskip,
afterskip=-1em]{paragraph}
\RedeclareSectionCommand[
beforeskip=-.5\baselineskip,
afterskip=-1em]{subparagraph}
\usepackage{blindtext}
\begin{document}
\chapter{Erde}
Der eigentliche Text.\par
Test
\section{Europa}
Der eigentliche Text.
\subsection{Italien}
Der eigentliche Text.
\subsubsection{Toskana}
Der eigentliche Text.
\paragraph{Florenz}
Der eigentliche Text.
\subparagraph{Dom}
Der eigentliche Text
\end{document}
beforeskip
: The absolute value is the vertical space before the heading. If the value is negative the paragraph indent of the text following this heading is suppressed.
afterskip
: A positive value is a vertical skip below the heading. A negative value activates a run-in heading. Then the absolute value is the horizontal skip.
There is also a command \RedeclareSectionCommands
to change several section-like commands at once:
\documentclass{scrreprt}
\renewcommand*{\chapterheadstartvskip}{\vspace*{0cm}}
\renewcommand*{\chapterheadendvskip}{\vspace*{2\baselineskip}}
\RedeclareSectionCommands[
beforeskip=-.5\baselineskip,
afterskip=.25\baselineskip
]{section,subsection,subsubsection}
\RedeclareSectionCommands[
beforeskip=.5\baselineskip,
afterskip=-1em]{paragraph,subparagraph}
\begin{document}
\chapter{Erde}
Der eigentliche Text.\par
Test
\section{Europa}
Der eigentliche Text.
\subsection{Italien}
Der eigentliche Text.
\subsubsection{Toskana}
Der eigentliche Text.
\paragraph{Florenz}
Der eigentliche Text.
\subparagraph{Dom}
Der eigentliche Text
\end{document}
The result is the same as in the original answer.
With KOMA-Script version 3.14 you have to redefine the original commands (based on a suggestion by Markus Kohm). Note that the original definitions of this commands differ from KOMA-Script version to KOMA-Script version.
\documentclass[headings=small]{scrreprt}
\renewcommand*{\chapterheadstartvskip}{\vspace*{0cm}}
\renewcommand*{\chapterheadendvskip}{\vspace*{2\baselineskip}}
\makeatletter
%% check if this are the original definitions
\CheckCommand\section{%
\scr@startsection{section}{\sectionnumdepth}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
\setlength{\parfillskip}{\z@ plus 1fil}\fi
\raggedsection\normalfont\sectfont\nobreak\size@section}%
}
\CheckCommand\subsection{%
\scr@startsection{subsection}{\subsectionnumdepth}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
\setlength{\parfillskip}{\z@ plus 1fil}\fi
\raggedsection\normalfont\sectfont\nobreak\size@subsection
}%
}
\CheckCommand\subsubsection{%
\scr@startsection{subsubsection}{\subsubsectionnumdepth}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
\setlength{\parfillskip}{\z@ plus 1fil}\fi
\raggedsection\normalfont\sectfont\nobreak\size@subsubsection
}%
}
%% redefine
\renewcommand\section{%
\scr@startsection{section}{\sectionnumdepth}{\z@}%
{-.5\baselineskip}%
{.25\baselineskip}%
{\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
\setlength{\parfillskip}{\z@ plus 1fil}\fi
\raggedsection\normalfont\sectfont\nobreak\size@section}%
}
\renewcommand\subsection{%
\scr@startsection{subsection}{\subsectionnumdepth}{\z@}%
{-.5\baselineskip}%
{.25\baselineskip}%
{\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
\setlength{\parfillskip}{\z@ plus 1fil}\fi
\raggedsection\normalfont\sectfont\nobreak\size@subsection
}%
}
\renewcommand\subsubsection{%
\scr@startsection{subsubsection}{\subsubsectionnumdepth}{\z@}%
{-.5\baselineskip}%
{.25\baselineskip}%
{\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
\setlength{\parfillskip}{\z@ plus 1fil}\fi
\raggedsection\normalfont\sectfont\nobreak\size@subsubsection
}%
}
\makeatother
\begin{document}
\chapter{Erde}
Der eigentliche Text.\par
Test
\section{Europa}
Der eigentliche Text.
\subsection{Italien}
Der eigentliche Text.
\subsubsection{Toskana}
Der eigentliche Text.
\paragraph{Florenz}
Der eigentliche Text.
\subparagraph{Dom}
Der eigentliche Text
\end{document}
Best Answer
Seems easier than I thought:
First I tried to find out how to do that without the etoc package, because the tocbasic package, which is part of the KOMAscript bundle, surely provides the machinery. However, with etoc it seems fairly easy.