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

There were two remaining issues one of which is resolved (see: Part title page layout in a tufte document class). The problem concerns the positioning of tables and figures in "full width" mode on even pages, even if I use the specific environment {table *} or {figure *} of the Tufte-book documentclass. They are positioned relative to the left margin of the main text, as follow:

Initial problem

To correct the problem I am using the largetable environment as presented in the following MWE (by inserting the new code in the preamble as described in the first answer below):

\begin{largetable}
  \selectlanguage{french}
  \footnotesize%
  \begin{center}
    \begin{tabular}{llll}
      \toprule
      \ Fugue BWV 532a & & Fugue BWV 532 & \\
  \midrule
  mes. 1-27  & A  & mes. 1-27 & Identiques  \\
  mes. 28-29 &    & mes. 28-29 & Contenus différents\\
  mes. 30-52 &    & mes. 30-52 & Identiques  \\
  mes. 52-58 & B  & mes. 52-58 & Entrée de pédale répartie entre les pieds et les mains\\
   & & & dans la version BWV 532a \\
  mes. 59-61 &    & mes. 59-64 & \'{E}pisode différent\\
  mes. 62-71 &    & mes. 65-76 & Identiques, mais entrée plus courte dans la version BWV 532a\\
  mes. 71-73 &    & - & \'{E}pisode dans la version BWV 532a\\
  - &  & mes. 76-96 & Dans la version BWV 532, plusieurs épisodes et (courtes) entrées\\
   & & & en \textit{do} $\sharp$ mineur/\textit{mi} majeur\\
   mes. 74-98 & C & mes. 96-137 & Mêmes entrées mais épisodes plus longs dans la version BWV 532\\
  \bottomrule
\end{tabular}

\end{center} \caption{Différences entre les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980)\index{Williams, Peter}.} \label{tab:fugue532a} % \forceversofloat% forces caption to be set to the left of the float \end{largetable}

For this table, I obtain the following result. This is almost the expected result, as I want to keep the caption in the outer margin:

Table_2_error

But if I apply the same largetable environment to an another table as follow, I get a completely different result since the table shifts to the next even page and is completely shifted in the outer margin (see the picture of the result below). Where is the error?

\begin{largetable}
  \selectlanguage{french}
  \footnotesize%
  \begin{center}
\begin{tabular}{llll}
  \toprule
  \ & Manuels & Pédale & Compatibilité avec \\ & & & l'\oe uvre BWV 532\\

\midrule Arnstadt & & \ \quad Neue Kirche & CD-c$^3$ & CD-c$^1$d$^1$ & Non\ Mühlausen & & \ \quad Marienkirche & CD-c$^3$ & CD-d$^1$ & Oui \ \quad Kirche Davi Blasii & CD-d$^3$ & CD-d$^1$ & Oui \ \quad Brückenhofkirche & CD-c$^3$ & CD-c$^1$ & Non \ & & \ Weimar & & & \ \quad Schlosskirche & CD-c$^3$ & CD-e$^1$ & Oui \ \quad Jacobskirche & ? & ? & ? \ \quad Stadtkirche & ? & ? & ? \ & & \ Halle & & & \ \quad Marktkirche & CD-c$^3$ & CD-c$^1$ & Non \ & & \ C\oe then & & & \ \quad Jacobskirche & CD-c$^3$ & CD-c$^1$ ou CD-d$^1$ & ? \ \quad Agnuskirche & C-? & C-d$^1$e$^1$f$^1$ & ? \ \quad Schlosskapelle & C-e$^3$ & C-e$^1$ & Oui \ & & \ Hambourg & & & \ \quad Hauptkirche St Katharinen & CDEFGA-c$^3$ & CDE-d$^1$ & Oui \ \quad Hauptkirche St Jacobi & CDE-C$^3$ (Rückpositif) & C-d$^1$e$^1$f$^1$ & Oui \ & CDEFGA-c$^3$ (Werk) & & \ & CDEFGA-c$^3$ (Oberpositiv) & & \ & CDEFGA-c$^3$ (Brustpositiv) & & \ \bottomrule \end{tabular} \end{center} \caption{Tessiture des Manuels et Pédale des orgues joués par J.S. Bach entre 1703 et 1723, comparés à l'ambitus de l'\oe uvre (Manuels : D-b$^2$ ; Pédale : D-d$^1$).} \label{tab:orgues} \forceversofloat% forces caption to be set to the left of the float \end{largetable}

Table_layout_problem

Thank you for your suggestions to solve the problem.

Phil8544
  • 407
  • Please provide a MWE (minimal working example) following the demands you find here: https://tex.meta.stackexchange.com/q/228/231952. – Ivan Dec 18 '21 at 13:52
  • The linked approach uses \newgeometry (which forces a \newpage) and sets \marginparwidth to 0pt, making it totally incompatible with almost all the tufte features. AVOID! – John Kormylo Dec 18 '21 at 15:44

1 Answers1

1
  1. The fullwidth environment starts a new page. It's fine for parts or chapters, but not for a short table.

  2. tufte-book puts the captions on the outer margin.

Here are two additions to your code: a new largetable environment for tables larger than the width of the text, and a new command \captionatbottom to work with largetable for the typesetting of the caption below the table.

It was tested on odd and even pages.

UPDATE (long captions)

Using largetable with normal width.

b

% !TeX TS-program = xelatex

\documentclass[a4paper,nobib,twoside,symmetric,justified,marginals=raggedouter, notoc]{tufte-book}

\makeatletter \newlength{\oddshift} \newcommand{\captionatbottom}{% from https://tex.stackexchange.com/a/229419/161015 \long\def@caption##1[##2]##3{% \par \addcontentsline{\csname ext@##1\endcsname}{##1}% {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}% \begingroup @parboxrestore% \if@minipage@setminipage\fi% \normalsize @makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par \endgroup} \long\def@makecaption##1##2{% \vskip\abovecaptionskip% @tufte@checkoddpage% \ifthenelse{\boolean{@tufte@odd@page}}% {\rlap{\parbox{\textwidth+\marginparwidth+\marginparsep}{\hskip0pt@tufte@caption@font##1: ##2}}}% {\setlength{\oddshift}{-\marginparwidth-\marginparsep}\rlap{\hskip\oddshift\parbox{\textwidth+\marginparwidth+\marginparsep}{@tufte@caption@font##1: ##2}}}% \vskip\belowcaptionskip% }
\let\caption@tufte@orig@caption% \let\label@tufte@orig@label}

\newenvironment{largetable}{%
    \@tufte@checkoddpage%
    \ifthenelse{\boolean{@tufte@odd@page}}%
    {\begin{table}[!htbp]\begin{adjustwidth}{}{}\captionatbottom}%
    {\begin{table}[!htbp]\begin{adjustwidth}{-\marginparwidth-\marginparsep}{}\captionatbottom}}        
    {\end{adjustwidth}\end{table}}          

\makeatother

\usepackage{booktabs}

\geometry{% normal pages paperheight =297mm, paperwidth = 210mm, %layout=a4paper layoutheight =240mm,layoutwidth =170mm, textheight=38\baselineskip, headheight=\baselineskip, left=15mm, % right will be the same because of symmetric bindingoffset= 5mm, % add space for binding textwidth=90mm, top=14mm, marginparsep=6mm, marginparwidth=40mm, includehead, layoutvoffset= 28.5mm,layouthoffset= 20mm, % 297-240 = 57mm 210-170 = 40mm ->> to center smaller layout in a4 showframe=true, showcrop=true }

\renewenvironment{fullwidth} {\newgeometry{% full width pages layoutheight =240mm,layoutwidth =170mm, textheight=38\baselineskip, headheight=\baselineskip, left=15mm, % right will be the same because of symmetric bindingoffset= 5mm, % add space for binding textwidth=136mm, % 90+ 6+ 40 top=14mm, marginparsep=0mm, marginparwidth=0mm, %changed to full width <<<<<<<<<< includehead, layoutvoffset= 28.5mm,layouthoffset= 20mm, % 297-240 = 57mm 210-170 = 40mm ->> to center smaller layout in a4 showframe=true, showcrop=true } \fancyhfoffset[LE]{0pt} \fancyhfoffset[RO]{0pt} }
{\restoregeometry}%

\usepackage{kantlipsum} % dummy text added \RequirePackage{showframe} % margin lines <<<<<<<<<<<<<<<<<<<<<<<<< \renewcommand\ShowFrameLinethickness{0.1pt} \renewcommand\ShowFrameColor{\color{red}}

\newcommand{\textls}[2][5]{% \begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup }

\renewcommand{\allcapsspacing}[1]{\textls[15]{#1}} \renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}} \renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}} \renewcommand{\smallcaps}[1] {\smallcapsspacing{\scshape\MakeTextLowercase{#1}}} \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}

\usepackage{fontspec} \usepackage{libertine} %<<<<<<<<<<<<<<<< \setsansfont{TeX Gyre Heros}[Scale=MatchUppercase]

\usepackage{xspace} \newcommand{\monthyear}{% \ifcase\month\or janvier\or f'{e}vrier\or mars\or avril\or mai\or juin\or juillet\or ao^{u}t\or septembre\or octobre\or novembre\or d'{e}cembre\fi\space\number\year }

\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}

\usepackage[english,french]{babel} \frenchbsetup{StandardLayout=true} \addto\captionsfrench{\def\tablename{Tableau}} \addto\captionsfrench{\def\figurename{Figure}}

\frenchbsetup{IndentFirst=false}

\usepackage{csquotes}

\begin{document} \frenchspacing

\mainmatter

\part{First Part of the book}

\chapter{Introduction}  

\begin{largetable}
\centering
\selectlanguage{french}
\footnotesize%  
    \begin{tabular}{llll}
        \toprule
        Fugue BWV 532a &amp; &amp; Fugue BWV 532 &amp; \\           
        \midrule
        mes. 1-27  &amp; A  &amp; mes. 1-27 &amp; Identiques  \\
        mes. 28-29 &amp;    &amp; mes. 28-29 &amp; Contenus différents\\
        mes. 30-52 &amp;    &amp; mes. 30-52 &amp; Identiques  \\
        mes. 52-58 &amp; B  &amp; mes. 52-58 &amp; Entrée de pédale répartie entre les pieds et les mains\\
        &amp; &amp; &amp; dans la version BWV 532a \\
        mes. 59-61 &amp;    &amp; mes. 59-64 &amp; \'{E}pisode différent\\
        mes. 62-71 &amp;    &amp; mes. 65-76 &amp; Identiques, mais entrée plus courte dans la version BWV 532a\\
        mes. 71-73 &amp;    &amp; - &amp; \'{E}pisode dans la version BWV 532a\\
        - &amp;  &amp; mes. 76-96 &amp; Dans la version BWV 532, plusieurs épisodes et (courtes) entrées\\
        &amp; &amp; &amp; en \textit{do} $\sharp$ mineur/\textit{mi} majeur\\
        mes. 74-98 &amp; C &amp; mes. 96-137 &amp; Mêmes entrées mais épisodes plus longs dans la version BWV 532\\
        \bottomrule
    \end{tabular}           
\caption{Différences entre les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980). Différences entre  les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980).}
\label{tab:fugue532am}
\end{largetable}

  1. \kant[11-12]

    \begin{largetable} \centering \selectlanguage{french} \footnotesize%
    \begin{tabular}{llll} \toprule Fugue BWV 532a & & Fugue BWV 532 & \
    \midrule mes. 1-27 & A & mes. 1-27 & Identiques \ mes. 28-29 & & mes. 28-29 & Contenus différents\ mes. 30-52 & & mes. 30-52 & Identiques \ mes. 52-58 & B & mes. 52-58 & Entrée de pédale répartie entre les pieds et les mains\ & & & dans la version BWV 532a \ mes. 59-61 & & mes. 59-64 & '{E}pisode différent\ mes. 62-71 & & mes. 65-76 & Identiques, mais entrée plus courte dans la version BWV 532a\ mes. 71-73 & & - & '{E}pisode dans la version BWV 532a\ - & & mes. 76-96 & Dans la version BWV 532, plusieurs épisodes et (courtes) entrées\ & & & en \textit{do} $\sharp$ mineur/\textit{mi} majeur\ mes. 74-98 & C & mes. 96-137 & Mêmes entrées mais épisodes plus longs dans la version BWV 532\ \bottomrule \end{tabular}
    \caption{Différences entre les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980). Différences entre les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980).} \label{tab:fugue532an} \end{largetable}

