# Table of content as right side growing tree

\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-qtree}
\begin{document}

\begin{tikzpicture}
\tikzset{grow'=right,level distance=32pt}
\tikzset{execute at begin node=\strut}
\tikzset{every tree node/.style={anchor=base west}}
\Tree [.S [.Introduction ] [.Taxonomy
] ]
\end{tikzpicture}
\section{Introduction}
\section{Taxonomy}
\section{User Association}
\end{document}

• How much have you got so far? Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – DG' Apr 17 '17 at 8:31
• I tried using qtree, however I don't know how to add table of contents in qtree, thus, I thought MWE is no use here. – Mithun Apr 17 '17 at 16:06
• A MWE is always useful. And almost mandatory in your case, since we don't know anything about your document (i.e. documentclass, packages, etc.) – DG' Apr 17 '17 at 16:10
• Ok, I'll add some that might be helpful. – Mithun Apr 17 '17 at 16:11
• @DG' , I added, please kindly check. – Mithun Apr 17 '17 at 16:43

Definitely shouldn't have tried to answer this ....

Proof of concept:

\documentclass{article}
\usepackage[edges]{forest}
\forestset{%
subsection/.style={%
delay n={%
>O{n} %
}{%
for preceding siblings={do dynamics},
temptoksa/.option=name,
if nodewalk valid={previous}{%
for previous={%
if section={append/.register=temptoksa}{}%
}%
}{%
replace by={[, coordinate, append]},
},
},
},
declare boolean={section}{0},
}
\makeatletter
\newcommand\foresttoc{%
\begingroup
\xdef\foresttoctoc{}%
\renewcommand\contentsline[3]{%
\let\tempb\foresttoctoc
\xdef\foresttoctoc{\tempb[{##2}, ##1]}%
}%
\renewcommand\numberline[1]{Sec.~##1 }%
\bracketset{action character=@}%
\@starttoc{toc}%
\begin{forest}
before typesetting nodes={
forked edges,
for tree={
grow'=0,
anchor=parent,
tier/.option=level,
},
where level=1{fork sep'=0pt}{},
},
[, coordinate,   @+\foresttoctoc  ]
\end{forest}%
\endgroup
}
\makeatother
\begin{document}
\foresttoc
% \tableofcontents
\subsection{Awkward}
\section{User Association}
\section{Introduction}
\section{Taxonomy}
\section{User Association}

• @Mithun Please see edited version above. A regular ToC is now permitted, but no longer required. (But we still use the .toc file and apparatus to collect the information etc.) – cfr Apr 21 '17 at 0:26