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}
Here's a solution that uses the titletoc
package; the important part of the code is
% chapter formatting in toc
\titlecontents{chapter}
[0.0cm] % left margin
{} % above code
{% % numbered format
{\llap{\thecontentspage\hspace{.5cm}}\thecontentslabel~}%
}%
{} % unnumbered format
{} % filler-page-format, e.g dots
Here's a complete MWE to play with.
% arara: pdflatex
% arara: pdflatex
\documentclass{book}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{titletoc}
% chapter formatting in toc
\titlecontents{chapter}
[0.0cm] % left margin
{} % above code
{% % numbered format
{\llap{\thecontentspage\hspace{.5cm}}\thecontentslabel~}%
}%
{} % unnumbered format
{} % filler-page-format, e.g dots
\begin{document}
\tableofcontents
\chapter{mychapter}
\section{mysection}
\subsection{mysubsection}
\section{mysection}
\subsection{mysubsection}
\subsection{mysubsection}
\subsection{mysubsection}
\subsection{mysubsection}
\subsection{mysubsection}
\chapter{mychapter}
\section{mysection}
\subsection{mysubsection}
\section{mysection}
\subsection{mysubsection}
\subsection{mysubsection}
\subsection{mysubsection}
\subsection{mysubsection}
\subsection{mysubsection}
\chapter{mychapter}
\end{document}
Best Answer
For the main toc
Please read carefully again the linked answer and the KOMA-Script documentation1): By default in
scrbook
(andscrreprt
) the toc is set in onecolumn modus. Only, when you want to have it in two columns, you need\unsettoc{toc}{onecolumn}
. So, leaving it out is the solution here …For the minitoc
Use
\setchapterpreamble
2). Note, you must set it before the chapter, where it belongs to. With two optional arguments you can influence position and width.Also take notice, that I had to deactivate the rules before and after with
\mtcsetrules{minitoc}{off}
. As workaround I added two times\hrulefill
(the first must be in\smash
and then a make box [it would have worked without, but then a more difficult vertical space determining], the second would also work without, but I just copied it) and some vertical spaces. I guess, the\vspace
must be individually adjusted to one’s font and font size.Since you very probably will have more than one chapter, I defined two new commands, see below code for remarks. Because these have
\setchapterpreamble
inside (or are intended to use them inside), these must be set before each chapter.In most cases it will be enough to put
\setchaptertoc
in front of a chapter. But for cases, when you want to add more than the minitoc, I defined\dochaptertoc
with the workarounds for removed rules intended for use in\setchapterpreamble
, cf. chapter 2 in the example.1) Read online on Texdoc.net: “\setuptoc” & “\unsettoc” (PDF)
2) Read online on Texdoc.net, as well: “\setpartpreamble” & “\setchapterpreamble” (PDF again)