\end{document}

Test of largetable inside fullwidth

c

% !TeX TS-program = xelatex

\documentclass[a4paper,nobib,twoside,symmetric,justified,marginals=raggedouter, notoc]{tufte-book}

\makeatletter \newlength{\oddshift} \newcommand{\captionatbottom}{% from https://tex.stackexchange.com/a/229419/161015 \long\def@caption##1[##2]##3{% \par \addcontentsline{\csname ext@##1\endcsname}{##1}% {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}% \begingroup @parboxrestore% \if@minipage@setminipage\fi% \normalsize @makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par \endgroup} \long\def@makecaption##1##2{% \vskip\abovecaptionskip% @tufte@checkoddpage% \ifthenelse{\boolean{@tufte@odd@page}}% {\rlap{\parbox{\textwidth+\marginparwidth+\marginparsep}{\hskip0pt@tufte@caption@font##1: ##2}}}% {\setlength{\oddshift}{-\marginparwidth-\marginparsep}\rlap{\hskip\oddshift\parbox{\textwidth+\marginparwidth+\marginparsep}{@tufte@caption@font##1: ##2}}}% \vskip\belowcaptionskip% }
\let\caption@tufte@orig@caption% \let\label@tufte@orig@label}

\newenvironment{largetable}{%
    \@tufte@checkoddpage%
    \ifthenelse{\boolean{@tufte@odd@page}}%
    {\begin{table}[!htbp]\begin{adjustwidth}{}{}\captionatbottom}%
    {\begin{table}[!htbp]\begin{adjustwidth}{-\marginparwidth-\marginparsep}{}\captionatbottom}}        
    {\end{adjustwidth}\end{table}}          

\makeatother

\usepackage{booktabs}

\geometry{% normal pages paperheight =297mm, paperwidth = 210mm, %layout=a4paper layoutheight =240mm,layoutwidth =170mm, textheight=38\baselineskip, headheight=\baselineskip, left=15mm, % right will be the same because of symmetric bindingoffset= 5mm, % add space for binding textwidth=90mm, top=14mm, marginparsep=6mm, marginparwidth=40mm, includehead, layoutvoffset= 28.5mm,layouthoffset= 20mm, % 297-240 = 57mm 210-170 = 40mm ->> to center smaller layout in a4 showframe=true, showcrop=true }

\renewenvironment{fullwidth} {\newgeometry{% full width pages layoutheight =240mm,layoutwidth =170mm, textheight=38\baselineskip, headheight=\baselineskip, left=15mm, % right will be the same because of symmetric bindingoffset= 5mm, % add space for binding textwidth=136mm, % 90+ 6+ 40 top=14mm, marginparsep=0mm, marginparwidth=0mm, %changed to full width <<<<<<<<<< includehead, layoutvoffset= 28.5mm,layouthoffset= 20mm, % 297-240 = 57mm 210-170 = 40mm ->> to center smaller layout in a4 showframe=true, showcrop=true } \fancyhfoffset[LE]{0pt} \fancyhfoffset[RO]{0pt} }
{\restoregeometry}%

\usepackage{kantlipsum} % dummy text added \RequirePackage{showframe} % margin lines <<<<<<<<<<<<<<<<<<<<<<<<< \renewcommand\ShowFrameLinethickness{0.1pt} \renewcommand\ShowFrameColor{\color{red}}

\newcommand{\textls}[2][5]{% \begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup }

