Skip to content
Snippets Groups Projects
Verified Commit 082266c8 authored by Dmytro Bogatov's avatar Dmytro Bogatov :two_hearts:
Browse files

Fixes.

parent 106106d0
Branches
No related tags found
No related merge requests found
Pipeline #
\DeclareDocumentCommand
% cSpell:disable
\DeclareDocumentCommand%
{\oramNode}
{ O{$\varnothing$} O{$\varnothing$} O{$\varnothing$} }
{#1, #2, #3}
\newif\ifselected
\newif\ifpathread
\newif\ifselected%
\newif\ifpathread%
\newif\ifnodeonenew
\newif\ifnodetwonew
\newif\ifnodethreenew
\newif\ifnodefournew
\newif\ifnodeonenew%
\newif\ifnodetwonew%
\newif\ifnodethreenew%
\newif\ifnodefournew%
% cSpell:ignore textcolor
\begin{tabular}{ l | *{9}{c} } % chktex 44
Block ID & 1 & 2 & 3 & 4 & \textcolor{red}{$5$} & 6 & $\ldots$ & 37 \\
......
......
\newcommand
{\blockFive}
{
\ifselected
\textcolor{red}{$5$}
\else
$5$
\fi
}
\newcommand
{\leafSix}
{
\ifselected
\textcolor{red}{$6$}
\else
$6$
\fi
}
\ifpathread
\newcommand{\selectedNode}{blue}
\else
\newcommand{\selectedNode}{black}
\fi
\begin{tikzpicture}[scale=0.8]
\Tree
[.\node[rounded corners, draw/.expand once=\selectedNode]{\oramNode};
[.\node[rounded corners, draw]{\oramNode[$4$]};
[.\node[rounded corners, draw]{\oramNode[$12$][$17$]};
[.\node[rounded corners, draw]{\oramNode[$22$][$23$]};
1
]
[.\node[rounded corners, draw]{\oramNode[$26$][$28$][$30$]};
2
]
]
[.\node[rounded corners, draw]{\oramNode[$24$][$29$][$33$]};
[.\node[rounded corners, draw]{\oramNode[$27$][$31$][$35$]};
3
]
[.\node[rounded corners, draw]{\oramNode[$34$][$32$][$21$]};
4
]
]
]
[.\node[rounded corners, draw/.expand once=\selectedNode]{\oramNode[$10$][$1$]};
[.\node[rounded corners, draw/.expand once=\selectedNode]{\oramNode[$2$][\blockFive][$8$]};
[.\node[rounded corners, draw]{\oramNode[$3$][$6$][$11$]};
5
]
[.\node[rounded corners, draw/.expand once=\selectedNode]{\oramNode[$7$][$13$][$15$]};
\node[]{\leafSix};
]
]
[.\node[rounded corners, draw]{\oramNode[$9$][$13$]};
[.\node[rounded corners, draw]{\oramNode[$20$][$14$][$16$]};
7
]
[.\node[rounded corners, draw]{\oramNode[$25$][$18$][$19$]};
8
]
]
]
]
\end{tikzpicture}
\newcommand
% cSpell:ignore ifpathread ifselected textcolor
\newcommand%
{\blockFive}
{
\ifselected
\ifselected%
\textcolor{red}{$5$}
\else
\else%
$5$
\fi
\fi%
}
\newcommand
\newcommand%
{\leafSix}
{
\ifselected
\ifselected%
\textcolor{red}{$6$}
\else
\else%
$6$
\fi
\fi%
}
\begin{tabular}{ l | *{9}{c} } % chktex 44
Block ID & 1 & 2 & 3 & 4 & \blockFive & 6 & $\ldots$ & 37 \\
Block ID & 1 & 2 & 3 & 4 & \blockFive & 6 & $\ldots$ & 37 \\ % chktex 1
\midrule%
Leaf ID & 6 & 5 & 5 & 1 & \leafSix & 5 & $\ldots$ & 7 \\
Leaf ID & 6 & 5 & 5 & 1 & \leafSix & 5 & $\ldots$ & 7 \\ % chktex 1
\end{tabular}
\newcommand
% cSpell:ignore ifpathread ifselected textcolor ifnodeonenew ifnodetwonew ifnodethreenew ifnodefournew
\newcommand%
{\blockFive}
{
\ifselected
\ifselected%
\textcolor{red}{$5$}
\else
\else%
$5$
\fi
\fi%
}
\newcommand
\newcommand%
{\leafSix}
{
\ifselected
\ifselected%
\textcolor{red}{$6$}
\else
\else%
$6$
\fi
\fi%
}
\ifpathread
\ifpathread%
\newcommand{\selectedNode}{blue}
\else
\else%
\newcommand{\selectedNode}{black}
\fi
\fi%
\newcommand
\newcommand%
{\nodeLevelOne}
{
\ifnodeonenew
\ifnodeonenew%
\oramNode[\textcolor{blue}{$8$}][\textcolor{blue}{$7$}][\textcolor{blue}{$1$}]
\else
\else%
\oramNode[$7$][$13$][$15$]
\fi
\fi%
}
\newcommand
\newcommand%
{\nodeLevelTwo}
{
\ifnodetwonew
\ifnodetwonew%
\oramNode[\textcolor{blue}{$2$}][\textcolor{blue}{$10$}][\textcolor{blue}{$15$}]
\else
\else%
\oramNode[$2$][\blockFive][$8$]
\fi
\fi%
}
\newcommand
\newcommand%
{\nodeLevelThree}
{
\ifnodethreenew
\ifnodethreenew%
\oramNode[\textcolor{blue}{$13$}]
\else
\else%
\oramNode[$10$][$1$]
\fi
\fi%
}
\newcommand
\newcommand%
{\nodeLevelFour}
{
\ifnodefournew
\ifnodefournew%
\oramNode[\textcolor{blue}{$5^\prime$}]
\else
\oramNode
\fi
\else%
\oramNode%
\fi%
}
\begin{tikzpicture}[scale=0.8]
......
......
% cSpell:ignore selectedtrue pathreadtrue nodeonenewtrue nodetwonewtrue nodethreenewtrue nodefournewtrue textcolor
\input{example/definitions}
\section{Example}
......@@ -24,7 +26,7 @@
\begin{frame}{\textsc{Access}$(5)$}
\selectedtrue
\selectedtrue%
\begin{figure}
\centering
......@@ -46,8 +48,8 @@
\begin{frame}{Read path}
\selectedtrue
\pathreadtrue
\selectedtrue%
\pathreadtrue%
\begin{figure}
\centering
......@@ -94,10 +96,10 @@
\begin{frame}{Write path back}
\selectedtrue
\pathreadtrue
\selectedtrue%
\pathreadtrue%
\nodeonenewtrue
\nodeonenewtrue%
\begin{figure}
\centering
......@@ -121,11 +123,11 @@
\begin{frame}{Write path back}
\selectedtrue
\pathreadtrue
\selectedtrue%
\pathreadtrue%
\nodeonenewtrue
\nodetwonewtrue
\nodeonenewtrue%
\nodetwonewtrue%
\begin{figure}
\centering
......@@ -149,12 +151,12 @@
\begin{frame}{Write path back}
\selectedtrue
\pathreadtrue
\selectedtrue%
\pathreadtrue%
\nodeonenewtrue
\nodetwonewtrue
\nodethreenewtrue
\nodeonenewtrue%
\nodetwonewtrue%
\nodethreenewtrue%
\begin{figure}
\centering
......@@ -178,13 +180,13 @@
\begin{frame}{Write path back}
\selectedtrue
\pathreadtrue
\selectedtrue%
\pathreadtrue%
\nodeonenewtrue
\nodetwonewtrue
\nodethreenewtrue
\nodefournewtrue
\nodeonenewtrue%
\nodetwonewtrue%
\nodethreenewtrue%
\nodefournewtrue%
\begin{figure}
\centering
......@@ -208,13 +210,13 @@
\begin{frame}{Final state}
\selectedtrue
\pathreadtrue
\selectedtrue%
\pathreadtrue%
\nodeonenewtrue
\nodetwonewtrue
\nodethreenewtrue
\nodefournewtrue
\nodeonenewtrue%
\nodetwonewtrue%
\nodethreenewtrue%
\nodefournewtrue%
\begin{figure}
\centering
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment