I have such preamble and the code.
\documentclass[a4paper,14pt ]{report}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{amssymb,amsfonts,amsmath,mathtext,cite,enumerate,float}
\usepackage{graphicx}
\usepackage[14pt]{extsizes}
\usepackage{times}
\usepackage{hyperref}
\usepackage{tikz}
\usepackage[labelsep=period]{caption}
\usepackage{parallel,enumitem}
\DeclareCaptionLabelSeparator{par}{\par}
\captionsetup{labelsep=par,justification=centering}
\graphicspath{{images/}}
\newcommand\tablecaption[1]{
\captionsetup{labelsep=par,justification=centering}
\caption{#1}
}
\renewcommand{\baselinestretch}{1.5}\normalsize
\makeatletter
\renewcommand{\@biblabel}[1]{#1.}
\makeatother
\usepackage{geometry}
\geometry{left=3cm}
\geometry{right=1cm}
\geometry{top=2cm}
\geometry{bottom=2cm}
\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\labelenumi}{\arabic{enumi}}
\renewcommand{\theenumii}{.\arabic{enumii}}
\renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}
\renewcommand{\theenumiii}{.\arabic{enumiii}}
\renewcommand{\labelenumiii}{\arabic{enumi}.\arabic{enumii}.\arabic{enumiii}.}
\renewcommand{\rmdefault}{ftm}
\begin{document}
\begin{Parallel}{0.40\textwidth}{0.65\textwidth}
\ParallelLText{\noindent
\begin{enumerate}[itemsep=1ex]
\item{Vertices are sorted in the following order 0,5,1,2,4,3}
\item{Depth 1: \textbf{0},5,1,2,4,3} \\
Depth 2: \textbf{1},2 \\
Depth 3: \textbf{2} \\
Depth 2: 1,\textbf{2}
\item{Depth 1: 0,\textbf{5},1,2,4,3} \\
Depth 2: \textbf{4},3 \\
\item{Depth 1: 0,5,\textbf{1},2,4,3} \\
Depth 2: \textbf{2},3,4 \\
Depth 3: \textbf{3},4 \\
Depth 4: \textbf{4} \\
Depth 3: 3,\textbf{4} \\
Depth 2: 2,3,\textbf{4} \\
\item{Depth 1: 0,5,1,\textbf{2},4,3}
\end{enumerate}
}
\ParallelRText{\noindent
\\\\ (the bold face node is expanded)
\\\\
Cannot expand, so $CBC$ is \{0,1,2\} with size 3 \\
$d + (m - i)= 2 + (2 - 2) = 2 < 3,$ so we prune \\\\
$2 + (2-1)=3 \le CBC$, so we prune
\\\\ \\\\
becomes our new $CBC$ with size 4 \\
$3 + (2 - 2) = 3 < 4$, so we prune \\
$2 + (3 - 2) = 3 < CBC$, so we prune \\\\
$1 + (6 - 4) = 3 < CBC$, as depth = 1, we stop
}
\ParallelPar
\end{Parallel}
\end{document}
I have compiled it and have a good result, but when I have added it to the document with such preambula the border has changed.
How can I do it as it shown at the picture:
Best Answer
Of course, this depends on your actual usage/document layout, but I would rather go with a
tabularx
layout than use theparallel
package. For one, the code is structured on a line-by-line basis, rather than left-and-right chunks separated in blocks, improving readability in your code.Here's your example, "minimimalised" for the sake of brevity:
The gap between the "Depth" and "description" is
\quad
.The only drawback is that this implementation will not break across the page boundary. However, I'm not sure whether this is at all necessary.