\renewcommand{\allcapsspacing}[1]{\textls[15]{#1}} \renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}} \renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}} \renewcommand{\smallcaps}[1] {\smallcapsspacing{\scshape\MakeTextLowercase{#1}}} \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}

\usepackage{fontspec} \usepackage{libertine} %<<<<<<<<<<<<<<<< \setsansfont{TeX Gyre Heros}[Scale=MatchUppercase]

\usepackage{xspace} \newcommand{\monthyear}{% \ifcase\month\or janvier\or f'{e}vrier\or mars\or avril\or mai\or juin\or juillet\or ao^{u}t\or septembre\or octobre\or novembre\or d'{e}cembre\fi\space\number\year }

\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}

\usepackage[english,french]{babel} \frenchbsetup{StandardLayout=true} \addto\captionsfrench{\def\tablename{Tableau}} \addto\captionsfrench{\def\figurename{Figure}}

\frenchbsetup{IndentFirst=false}

\usepackage{csquotes}

\begin{document} \frenchspacing

\mainmatter

\part{First Part of the book}

\begin{fullwidth}

\chapter{Introduction}  

  1. \kant[1]

    \begin{largetable} \centering \selectlanguage{french} \footnotesize%
    \begin{tabular}{llll} \toprule Fugue BWV 532a & & Fugue BWV 532 & \
    \midrule mes. 1-27 & A & mes. 1-27 & Identiques \ mes. 28-29 & & mes. 28-29 & Contenus différents\ mes. 30-52 & & mes. 30-52 & Identiques \ mes. 52-58 & B & mes. 52-58 & Entrée de pédale répartie entre les pieds et les mains\ & & & dans la version BWV 532a \ mes. 59-61 & & mes. 59-64 & '{E}pisode différent\ mes. 62-71 & & mes. 65-76 & Identiques, mais entrée plus courte dans la version BWV 532a\ mes. 71-73 & & - & '{E}pisode dans la version BWV 532a\ - & & mes. 76-96 & Dans la version BWV 532, plusieurs épisodes et (courtes) entrées\ & & & en \textit{do} $\sharp$ mineur/\textit{mi} majeur\ mes. 74-98 & C & mes. 96-137 & Mêmes entrées mais épisodes plus longs dans la version BWV 532\ \bottomrule \end{tabular}
    \caption{Différences entre les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980). Différences entre les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980).} \label{tab:fugue532am} \end{largetable}

  2. \kant[11-12]

    \begin{largetable} \centering \selectlanguage{french} \footnotesize%
    \begin{tabular}{llll} \toprule Fugue BWV 532a & & Fugue BWV 532 & \
    \midrule mes. 1-27 & A & mes. 1-27 & Identiques \ mes. 28-29 & & mes. 28-29 & Contenus différents\ mes. 30-52 & & mes. 30-52 & Identiques \ mes. 52-58 & B & mes. 52-58 & Entrée de pédale répartie entre les pieds et les mains\ & & & dans la version BWV 532a \ mes. 59-61 & & mes. 59-64 & '{E}pisode différent\ mes. 62-71 & & mes. 65-76 & Identiques, mais entrée plus courte dans la version BWV 532a\ mes. 71-73 & & - & '{E}pisode dans la version BWV 532a\ - & & mes. 76-96 & Dans la version BWV 532, plusieurs épisodes et (courtes) entrées\ & & & en \textit{do} $\sharp$ mineur/\textit{mi} majeur\ mes. 74-98 & C & mes. 96-137 & Mêmes entrées mais épisodes plus longs dans la version BWV 532\ \bottomrule \end{tabular}
    \caption{Différences entre les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980). Différences entre les fugues BWV 532 et BWV 532a relevées par Peter Williams (1980).} \label{tab:fugue532an} \end{largetable}

\end{fullwidth}

\end{document}

UPDATE II (long captions)

Using largetable with normal width and the new posted table

ag2

% !TeX TS-program = xelatex

\documentclass[a4paper,nobib,twoside,symmetric,justified,marginals=raggedouter, notoc]{tufte-book}

