1

Following layout problems with my document coming from a Tufte-book documentclass, I took into account the new code presented in the following link, which presents the old and the new code: layout problem with \full{\printindex} in Tufte documentclass

I still have two issues that I can't seem to resolve, one of which concerns the layout of the intro pages for the Parts (the other is the subject of a separate question). I would like to have the following format: Good result of Presentation of Part

Unfortunately, the code relative (see below) to the Part title page formatting in the preamble does not give the same result after using the new code, since the title format is changed, and the text moves on the next page (from page 11 to page 12), from front to back. I get the following result and does not match the desired rendering: Fix presentation

Here is the code which correspond in the preambule to the Part title layout:

% Début Module pour insérer les ornements des parties
\makeatletter
\def\H@old@part[#1]#2{%
    \ifnum \c@secnumdepth >-2\relax
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    \markboth{}{}%
    {%
     \thispagestyle{empty}
     \begin{fullwidth}%
     \centering
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >-2\relax
       \huge\bfseries \partname\nobreakspace\thepart
       \par
       \vskip 10\p@
       \psvectorian[height=0.2cm]{88}\par
       \vskip 10\p@
     \fi
     \Huge \bfseries #2\par
     \end{fullwidth}%
    }%
    \@endpart}

\makeatother % Fin Module pour insérer les ornements des parties

How to correct the problem?

Phil8544
  • 407

1 Answers1

2

UPDATE (removing extra blank pages)

Replace your code by this one

% Début Module pour insérer les ornements des parties
\usepackage{psvectorian}    
\titleclass{\part}{straight}    
\titleformat{\part}%
[display]% shape
{\relax\begin{fullwidth}\fancyhf{}\vspace*{11.5pc}}% format applied to label+text
    {\centering\huge\bfseries \partname}% label
    {10pt}% horizontal separation between label and title body
    {\centering\psvectorian[height=0.2cm]{88}\vspace*{10pt}\\ \huge\bfseries}% before the title body
    [\end{fullwidth}]% after the title body
% Fin Module pour insérer les ornements des parties

a

Simon Dispa
  • 39,141
  • @Phil8544 You are right. I will look the issue. – Simon Dispa Dec 13 '21 at 21:25
  • @Phil8544 The updated code will remove the extra blank page(s) produced by \part. If you want a blank page before or after the part page use \cleardoublepage before or after. – Simon Dispa Dec 14 '21 at 17:33
  • The code works well but I have two error messages : "unexpected close group after \begin{fullwidth}" and "unexpected \end{fullwidth}"... – Phil8544 Dec 16 '21 at 19:55
  • @Phil8544 When using your code? Please add a code example producing the errors. – Simon Dispa Dec 16 '21 at 19:59
  • These messages are displayed on lines 5 and 9 of the code proposed in your response. But the desired result works. Suddenly, the compiler selects all the code of the preamble upstream of the added part. – Phil8544 Dec 17 '21 at 12:26
  • @Phil8544 To understand the issue I will need a compilable code from \documentclass to \end{document} . Just in case: delete all the files generated by the compilation, keeping only the .tex and try again. For example, if present, the .aux file from a former compilation is used. – Simon Dispa Dec 17 '21 at 12:49
  • I am using overleaf: I do not have access to the .aux compilation files, unless I am mistaken? By the way, I just asked the question related to the second issue I encountered with the code you developed in a new question, which you can find here: https://tex.stackexchange.com/questions/627378/fullwidth-figure-and-table-layout-on-even-page-in-tufte-book-documentclass – Phil8544 Dec 17 '21 at 13:49
  • @Phil8544 Try changing the name of your main.tex. (copy and paste with a new name) – Simon Dispa Dec 17 '21 at 13:51