oduwsdl / wsdlthesis

ODU WS-DL Thesis/Dissertation LaTeX Template
MIT License
3 stars 11 forks source link

Organizing chapter in table of contents #29

Closed hbake001 closed 6 years ago

hbake001 commented 6 years ago

I see the table of contents organize the chapters as it's shown in this screenshot:

image

I want to organize the chapters by introducing the name of the chapter then the sections like this

image

How can I do this?

ibnesayeed commented 6 years ago

This is already the case. We enumerate chapters and sections in the ToC. If you want to include another level of nesting and enlist subsections then change tocdepth to 2 in the CLS file. Also, I think you are using an older version of the CLS file, you might want to use the latest one.

hbake001 commented 6 years ago

I updated the CLS file and it's still the same behavior:

image

I even copied the most updated wsdlthesis class and it didn't work.

ibnesayeed commented 6 years ago

There is something seriously wrong somewhere else. The class file has never reported chapters with second-level numbering and the latest class file does not highlight links with outline colors as shown in your screenshots. Can you try cloning this repo separately and build it to see how the included sample files compile, then add some sections and subsections in one of the chapters to see the effect.

ibnesayeed commented 6 years ago

I would also check if you have every chapter starting with a \chapter{} command?

hbake001 commented 6 years ago

@ibnesayeed I see where the problem is. Since I'm using windows I had to change the \inputAllFiles{chapters} to

\input{chapters/01_introduction} \input{chapters/02_background} \input{chapters/03_relatedwork} \input{chapters/04_results} \input{chapters/05_conclusions}

\chapter{} isn't working though.

ibnesayeed commented 6 years ago

I am surprised that \chapter{Chapter Name} command is not working for you. Can you freshly clone this repo and in the main.tex file change:

\inputAllFiles{chapters}

to:

\input{chapters/01_introduction}

\input{chapters/02_background}

\input{chapters/03_relatedwork}

and change:

\inputAllFiles{appendices}

to:

\input{appendices/a_species}

Then compile and see the result.

Next, add some sections and subsections in one of the chapters and see how it affects the ToC.

hbake001 commented 6 years ago

It works, but I'm not sure what the problem is in my document.

ibnesayeed commented 6 years ago

In your document try changing:

\input{chapters/01_introduction}
\input{chapters/02_background}
\input{chapters/03_relatedwork}
\input{chapters/04_results}
\input{chapters/05_conclusions}

to:

\input{chapters/01_introduction}

\input{chapters/02_background}

\input{chapters/03_relatedwork}

\input{chapters/04_results}

\input{chapters/05_conclusions}

(Mind the extra empty lines between each \input{} command)

hbake001 commented 6 years ago

It didn't work either. FYI my main.tex looks like this:


\documentclass[master]{wsdlthesis}

\usepackage{custommacros}
\usepackage{setspace}

\usepackage{subcaption}

\input{config}

\begin{document}
\setrevision
\input{pages/vita}
\input{pages/abstract}
\beforepreface
\input{pages/preface}
\afterpreface
\begin{spacing}{2}

\input{chapters/01_introduction}

\input{chapters/02_background}

\input{chapters/03_relatedwork}

\input{chapters/04_results}

\input{chapters/05_conclusions}

\end{spacing}

\bibliographystyle{ieeetr}
\bibliography{ref}

\addtocontents{toc}{\vspace*{12pt}}
\addcontentsline{toc}{chapter}{REFERENCES}

\appendix

\input{appendices/a_species}

\newpage

\vitapage

\end{document}
ibnesayeed commented 6 years ago

Can you also verify that all your chapter files have a trailing new line, i.e., an empty line at the end? I am thinking along the lines of #21.

hbake001 commented 6 years ago

I confirm that all chapter files have an empty line at the end. Nothing was changed

ibnesayeed commented 6 years ago

Now, I am running out of ideas. If you come to the campus you can come see me in my office tomorrow.

hbake001 commented 6 years ago

@ibnesayeed Yes sure. Thanks for following up! appreciate your time.

ibnesayeed commented 6 years ago

@hbake001 can you have a look at #30 and see if that solves your problem temporarily?

hbake001 commented 6 years ago

I commented the following code:

                     \IfStrEq{\@chapapp}{APPENDIX}{%
                       \addcontentsline{toc}{section}%
                       {\protect\numberline{\thechapter.}\uppercase{#1}}%
                       {%
                         \addcontentsline{toc}{chapter}%
                       {\protect\numberline{\thechapter.}\uppercase{#1}}%
                     }}

but it didn't help in solving the issue.

ibnesayeed commented 6 years ago

I think it might help if we look at your code together in person to investigate what's going on.

hbake001 commented 6 years ago

Are you available in the meantime?

On Tue, Oct 23, 2018, 8:02 PM Sawood Alam notifications@github.com wrote:

I think it might help if we look at your code together in person to investigate what's going on.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/oduwsdl/wsdlthesis/issues/29#issuecomment-432464073, or mute the thread https://github.com/notifications/unsubscribe-auth/AfW0-7mFZheSr5uQiDjBRZWNI2Qar7_dks5un632gaJpZM4XbJ-u .

ibnesayeed commented 6 years ago

Yes, I am in my office right now.

ibnesayeed commented 6 years ago

In person review fixed the issues, so closing this.