\makeatletter \newlength{\oddshift} \newcommand{\captionatbottom}{% from https://tex.stackexchange.com/a/229419/161015 \long\def@caption##1[##2]##3{% \par \addcontentsline{\csname ext@##1\endcsname}{##1}% {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}% \begingroup @parboxrestore% \if@minipage@setminipage\fi% \normalsize @makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par \endgroup} \long\def@makecaption##1##2{% \vskip\abovecaptionskip% @tufte@checkoddpage% \ifthenelse{\boolean{@tufte@odd@page}}% {\rlap{\parbox{\textwidth+\marginparwidth+\marginparsep}{\hskip0pt@tufte@caption@font##1: ##2}}}% {\setlength{\oddshift}{-\marginparwidth-\marginparsep}\rlap{\hskip\oddshift\parbox{\textwidth+\marginparwidth+\marginparsep}{@tufte@caption@font##1: ##2}}}% \vskip\belowcaptionskip% }% \let\caption@tufte@orig@caption% \let\label@tufte@orig@label}

\newenvironment{largetable}{%
    \@tufte@checkoddpage%
    \ifthenelse{\boolean{@tufte@odd@page}}%
    {\begin{table}[!htbp]\begin{adjustwidth}{}{}\captionatbottom}%
    {\begin{table}[!htbp]\begin{adjustwidth}{-\marginparwidth-\marginparsep}{}\captionatbottom}}        
    {\end{adjustwidth}\end{table}}          

\makeatother

\usepackage{booktabs}

\geometry{% normal pages paperheight =297mm, paperwidth = 210mm, %layout=a4paper layoutheight =240mm,layoutwidth =170mm, textheight=38\baselineskip, headheight=\baselineskip, left=15mm, % right will be the same because of symmetric bindingoffset= 5mm, % add space for binding textwidth=90mm, top=14mm, marginparsep=6mm, marginparwidth=40mm, includehead, layoutvoffset= 28.5mm,layouthoffset= 20mm, % 297-240 = 57mm 210-170 = 40mm ->> to center smaller layout in a4 showframe=true, showcrop=true }

\renewenvironment{fullwidth} {\newgeometry{% full width pages layoutheight =240mm,layoutwidth =170mm, textheight=38\baselineskip, headheight=\baselineskip, left=15mm, % right will be the same because of symmetric bindingoffset= 5mm, % add space for binding textwidth=136mm, % 90+ 6+ 40 top=14mm, marginparsep=0mm, marginparwidth=0mm, %changed to full width <<<<<<<<<< includehead, layoutvoffset= 28.5mm,layouthoffset= 20mm, % 297-240 = 57mm 210-170 = 40mm ->> to center smaller layout in a4 showframe=true, showcrop=true } \fancyhfoffset[LE]{0pt} \fancyhfoffset[RO]{0pt} }
{\restoregeometry}%

\usepackage{kantlipsum} % dummy text added \RequirePackage{showframe} % margin lines <<<<<<<<<<<<<<<<<<<<<<<<< \renewcommand\ShowFrameLinethickness{0.1pt} \renewcommand\ShowFrameColor{\color{red}}

\newcommand{\textls}[2][5]{% \begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup }

\renewcommand{\allcapsspacing}[1]{\textls[15]{#1}} \renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}} \renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}} \renewcommand{\smallcaps}[1] {\smallcapsspacing{\scshape\MakeTextLowercase{#1}}} \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}

\usepackage{fontspec} \usepackage{libertine} %<<<<<<<<<<<<<<<< \setsansfont{TeX Gyre Heros}[Scale=MatchUppercase]

\usepackage{xspace} \newcommand{\monthyear}{% \ifcase\month\or janvier\or f'{e}vrier\or mars\or avril\or mai\or juin\or juillet\or ao^{u}t\or septembre\or octobre\or novembre\or d'{e}cembre\fi\space\number\year }

\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}

\usepackage[english,french]{babel} \frenchbsetup{StandardLayout=true} \addto\captionsfrench{\def\tablename{Tableau}} \addto\captionsfrench{\def\figurename{Figure}}

\frenchbsetup{IndentFirst=false}

\usepackage{csquotes}

\begin{document} \frenchspacing

\mainmatter

\kant[9]

\begin{largetable} \selectlanguage{french} \footnotesize% \begin{center} \begin{tabular}{llll} \toprule \ & Manuels & Pédale & Compatibilité avec \ & & & l'\oe uvre BWV 532\

        \midrule
        Arnstadt  &amp;   &amp;    \\
        \quad Neue Kirche &amp; CD-c$^3$   &amp; CD-c$^1$d$^1$ &amp; Non\\
        Mühlausen &amp;   &amp;   \\
        \quad Marienkirche &amp; CD-c$^3$   &amp; CD-d$^1$ &amp; Oui \\
        \quad Kirche Davi Blasii &amp; CD-d$^3$   &amp; CD-d$^1$ &amp; Oui  \\
        \quad Brückenhofkirche &amp; CD-c$^3$   &amp; CD-c$^1$ &amp; Non \\
        &amp;  &amp;  \\
        Weimar  &amp;  &amp;  &amp;  \\
        \quad Schlosskirche &amp; CD-c$^3$   &amp; CD-e$^1$ &amp; Oui \\
        \quad Jacobskirche &amp; ?   &amp; ? &amp; ? \\
        \quad Stadtkirche &amp; ?   &amp; ? &amp; ? \\
        &amp;  &amp;  \\
        Halle        &amp;  &amp;  &amp;  \\
        \quad Marktkirche &amp; CD-c$^3$   &amp; CD-c$^1$ &amp; Non \\
        &amp;  &amp;  \\
        C\oe then  &amp;  &amp;  &amp;  \\
        \quad Jacobskirche &amp; CD-c$^3$   &amp; CD-c$^1$ ou CD-d$^1$ &amp; ? \\
        \quad Agnuskirche &amp; C-?   &amp; C-d$^1$e$^1$f$^1$ &amp; ? \\
        \quad Schlosskapelle &amp; C-e$^3$   &amp; C-e$^1$ &amp; Oui \\
        &amp;  &amp;  \\
        Hambourg &amp;  &amp;  &amp;  \\
        \quad Hauptkirche St Katharinen &amp; CDEFGA-c$^3$   &amp; CDE-d$^1$ &amp; Oui \\
        \quad Hauptkirche St Jacobi &amp; CDE-C$^3$ (Rückpositif)   &amp; C-d$^1$e$^1$f$^1$ &amp; Oui \\
        &amp; CDEFGA-c$^3$ (Werk)   &amp;  &amp;  \\
        &amp; CDEFGA-c$^3$ (Oberpositiv) &amp;  &amp;  \\
        &amp; CDEFGA-c$^3$ (Brustpositiv) &amp;  &amp;  \\
        \bottomrule
    \end{tabular}
\end{center}
\caption{Tessiture des Manuels et Pédale des orgues joués par J.S. Bach entre 1703 et 1723, comparés à l'ambitus de l'\oe uvre (Manuels : D-b$^2$ ; Pédale : D-d$^1$).}
\label{tab:orgues}

%% \forceversofloat% forces caption to be set to the left of the float \end{largetable}

  1. \kant[11]

    \begin{largetable} \selectlanguage{french} \footnotesize% \begin{center} \begin{tabular}{llll} \toprule \ & Manuels & Pédale & Compatibilité avec \ & & & l'\oe uvre BWV 532\

            \midrule
            Arnstadt  &amp;   &amp;    \\
            \quad Neue Kirche &amp; CD-c$^3$   &amp; CD-c$^1$d$^1$ &amp; Non\\
            Mühlausen &amp;   &amp;   \\
            \quad Marienkirche &amp; CD-c$^3$   &amp; CD-d$^1$ &amp; Oui \\
            \quad Kirche Davi Blasii &amp; CD-d$^3$   &amp; CD-d$^1$ &amp; Oui  \\
            \quad Brückenhofkirche &amp; CD-c$^3$   &amp; CD-c$^1$ &amp; Non \\
            &amp;  &amp;  \\
            Weimar  &amp;  &amp;  &amp;  \\
            \quad Schlosskirche &amp; CD-c$^3$   &amp; CD-e$^1$ &amp; Oui \\
            \quad Jacobskirche &amp; ?   &amp; ? &amp; ? \\
            \quad Stadtkirche &amp; ?   &amp; ? &amp; ? \\
            &amp;  &amp;  \\
            Halle        &amp;  &amp;  &amp;  \\
            \quad Marktkirche &amp; CD-c$^3$   &amp; CD-c$^1$ &amp; Non \\
            &amp;  &amp;  \\
            C\oe then  &amp;  &amp;  &amp;  \\
            \quad Jacobskirche &amp; CD-c$^3$   &amp; CD-c$^1$ ou CD-d$^1$ &amp; ? \\
            \quad Agnuskirche &amp; C-?   &amp; C-d$^1$e$^1$f$^1$ &amp; ? \\
            \quad Schlosskapelle &amp; C-e$^3$   &amp; C-e$^1$ &amp; Oui \\
            &amp;  &amp;  \\
            Hambourg &amp;  &amp;  &amp;  \\
            \quad Hauptkirche St Katharinen &amp; CDEFGA-c$^3$   &amp; CDE-d$^1$ &amp; Oui \\
            \quad Hauptkirche St Jacobi &amp; CDE-C$^3$ (Rückpositif)   &amp; C-d$^1$e$^1$f$^1$ &amp; Oui \\
            &amp; CDEFGA-c$^3$ (Werk)   &amp;  &amp;  \\
            &amp; CDEFGA-c$^3$ (Oberpositiv) &amp;  &amp;  \\
            &amp; CDEFGA-c$^3$ (Brustpositiv) &amp;  &amp;  \\
            \bottomrule
        \end{tabular}
    \end{center}
    \caption{Tessiture des Manuels et Pédale des orgues joués par J.S. Bach entre 1703 et 1723, comparés à l'ambitus de l'\oe uvre (Manuels : D-b$^2$ ; Pédale : D-d$^1$).}
    \label{tab:orgues}
    %%  \forceversofloat% forces caption to be set to the left of the float
    

    \end{largetable}

\end{document}

UPDATE III (long captions in the margin)

Using largetable with normal width and the new posted table

Ag3

% !TeX TS-program = xelatex

\documentclass[a4paper,nobib,twoside,symmetric,justified,marginals=raggedouter, notoc]{tufte-book}

\makeatletter \newlength{\oddshift} \newcommand{\captionatbottommargin}{% from https://tex.stackexchange.com/a/229419/161015 \long\def@caption##1[##2]##3{% \par \addcontentsline{\csname ext@##1\endcsname}{##1}% {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}% \begingroup @parboxrestore% \if@minipage@setminipage\fi% \normalsize @makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par \endgroup} \long\def@makecaption##1##2{% \vskip\abovecaptionskip% @tufte@checkoddpage% \ifthenelse{\boolean{@tufte@odd@page}}% {\setlength{\oddshift}{\textwidth}\rlap{\hskip\oddshift\parbox{\marginparwidth+\marginparsep}{\hskip0pt@tufte@caption@font##1: ##2}}}% {\setlength{\oddshift}{-\marginparwidth-\marginparsep}\rlap{\hskip\oddshift\parbox{\marginparwidth+\marginparsep}{@tufte@caption@font##1: ##2}}}% \vskip\belowcaptionskip% }% \let\caption@tufte@orig@caption% \let\label@tufte@orig@label}

\newenvironment{largetable}{%
    \@tufte@checkoddpage%
    \ifthenelse{\boolean{@tufte@odd@page}}%
    {\begin{table}[!htbp]\vspace*{-3ex}\begin{adjustwidth}{}{}\captionatbottommargin}%
    {\begin{table}[!htbp]\vspace*{-3ex}\begin{adjustwidth}{-\marginparwidth-\marginparsep}{\marginparsep}\captionatbottommargin}}       
    {\end{adjustwidth}\end{table}}      

\makeatother

\usepackage{booktabs}

\geometry{% normal pages paperheight =297mm, paperwidth = 210mm, %layout=a4paper layoutheight =240mm,layoutwidth =170mm, textheight=38\baselineskip, headheight=\baselineskip, left=15mm, % right will be the same because of symmetric bindingoffset= 5mm, % add space for binding textwidth=90mm, top=14mm, marginparsep=6mm, marginparwidth=40mm, includehead, layoutvoffset= 28.5mm,layouthoffset= 20mm, % 297-240 = 57mm 210-170 = 40mm ->> to center smaller layout in a4 showframe=true, showcrop=true }

\renewenvironment{fullwidth} {\newgeometry{% full width pages layoutheight =240mm,layoutwidth =170mm, textheight=38\baselineskip, headheight=\baselineskip, left=15mm, % right will be the same because of symmetric bindingoffset= 5mm, % add space for binding textwidth=136mm, % 90+ 6+ 40 top=14mm, marginparsep=0mm, marginparwidth=0mm, %changed to full width <<<<<<<<<< includehead, layoutvoffset= 28.5mm,layouthoffset= 20mm, % 297-240 = 57mm 210-170 = 40mm ->> to center smaller layout in a4 showframe=true, showcrop=true } \fancyhfoffset[LE]{0pt} \fancyhfoffset[RO]{0pt} }
{\restoregeometry}%

\usepackage{kantlipsum} % dummy text added \RequirePackage{showframe} % margin lines <<<<<<<<<<<<<<<<<<<<<<<<< \renewcommand\ShowFrameLinethickness{0.1pt} \renewcommand\ShowFrameColor{\color{red}}

\newcommand{\textls}[2][5]{% \begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup }

\renewcommand{\allcapsspacing}[1]{\textls[15]{#1}} \renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}} \renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}} \renewcommand{\smallcaps}[1] {\smallcapsspacing{\scshape\MakeTextLowercase{#1}}} \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}

\usepackage{fontspec} \usepackage{libertine} %<<<<<<<<<<<<<<<< \setsansfont{TeX Gyre Heros}[Scale=MatchUppercase]

\usepackage{xspace} \newcommand{\monthyear}{% \ifcase\month\or janvier\or f'{e}vrier\or mars\or avril\or mai\or juin\or juillet\or ao^{u}t\or septembre\or octobre\or novembre\or d'{e}cembre\fi\space\number\year }

\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}

\usepackage[english,french]{babel} \frenchbsetup{StandardLayout=true} \addto\captionsfrench{\def\tablename{Tableau}} \addto\captionsfrench{\def\figurename{Figure}}

\frenchbsetup{IndentFirst=false}

\usepackage{csquotes}

\begin{document} \frenchspacing

\mainmatter

9. \kant[9]

\begin{largetable} \selectlanguage{french} \footnotesize% \begin{tabular}{llll} \toprule \ & Manuels & Pédale & Compatibilité avec \ & & & l'\oe uvre BWV 532\

        \midrule
        Arnstadt  &amp;   &amp;    \\
        \quad Neue Kirche &amp; CD-c$^3$   &amp; CD-c$^1$d$^1$ &amp; Non\\
        Mühlausen &amp;   &amp;   \\
        \quad Marienkirche &amp; CD-c$^3$   &amp; CD-d$^1$ &amp; Oui \\
        \quad Kirche Davi Blasii &amp; CD-d$^3$   &amp; CD-d$^1$ &amp; Oui  \\
        \quad Brückenhofkirche &amp; CD-c$^3$   &amp; CD-c$^1$ &amp; Non \\
        &amp;  &amp;  \\
        Weimar  &amp;  &amp;  &amp;  \\
        \quad Schlosskirche &amp; CD-c$^3$   &amp; CD-e$^1$ &amp; Oui \\
        \quad Jacobskirche &amp; ?   &amp; ? &amp; ? \\
        \quad Stadtkirche &amp; ?   &amp; ? &amp; ? \\
        &amp;  &amp;  \\
        Halle        &amp;  &amp;  &amp;  \\
        \quad Marktkirche &amp; CD-c$^3$   &amp; CD-c$^1$ &amp; Non \\
        &amp;  &amp;  \\
        C\oe then  &amp;  &amp;  &amp;  \\
        \quad Jacobskirche &amp; CD-c$^3$   &amp; CD-c$^1$ ou CD-d$^1$ &amp; ? \\
        \quad Agnuskirche &amp; C-?   &amp; C-d$^1$e$^1$f$^1$ &amp; ? \\
        \quad Schlosskapelle &amp; C-e$^3$   &amp; C-e$^1$ &amp; Oui \\
        &amp;  &amp;  \\
        Hambourg &amp;  &amp;  &amp;  \\
        \quad Hauptkirche St Katharinen &amp; CDEFGA-c$^3$   &amp; CDE-d$^1$ &amp; Oui \\
        \quad Hauptkirche St Jacobi &amp; CDE-C$^3$ (Rückpositif)   &amp; C-d$^1$e$^1$f$^1$ &amp; Oui \\
        &amp; CDEFGA-c$^3$ (Werk)   &amp;  &amp;  \\
        &amp; CDEFGA-c$^3$ (Oberpositiv) &amp;  &amp;  \\
        &amp; CDEFGA-c$^3$ (Brustpositiv) &amp;  &amp;  \\
        \bottomrule
    \end{tabular}
\caption{Tessiture des Manuels et Pédale des orgues joués par J.S. Bach entre 1703 et 1723, comparés à l'ambitus de l'\oe uvre (Manuels : D-b$^2$ ; Pédale : D-d$^1$).}
\label{tab:orgues1}

%% \forceversofloat% forces caption to be set to the left of the float \end{largetable}

  1. \kant[11]

    \begin{largetable} \selectlanguage{french} \footnotesize% \begin{tabular}{llll} \toprule \ & Manuels & Pédale & Compatibilité avec \ & & & l'\oe uvre BWV 532\

            \midrule
            Arnstadt  &amp;   &amp;    \\
            \quad Neue Kirche &amp; CD-c$^3$   &amp; CD-c$^1$d$^1$ &amp; Non\\
            Mühlausen &amp;   &amp;   \\
            \quad Marienkirche &amp; CD-c$^3$   &amp; CD-d$^1$ &amp; Oui \\
            \quad Kirche Davi Blasii &amp; CD-d$^3$   &amp; CD-d$^1$ &amp; Oui  \\
            \quad Brückenhofkirche &amp; CD-c$^3$   &amp; CD-c$^1$ &amp; Non \\
            &amp;  &amp;  \\
            Weimar  &amp;  &amp;  &amp;  \\
            \quad Schlosskirche &amp; CD-c$^3$   &amp; CD-e$^1$ &amp; Oui \\
            \quad Jacobskirche &amp; ?   &amp; ? &amp; ? \\
            \quad Stadtkirche &amp; ?   &amp; ? &amp; ? \\
            &amp;  &amp;  \\
            Halle        &amp;  &amp;  &amp;  \\
            \quad Marktkirche &amp; CD-c$^3$   &amp; CD-c$^1$ &amp; Non \\
            &amp;  &amp;  \\
            C\oe then  &amp;  &amp;  &amp;  \\
            \quad Jacobskirche &amp; CD-c$^3$   &amp; CD-c$^1$ ou CD-d$^1$ &amp; ? \\
            \quad Agnuskirche &amp; C-?   &amp; C-d$^1$e$^1$f$^1$ &amp; ? \\
            \quad Schlosskapelle &amp; C-e$^3$   &amp; C-e$^1$ &amp; Oui \\
            &amp;  &amp;  \\
            Hambourg &amp;  &amp;  &amp;  \\
            \quad Hauptkirche St Katharinen &amp; CDEFGA-c$^3$   &amp; CDE-d$^1$ &amp; Oui \\
            \quad Hauptkirche St Jacobi &amp; CDE-C$^3$ (Rückpositif)   &amp; C-d$^1$e$^1$f$^1$ &amp; Oui \\
            &amp; CDEFGA-c$^3$ (Werk)   &amp;  &amp;  \\
            &amp; CDEFGA-c$^3$ (Oberpositiv) &amp;  &amp;  \\
            &amp; CDEFGA-c$^3$ (Brustpositiv) &amp;  &amp;  \\
            \bottomrule
        \end{tabular}
    \caption{Tessiture des Manuels et Pédale des orgues joués par J.S. Bach entre 1703 et 1723, comparés à l'ambitus de l'\oe uvre (Manuels : D-b$^2$ ; Pédale : D-d$^1$).}
    \label{tab:orgues2}
    %%  \forceversofloat% forces caption to be set to the left of the float
    

    \end{largetable}

\end{document}

Simon Dispa
  • 39,141
  • see my answer below. Thanks ! – Phil8544 Dec 26 '21 at 16:13
  • @Phil8544 Please see the updated answer fixing the issue of long captions. Also tested largetable alone and inside fullwidth. – Simon Dispa Dec 26 '21 at 20:52
  • I modified my question taking into account the implementation of your code and trying to be clearer in my request. – Phil8544 Dec 27 '21 at 11:54
  • Do you see my update question to precise your answer? – Phil8544 Jan 05 '22 at 09:41
  • @Phil8544 Try largetable inside the fullwidth enviroment. It will start in a new page. – Simon Dispa Jan 05 '22 at 14:02
  • @Phil8544 Using your new table with normal width also works. See update II. To get the correct margins the environment needs to detect the even/odd page. Is is hard to debug without the real code. As you see I works fine in my simple examples. – Simon Dispa Jan 05 '22 at 14:22
  • I will soon insert all the real code, as I don't have the same results as yours. But you may notice that even in your examples, the caption takes up the full page width, when it should be only in the margin. – Phil8544 Jan 05 '22 at 17:33
  • @Phil8544 Please see Update III. I misunderstood the position of the caption you wanted. Test my code as it is before moving to yours. – Simon Dispa Jan 05 '22 at 18:51
  • The result is OK ! How to do the same for the fullwidth figures? I tried to create a newenvironment {largefigure} by copying the example from newenvironment {largetable} and replacing "table" with "figure", and that was what created the bug ... – Phil8544 Jan 06 '22 at 23:24
  • I added a new question to solve the same problem with figures as solved here for tables in the link https://tex.stackexchange.com/questions/636418/fullwidth-figure-layout-on-even-page-in-tufte-book-documentclass – Phil8544 Mar 08 '22 at 22:37