Índice: Período após Numeral Romano IV - Reduzir Espaçamento

Índice: Período após Numeral Romano IV - Reduzir Espaçamento

Sou muito novo no LaTeX. Estou escrevendo uma dissertação e tentando editar meu índice. Eu uso algarismos romanos para numerar as peças.

Infelizmente, no índice, o espaçamento antes do ponto final após o algarismo romano IV é muito grande (depois de 'IV' e '.' é maior do que depois de 'I' e '.'). Alguém sabe como diminuí-lo sem diminuí-lo antes dos outros algarismos romanos (I, II e III) também?


\documentclass[11pt]{book}

\usepackage[]{titletoc}
\usepackage[newparttoc]{titlesec}

\titleformat{\part}[display]{}{\partname\nobreakspace\thepart}{0mm}{}

\titlecontents{part}
[0cm]
{}
{\hfil\normalfont\large\bfseries 
\thecontentslabel\mdseries .\bfseries ~\hfil
\normalfont\large\bfseries}
{}
{\normalsize\dotfill\scriptsize\bfseries\thecontentspage}
[]

\begin{document}

\tableofcontents

\part{Part}
\part{Part}
\part{Part}
\part{Part}

\end{document}

Responder1

O problema é a mudança de fonte entre \thecontentslabele, .o que significa que nenhum kerning será aplicado.

Você poderia fazer algo em que pudesse medir a largura das caixas que contêm \bfseries\thecontentslabel.e \bfseries\thecontentslabel\kern0pt.usar a diferença de larguras para fazer o kerner manualmente entre o número da peça e o período.

Responder2

Eu encontrei uma solução. Não é bonito, mas funciona.


\documentclass[11pt]{book}

\usepackage[]{titletoc}
\usepackage[newparttoc]{titlesec}

\titleformat{\part}[display]{}{\partname\nobreakspace\thepart}{0mm}{}

\titlecontents{part}
[0cm]
{}
{\hfil\normalfont\large\bfseries 
\thecontentslabel\mdseries .\bfseries ~\hfil
\normalfont\large\bfseries}
{}
{\normalsize\dotfill\scriptsize\bfseries\thecontentspage}
[]

\begin{document}

\tableofcontents

\part{Part}
\part{Part}
\part{Part}

\titlecontents{part}
[0cm]
{}
{\hfil\normalfont\large\bfseries 
\thecontentslabel\mdseries $\!$.\bfseries ~\hfil
\normalfont\large\bfseries}
{}
{\normalsize\dotfill\scriptsize\bfseries\thecontentspage}
[]

\part{Part}
\part{Part}

\titlecontents{part}
[0cm]
{}
{\hfil\normalfont\large\bfseries 
\thecontentslabel\mdseries .\bfseries ~\hfil
\normalfont\large\bfseries}
{}
{\normalsize\dotfill\scriptsize\bfseries\thecontentspage}
[]

\part{Part}

\end{document}

informação relacionada