0

I would like a list of figures and list of tables as shown in screen shot. My attempt is given by the code:

\documentclass[12pt]{report}
\usepackage[titles]{tocloft}
\renewcommand{\cftdot}{\hfill}
\usepackage[most]{tcolorbox}


\newtcbox{\chapternumberbox}[1][]{%
  colback=myblueii!50!black,
  colupper={white},
  fontupper={\bfseries\large},
  valign=center,
  size=small,
  nobeforeafter,
  equal height group=chaptertoc,
  #1,
}




\newtcolorbox{chapternamebox}[1][]{%
  enhanced jigsaw,
  valign=center,
  interior style={left color={white!30!mybluei},right color={white!90!myblueii}},
  colframe={gray},
  boxrule={1pt},
  colupper={black},
  size=small,
  fontupper={\bfseries\large},
  nobeforeafter,
  equal height group=chaptertoc,
  #1,
}

% A wrapper command
\newcommand{\mychapternamebox}[3][]{%
  \begin{chapternamebox}[#1]
    #2\hfill#3%
  \end{chapternamebox}%
}


\usepackage{xpatch}

\makeatletter
\xpatchcmd{\@chapter}{%
  \addcontentsline{toc}{chapter}%
  {\protect\numberline{\thechapter}#1}%
}{%
  \addtocontents{toc}{\protect\cftpagenumbersoff{chapter}}
  \addcontentsline{toc}{chapter}{\protect\chapternumberbox{\protect\chaptername{} \thechapter}\protect\mychapternamebox[width={12cm}]{#1}{\thepage}}%%
  \addtocontents{toc}{\protect\cftpagenumberson{chapter}}%
}{}{}
\makeatother



\usepackage{tikz}
\usepackage{fourier}
\usepackage[explicit,calcwidth]{titlesec}
\usepackage{lipsum}
\usepackage[a4paper,bindingoffset=0.5in,%
            left=1in,right=1in,top=1in,bottom=1in,%
            footskip=.50in]{geometry}
\definecolor{mybluei}{RGB}{0,173,239}
\definecolor{myblueii}{RGB}{63,200,244}
\definecolor{myblueiii}{RGB}{199,234,253}

\newlength{\titleheight}
\setlength{\titleheight}{\dimexpr 1in+\topmargin+\headheight+\headsep+4cm}

\usetikzlibrary{tikzmark}
\tikzset{
  mycircled/.style = {circle,draw,inner sep=0.5em,line width=0.2em}
}

\titleformat{\chapter}{}{}{0pt}{%
  \begin{tikzpicture}[remember picture,overlay]
  \fill[white]
    (current page.north west) rectangle ([yshift=-\titleheight]current page.north east);
  \node[
      fill=teal,
      text width=2\paperwidth,
      rounded corners=6cm,
      text height=1.5\titleheight,
      anchor=center,
      inner sep=2pt] at (current page.north east) (chaptop) {};
  \node[above left, inner xsep=2pt] at (chaptop.south)
    {\fontsize{30}{40}\color{white}\rmfamily\bfseries #1%
    \ifstarredchapter\else
      \makebox[50pt][r]{%
        \raisebox
          {2\baselineskip} % Distance above chapter title
          {\Huge % Chapter X font size
            Chapter~\tikzmarknode[mycircled,blue,text=red, font=\Huge]{C-\thechapter}{\thechapter}}}%
    \fi};
  \end{tikzpicture}%
  }

\makeatletter
\newif\ifstarredchapter
\let\old@chapter\@chapter
\renewcommand{\@chapter}{\starredchapterfalse\old@chapter}
\let\old@schapter\@schapter
\renewcommand{\@schapter}{\starredchaptertrue\old@schapter}

\makeatother

\begin{document}
\tableofcontents
\listoffigures
\chapter*{Intro}

\chapter{Problem}

\lipsum[1]
\section{Problem Statement 1}
\lipsum[1]

\chapter{Solution}
\section{Solution Statement 1}
\lipsum[1]
\section{Solution Statement 2}
\lipsum[1]

\appendix
\chapter{Appendix}
\lipsum[1]
\chapter{References}
\lipsum[1]

\end{document}

enter image description here

Can someone help to make it more like the pictured output?

Leucippus
  • 1,636
  • Welcome to TeX.SE. I'm not quite understanding your question. Are you wanting to have the list of figures and list of tables appear with the same formatting that you have for your table of contents? Or are you wondering why those lists aren't showing up even though you have \listoffigures in your source? (But do you have a figure in your source?) – Teepeemm Jul 24 '19 at 21:16
  • Yes I want to have the list of figures and list of tables appreas with the same formatting of my tables of contents – Muhammad Ibrar Hussain Jul 24 '19 at 21:24
  • @Teepeemm yes i want the list of figures and list of tables apprea in the same formatting used for table of contents – Muhammad Ibrar Hussain Jul 25 '19 at 19:28
  • But they do appear the same way. "List of Figures" is in the top right, and the figures are listed just like the sections are. What are you wanting to happen? More specific than "the same". – Teepeemm Jul 25 '19 at 21:52
  • @Teepeemm i want to design list of figures by adding the chapter no. and chapter name and below the list of that chapter figures likewise toc. – Muhammad Ibrar Hussain Jul 25 '19 at 22:28
  • Having figures listed by chapter is a separate issue than having them formatted the same way. I think you've already gotten the second part taken care of, if you can just get them to show up separately. For that, have you looked at https://tex.stackexchange.com/q/52746/107497, https://tex.stackexchange.com/q/398166/107497, and the Linked and Related questions in them? – Teepeemm Jul 26 '19 at 12:17

0 Answers0