1

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:

\documentclass[12pt]{article}



% Linguagem
\usepackage[portuguese]{babel}



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



% Multicols
\usepackage{multicol}
\setlength{\columnsep}{5mm}



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



%% titlesec
\usepackage{titlesec}

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



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

\newcommand\BM[2][align*]{{\large\boldmath\bfseries%
    \begin{#1}
        #2
    \end{#1}%
}}



% Colors
\usepackage{xcolor}

\colorlet{Emph}{ blue!40!white}
\colorlet{Background}{white!5!black}

\pagecolor{black}
\color{white}



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



% title, author and date
\title{\bfseries\color{Emph}\mytitle}
\author{\myauthor}
\date{\today}



% hyperref
\usepackage{hyperref}
\hypersetup{
    % Links customization
    hidelinks=true,
    colorlinks=true,
    linkcolor=red!25!white,
    % PDF customization
    pdfpagelayout=OneColumn,
    pdftitle=\mytitle,
    pdfauthor=\myauthor
    % fix hyperref links
    hypertexnames=false
    destlabel=false,
    plainpages=false,
    naturalnames=false
}



% subsubsection customization
\renewcommand\thesubsubsection{(\roman{subsubsection})}



\begin{document}


\maketitle


% Table of Contents

\renewcommand{\contentsname}{} % remove title

\section*{Conteúdo}
\begin{multicols}{2} \tableofcontents \end{multicols}


\newpage



\part{Background}



\newpage



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

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


\section*{Pontos:}
\label{pontos}


% Majorante e Minorante
\begin{multicols}{2}
    
    \section{Minorante}
    \label{minorante}
        
    \section{Majorante}
    \label{majorante}

\end{multicols}


% Infimo e Supremo
\begin{multicols}{2}

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

\end{multicols}


% Minimo e Maximo
\begin{multicols}{2}
    
    \section{Minimo Min}
    \label{minimo}
    
    \section{Maximo Max}
    \label{maximo}

\end{multicols}


% Interior e Exterior
\begin{multicols}{2}
    
    \section{Interior Int}
    \label{interior}
    
    \section{Exterior Ext}
    \label{exterior}
    
\end{multicols}


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


\section{Fronteira Fr}
\label{fronteira}
    
\section*{Conjuntos:}
\label{conjuntos}

\section{Limitado}
\label{conjunto limitado}

\begin{multicols}{2}

    \section{Aberto}
    \label{conjunto aberto}
    
    \section{Fechado}
    \label{conjunto fechado}

\end{multicols}

% Feixe e Ponto de Acumulação
\begin{multicols}{2}

    \section{Feixe $\overline X$}
    \label{feixe}

\end{multicols}



\newpage



\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}



\newpage



\part{Sucessões}
\label{sucessoes}


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

\begin{multicols}{2}

    \subsection{Crescente}
    \label{sucessao monotona crescente}
    
    \subsection{Decresente}
    \label{sucessao monotona decrescente}

\end{multicols}

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

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

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

\begin{multicols}{2}

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

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

\end{multicols}


\newpage



\part{Limites}



\newpage



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




\end{document}

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.

2
  • 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
0

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.