gioboske wrote:[…] Furthermore about two years ago, for my master thesis, I used both packages with no errors. […]
Most LaTeX packages are under steady development (but some not). So problems like this can occur. Minor changes can cause major trouble. But since I'm personally not a TeX expert, I'm not able to spot the source of the error.
gioboske wrote:[…] I would use some other packages, but unfortunately I couldn't find any alternatives to minitoc and fncychap packages (and I really like fncychap Conny style!). Can you suggest me some alternatives? […]
That's exactly the reason why I asked. I had already an idea. But some users insist on old habits although they run into trouble. Therefore I was not sure if you are interested in an alternative solution. So, here we go!
The idea is to mimic the "Conny" chapter style and then add the partial ToCs to each chapter. This can be done by the "twins"
titlesec and
titletoc.
- titlesec will allow to alter the chapter style itself. We have to distinguish between numbered and unnumbered chapters because ToC, Lof and LoT won't need a partial ToC. The two chapter styles are done like this.
Code: Select all
\titleformat{name=\chapter}[display]
{\normalfont\Large\filcenter\bfseries}
{\titlerule[4pt]\vspace{2pt}\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{\chaptertitlename} \thechapter}
{1pc}
{\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{#1}}
\titleformat{name=\chapter,numberless}[display]
{\normalfont\Large\filcenter\bfseries}
{}
{1pc}
{\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{#1}}
If we wouldn't have a partial ToC, the first definition would be sufficient.
- titletoc will allow to add the chapter ToC by incorporating it into the new chapter style. Therefore we can use an optional argument for the above
\titleformat
macro.
Code: Select all
\titleformat{name=\chapter}[display]
{\normalfont\Large\filcenter\bfseries}
{\titlerule[4pt]\vspace{2pt}\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{\chaptertitlename} \thechapter}
{1pc}
{\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{#1}}
[\normalsize\normalfont\vspace*{2pc}%
\hbox{\large\bfseries\contentsname}\vspace{6pt}\titlerule\vspace{3pt}
\startcontents
\printcontents{l}{1}{\setcounter{tocdepth}{2}}\titlerule]
\titleformat{name=\chapter,numberless}[display]
{\normalfont\Large\filcenter\bfseries}
{}
{1pc}
{\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{#1}}
Now the differences between numbered and unnumbered chapters are clearer. The commands \startcontents
and \printcontents
come from titletoc.
All this packed into a complete document together with some dummy text to create some chapters with their content looks like this.
Code: Select all
\documentclass[11pt]{book}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\usepackage{blindtext} % drop in actual document
\titleformat{name=\chapter}[display]
{\normalfont\Large\filcenter\bfseries}
{\titlerule[4pt]\vspace{2pt}\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{\chaptertitlename} \thechapter}
{1pc}
{\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{#1}}
[\normalsize\normalfont\vspace*{2pc}%
\hbox{\large\bfseries\contentsname}\vspace{6pt}\titlerule\vspace{3pt}
\startcontents
\printcontents{l}{1}{\setcounter{tocdepth}{2}}\titlerule]
\titleformat{name=\chapter,numberless}[display]
{\normalfont\Large\filcenter\bfseries}
{}
{1pc}
{\titlerule[2pt]\vspace{1pc}\LARGE\MakeUppercase{#1}}
\begin{document}
\tableofcontents
\blinddocument % drop in actual document
\blinddocument % drop in actual document
\end{document}
I've tried to mimic the format of the partial ToC as
minitoc would do it. regarding the indentation on both sides I was not successful because I couldn't find the corresponding options. Perhaps this could be an interesting feature suggestion for
titletoc.
Remarks:
- In case that a fancy page style (header and footer) is desired, this can (and in this case should) also be done with titlesec.