Text Formattingfigure number length in table of figure

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
gwada74
Posts: 42
Joined: Fri Nov 26, 2010 5:28 pm

figure number length in table of figure

Post by gwada74 »

Hi,

my table of figure shows number in Roman. Unfortunately, the number of figure is around 30 and some figure number are too wilde and touch the title in the tof.

How can I do

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

figure number length in table of figure

Post by frabjous »

Provide a minimal working example please. This cannot be answered without knowing what document class, packages, etc., you're using.
gwada74
Posts: 42
Joined: Fri Nov 26, 2010 5:28 pm

figure number length in table of figure

Post by gwada74 »

in fact, I used float to define a new environment called "Image".
I would like to be able to use :

Code: Select all

\renewcommand\l@Image {\@dottedtocline{1}{0.5em}{3em}}
\l@Image is not known. I don't no how works float package when it defines a new float.

Should I try

Code: Select all

\newcommand\l@Image {\@dottedtocline{1}{0.5em}{3em}}
I am a bit lost
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: figure number length in table of figure

Post by frabjous »

You could start by not ignoring my earlier request.

But I really don't understand what your two posts have to do with each other.
gwada74
Posts: 42
Joined: Fri Nov 26, 2010 5:28 pm

figure number length in table of figure

Post by gwada74 »

sorry,

my main program is :

Code: Select all

% ----------------------------------------------------------------
% Book Class (This is a LaTeX2e document)  ***********************
% ----------------------------------------------------------------
\documentclass[a4paper,12pt]{book_cam}
\usepackage{bibtopic}
\usepackage{multicol}
\usepackage{float}
\usepackage{chngcntr}
\usepackage{everysel}
\usepackage{Ragged2e}
\usepackage{ifthen}
\usepackage[innercaption]{sidecap}
\usepackage{wrapfig}


%definition des figures du cahier central
\newfloat{Image}{htpb}{lofM}
\floatname{Image}{Ill.}
\newsubfloat[position=bottom,listofformat=subsimple]{Image}


\renewcommand{\theImage}{\Roman{Image}}

%\makeatletter
%\newcommand\l@Image{\@dottedtocline{1}{0.}{4em}}
%\makeatother

%\setcounter{page}{7}
\defaultfontfeatures{Ligatures=TeX}

\setmainfont{Adobe Garamond Pro}

%\newcommand\nos{$\textrm{n}^{\textrm{\tiny{os}}}$\,}
%utilisation de la nouvelle police

%\setmainfont[%
%UprightFont = *-Regular,
%BoldFont = *-Bold,
%ItalicFont = *-Italic,
%]{AGaramondPro}


\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}

\fancyfoot[C]{\thepage}
\renewcommand\headrulewidth{0pt}
\renewcommand\footrulewidth{0pt}
\fancyhead{}
\fancyhead[LE]{\raggedright\itshape\nouppercase{Emaux de Limoges au temps des guerres de Religion}}
\fancyhead[RO]{\raggedleft\itshape\nouppercase{\leftmark}}



%Environnement quote


\makeatletter
\renewcommand\@biblabel[1]{}
\makeatother



%Table des matieres
\setcounter{secnumdepth}{0}

\hyphenpenalty=100000
%\widowpenalty=10000
%\clubpenalty=10000
%\setlength{\parskip}{1ex plus 0ex minus 0ex}
\widowpenalty=5000
\clubpenalty=5000
%\raggedbottom


\setlength{\columnsep}{15pt}

\makeindex

\begin{document}

\mainmatter
\begin{sloppypar}


\include{remerciements_publi}

%
\include{Preface}

\include{intro_publi}


\include{violence_publi}

\include{Harmonie_publi}

\include{Guises_publi}

%\include{Alliance_publi}

%\include{Frises_Publi}

%\include{Emaillerie_reformee_publi}

