this seem very basic but i've already tried lots of thing without any success.

This is the tex that i am working on, and im compiling it in LuaTeX:


% Linguagem

%% Table of contents
\setcounter{tocdepth}{2}    % remove subsubsection from toc

% Multicols

% enumitem
\usepackage{enumitem} % modify enumerate index
\setlist[itemize]{left = -9mm}

%% titlesec

% Part customization
    [block]                         % shape
    {\huge\bfseries\color{Emph}}            % format
    {\thepart\hspace{5mm}{$|$}}         % label
    {5mm}                           % sep
    {\huge\bfseries}                    % before-code
\counterwithin*{section}{part} % Reset section on part

% Maths
\usepackage{amsmath, amssymb}
\usepackage{bm} % Boldmath


% Colors

\colorlet{Emph}{ blue!40!white}


% mytitle and myauthor
\newcommand\mytitle{{my title}}
\newcommand\myauthor{{my author}}

% title, author and date

% hyperref
    % Links customization
    % PDF customization
    % fix hyperref links

% subsubsection customization



% Table of Contents

\renewcommand{\contentsname}{} % remove title

\begin{multicols}{2} \tableofcontents \end{multicols}




\part{Topologia Elementar na Reta $\mathbb{R}$}
\label{topologia elementar na reta r}

\section{Vizinhança $V_{\epsilon}$}


% Majorante e Minorante


% Infimo e Supremo

    \section{Infimo Inf}
    \section{Supremo Sup}


% Minimo e Maximo
    \section{Minimo Min}
    \section{Maximo Max}


% Interior e Exterior
    \section{Interior Int}
    \section{Exterior Ext}

\section{Ponto de Acumulação}
\label{ponto de acumulacao}

\section{Fronteira Fr}

\label{conjunto limitado}


    \label{conjunto aberto}
    \label{conjunto fechado}


% Feixe e Ponto de Acumulação

    \section{Feixe $\overline X$}



\part{Indução Matemática}
\label{inducao matematica}

\section{Indução por Igualdade}
\label{inducao por igualdade}

\section{Indução por Desigualdade}
\label{inducao por desigualdade}



\section{Sucessão Monótona}
\label{sucessao monotona}


    \label{sucessao monotona crescente}
    \label{sucessao monotona decrescente}


\section{Sucessão Limitada}
\label{sucessao limitada}

\section{Sucessão Convergente}
\label{sucessao convergente}

\section{Demonstrações para Sucessões}


    X \text{ é \hyperref[sucessao convergente]{convergente}}
\implies &\\&
    X \text{ é \hyperref[sucessao limitada]{limitada}}

    X \text{ é \hyperref[sucessao monotona]{monotona} e \hyperref[sucessao limitada]{limitada}}
\implies &\\&
    X \text{ é \hyperref[sucessao convergente]{convergente}} 





\part{Continuidade em $\mathbb{R}$}


Everything seem in place but the output pdf have lots of links in the wrong place i've already tried fixing hyperref with the following fixes:

  • hypertexnames=false
  • destlabel=false
  • plainpages=false
  • naturalnames=false

And even through hypertexnames=false alone previously fixed this problem in other files, in this one it seems to be useless.

  • 1
    You are resetting sections at \part, and so their number is no longer unique. Use \renewcommand\theHsection{\thepart.\thesection} after loading hyperref. May 24 at 14:09
  • Great! that worked, i knew i had to change the way hyperref referenced section but i didn't even know i could just do that. Thanks May 24 at 14:37

As suggested by @UlrikeF, Adding \renewcommand\theHsection{\thepart.\thesection} just after \hypersetup{...} solves the problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.