0

This is the main code:

\documentclass{report}
\usepackage[spanish]{babel}
\usepackage{minitoc}
\usepackage{tocvsec2}

\begin{document}
\doparttoc

\tableofcontents

\part{MEMORIA}
\parttoc

\chapter{Chapter1}
\section{Section1.1}
\chapter{Chapter2}
\section{Section2.1}

\end{document}

Command \part returns:

  Part I

 MEMORIA

How could be 'Part' supressed, without using titlesec package? I'd like to get:

 I. MEMORIA 

Thanks for help.

1

The command \part calls \@part, which calls \sv@part, which defines the appearance of the title page (among other things).

You can change the relevant code of \sv@part with the xpatch package, using \xpatchcmd{command to modify}{code to replace}{replacement code}{do if success}{do if fail}. Because the command \sv@part contains an @ character you need to put \makeatletter and \makeatother around the patch.

MWE:

\documentclass{report}
\usepackage[spanish]{babel}
\usepackage{minitoc}
\usepackage{tocvsec2}
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\sv@part}{\huge \bfseries \partname \nobreakspace \thepart \par \vskip 20\p@ \fi \Huge \bfseries #2}{\fi \Huge \bfseries \thepart. #2}{}{}
\makeatother

\begin{document}
\doparttoc

\tableofcontents

\part{MEMORIA}
\parttoc

\chapter{Chapter1}
\section{Section1.1}
\chapter{Chapter2}
\section{Section2.1}

\end{document}

Result:

enter image description here

  • Thank you very much! This code helped me a lot. I also was able to change title FontSize modifying it, which i needed it too. – Daniel Jan 26 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.