Text FormattingFigures and Tables Index

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Diogo Remoaldo
Posts: 26
Joined: Mon Apr 06, 2015 8:24 pm

Figures and Tables Index

Post by Diogo Remoaldo »

Hi, in my latex file I have a problem in which the table's name almost catches the number, in the table index, such as it happens in the following examples. Is there a way to properly adjust the spacing between the number and the text?. My code is the following.

Code: Select all

\documentclass[openleft,a4paper,12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[portuguese]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{epstopdf} 
\usepackage{float}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{url}
\usepackage[all]{hypcap}
\usepackage{caption}
\usepackage[paper=a4paper,top=2cm,bottom=2cm,right=2.5cm,left=2.5cm,twoside ,bindingoffset=1cm,marginparwidth=0in,marginparsep=0in]{geometry}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{indentfirst}
\usepackage[export]{adjustbox}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage{multirow}
\captionsetup[table]{position=above}
\usepackage{siunitx}
\newcolumntype{C}{>{\centering\arraybackslash}m}
\sisetup{per-mode=symbol}
\usepackage{hhline}
\captionsetup[table]{position=above}
\setcounter{secnumdepth}{4}
\DeclareSIUnit{\year}{ano}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\usepackage{eurosym}
\usepackage{makeidx}
\usepackage{subcaption}
\usepackage{afterpage}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{placeins}
\usepackage{appendix}

\addto\captionsportuguese{
  \renewcommand\appendixname{Anexo}
  \renewcommand\appendixpagename{Anexos}
}

\setlength{\belowcaptionskip}{-2pt}

\setlist{itemsep=2.0pt}

\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}

\setlength{\floatsep}{5pt plus 1.0pt minus 2.0pt}
\setlength{\intextsep}{5pt plus 1.0pt minus 2.0pt}

\setlength{\parindent}{2.0em}
\setlength{\parskip}{0.5em}
%\renewcommand{\baselinestretch}{2.0}

\usepackage{fancyhdr}
\usepackage{lastpage}

\fancypagestyle{style1}{
\fancyhead{}
\fancyhead[LO,LE]{\nouppercase{\leftmark}}
\renewcommand{\headrulewidth}{0.4pt}
\fancyfoot{}

\fancyfoot[RO,LE]{\thepage}}

\fancypagestyle{plain}{%
  \fancyhf{}%
  \fancyfoot[RO,LE]{\thepage} %of \pageref{LastPage}}%
  \renewcommand{\headrulewidth}{0pt}}% Line at the header invisible
  %\renewcommand{\footrulewidth}{0.4pt}% Line at the footer visible


%\fancypagestyle{style2}{
%\fancyhead{}
%\renewcommand{\headrulewidth}{0pt}
%\fancyfoot{}

%\fancyfoot[RO,LE]{\thepage}}

%\fancypagestyle{style3}{
%\fancyhead{}
%\renewcommand{\headrulewidth}{0pt}
%\fancyfoot{}

%\renewcommand{\footrulewidth}{0pt}}
%\setlength{\parindent}{0em}

\pdfinclusioncopyfonts=1
\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage}
    
   

\newgeometry{top=2cm,bottom=2cm,right=2.5cm,left=2.5cm,bindingoffset=0cm,marginparwidth=0in,marginparsep=0in}
\title{Desenvolvimento de um edifício tipo "PassivHaus" para clima temperado (Português) integrando painéis "sandwich" estruturais e fontes de energia renováveis}
\author{Diogo Filipe Pereira Remoaldo}


\begin{document}

\renewcommand{\thepage}{\roman{page}}
\renewcommand{\contentsname}{Índice}
\tableofcontents
 \cleardoublepage

\newpage

\renewcommand\listfigurename{Índice de Figuras}

\listoffigures
 \cleardoublepage
\newpage

\renewcommand\listtablename{Índice de Tabelas}
\listoftables
 \cleardoublepage
\newpage

\end{document}
Attachments
diogoOverfullB.png
diogoOverfullB.png (18.03 KiB) Viewed 2813 times
diogoOverfullA.png
diogoOverfullA.png (12.86 KiB) Viewed 2813 times

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Figures and Tables Index

Post by Stefan Kottwitz »

Hi Diogo,

the microtype package improves justification, loading it could already help. Add to your preamble:

Code: Select all

\usepackage{microtype}
In your second image, I noticed that you write units in italics, so they look like variables. Common standard is to write units upright. The siunitx package helps in this regard. You are already loading it, so I recommend to use its syntax for units.

Stefan
LaTeX.org admin
Post Reply