%\include{concl_publi1}
\newpage
\end{sloppypar}
\begin{btSect}[stylecamille3]{biblio_camille}
\section*{Sources Ecrites}
\begin{multicols}{2}
\begin{FlushLeft}
\begin{sloppypar}
\btPrintAll
\end{sloppypar}
\end{FlushLeft}
\end{multicols}
\end{btSect}

\begin{btSect}[stylecamille3]{biblio_catalogue}
\section*{Catalogues de ventes et de collections - \dixneuf si\`ecle}
\begin{multicols}{2}
\begin{FlushLeft}
\begin{sloppypar}
\btPrintAll
\end{sloppypar}
\end{FlushLeft}
\end{multicols}
\end{btSect}
\newpage

\begin{btSect}[stylecamille3]{biblio_catalogue_expo}
\section*{Catalogues d'expositions}
\begin{multicols}{2}
\begin{FlushLeft}
\begin{sloppypar}
\btPrintAll
\end{sloppypar}
\end{FlushLeft}
\end{multicols}
\end{btSect}

\begin{btSect}[stylecamille3]{biblio_autres}
\section*{Autres}
\begin{multicols}{2}
\begin{FlushLeft}
\begin{sloppypar}
\btPrintAll
\end{sloppypar}
\end{FlushLeft}
\end{multicols}
\end{btSect}

\begin{sloppypar}
\printindex
\end{sloppypar}





\listoffigures
\listof{Image}{Illustrations du cahier central}
\tableofcontents

\backmatter
\pagestyle{empty}
\include{Cahier_central}
\include{Cahier_central2}
\include{Cahier_central3}
\end{document}
% ----------------------------------------------------------------
and the class Book_cam is :

Code: Select all

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{book_cam}[2010/12/25]

%\DeclareOption*{\PassOptionsToCLass{\CurrentOption}{Book}}
%\ProcessOptions\relax

\LoadClass[12pt, a4paper,twoside]{book_principal}


\RequirePackage[T1]{fontenc}
\RequirePackage{graphicx}
\RequirePackage[frenchb]{babel}
%\RequirePackage{french}
\RequirePackage{fancyhdr}
\RequirePackage[french]{minitoc}
\RequirePackage{fontspec}
\RequirePackage{fontspec-patches}
\RequirePackage{makeidx}
\RequirePackage{subfig}
\RequirePackage{url}
\RequirePackage{titlesec}
\RequirePackage[bottom,flushmargin,hang,multiple]{footmisc}
\RequirePackage{lmodern}
\RequirePackage[latin1]{inputenc}
\RequirePackage{titletoc}
\RequirePackage{xspace}
%D\'efiniton des captions
\addto\captionsfrench{\def\figurename{{\footnotesize{\scshape Fig.}}}}

%D\'efintion espace apr\`es guillemets

\renewcommand\fg{\fg \xspace}


%Definition de la taille du texte
\setlength\oddsidemargin{25mm}
\setlength\topmargin{10mm}
\setlength\headheight{15mm}
\setlength\headsep{6mm}
\setlength\textwidth{120mm}
\setlength\footskip{10mm}
\setlength\textheight{180mm}
\setlength\footskip{10mm}

% Formatage des sections, chapitre etc...

\titleformat{\chapter}[display]%
{\filcenter\Large\bfseries\addtolength{\titlewidth}{5pc}\vspace*{10mm}}%
{\vspace*{12mm}\normalfont\itshape\chaptertitlename\hspace{6pt}\normal \thechapter}%
{}%
{}


\titleformat{\section}[display]%
{\large\selectfont\bfseries}%
{\thesection}%
{}%
{}

\titleformat{\subsection}[display]%
{\normalsize\selectfont\bfseries\itshape}%
{\thesubsection}%
{}%
{}

\titleformat{\subsubsection}[display]%
{\normalsize\selectfont\itshape}%
{\thesubsubsection}%
{}%
{}




\newcommand\seize{{\footnotesize XVI}\textsuperscript{\tiny e}\xspace}
\newcommand\quatorze{{\footnotesize XIV}\textsuperscript{\tiny e}\xspace}
\newcommand\quinze{{\footnotesize XV}\textsuperscript{\tiny e}\xspace}
\newcommand\treize{{\footnotesize XIII}\textsuperscript{\tiny e}\xspace}
\newcommand\douze{{\footnotesize XII}\textsuperscript{\tiny e}\xspace}
\newcommand\dix{{\footnotesize X}\textsuperscript{\tiny e}\xspace}
\newcommand\onze{{\footnotesize XI}\textsuperscript{\tiny e}\xspace}
\newcommand\cinq{{\footnotesize V}\textsuperscript{\tiny e}\xspace}
\newcommand\quatre{{\footnotesize IV}\textsuperscript{\tiny e}\xspace}
\newcommand\trois{{\footnotesize III}\textsuperscript{\tiny e}\xspace}
\newcommand\deux{{\footnotesize II}\textsuperscript{\tiny e}\xspace}
\newcommand\neuf{{\footnotesize IX}\textsuperscript{\tiny e}\xspace}
\newcommand\dixneuf{{\footnotesize XIX}\textsuperscript{\tiny e}\xspace}
\newcommand\vingt{{\footnotesize XX}\textsuperscript{\tiny e}\xspace}
\newcommand\dixsept{{\footnotesize XVII}\textsuperscript{\tiny e}\xspace}
\newcommand\dixhuit{{\footnotesize XVIII}\textsuperscript{\tiny e}\xspace}
\newcommand\prem[1]{$\textrm{#1}^{\textrm{\tiny{er}}}$\,}
\newcommand\preme[1]{$\textrm{#1}^{\textrm{\tiny{ere}}}$\,}
\newcommand\yem[1]{$\textrm{#1}^{\textrm{\tiny{e}}}$\,}
\newcommand\yeme[1]{$\textrm{#1}^{\textrm{\tiny{\`eme}}}$\,}


%defintion des footnotes
\frenchbsetup{FrenchFootnotes=false}
\renewcommand*\hangfootparskip{0\baselineskip}% vertical space between paragraphs in a footnote
\renewcommand*\hangfootparindent{1em}% indentation of paragraphs after the first one in a footnote
\makeatletter

% the original code from footmisc.sty (except for the two lines marked as == added ==)
\long\def\@makefntext#1{%
   \renewcommand{\@makefnmark}{\mbox{% == added ==
   \normalfont\@thefnmark.~}}% == added ==
    \ifFN@hangfoot
      \bgroup
      \setbox\@tempboxa\hbox{%
        \ifdim\footnotemargin>0pt
          \hb@xt@\footnotemargin{\@makefnmark\hss}%
        \else
          \@makefnmark
        \fi
      }%
      \leftmargin\wd\@tempboxa
      \rightmargin\z@
      \linewidth \columnwidth
      \advance \linewidth -\leftmargin
      \parshape \@ne \leftmargin \linewidth
      \footnotesize
      \@setpar{{\@@par}}%
      \leavevmode
      \llap{\box\@tempboxa}%
      \parskip\hangfootparskip\relax
      \parindent\hangfootparindent\relax
    \else
      \parindent1em
      \noindent
      \ifdim\footnotemargin>\z@
        \hb@xt@ \footnotemargin{\hss\@makefnmark}%
      \else
        \ifdim\footnotemargin=\z@
          \llap{\@makefnmark}%
        \else
          \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}%
        \fi
      \fi
    \fi
    \footnotelayout#1%
    \ifFN@hangfoot
      \par\egroup
    \fi
}
\makeatother 
the files included are really simple with text and figures only.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

figure number length in table of figure

Post by frabjous »

It seems to me that you are going out of your way not to get help. I provided a link to what a minimal working example should look like, and what you provided is certainly not it. See the Post on Avoidable Mistakes.
Post Reply