Text FormattingHyperLink throwing errors on fully working project when imported

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
AlbertoSinigaglia
Posts: 1
Joined: Mon Aug 17, 2020 3:05 pm

HyperLink throwing errors on fully working project when imported

Post by AlbertoSinigaglia »

I have a fully working document in Latex, and i want to add Hyperlink to the `tableofcontent`, and i found some answers on stackexchange, that says to add :

Code: Select all

\usepackage{color}
    \usepackage{hyperref}
    \hypersetup{
        colorlinks=true, % make the links colored
        linkcolor=blue, % color TOC links in blue
        urlcolor=red, % color URLs in red
        linktoc=all % 'all' will create links for everything in the TOC
    }
However, as soon as i paste this code on my project, i get a lot of errors:

Code: Select all

LaTeX Error: Something's wrong--perhaps a missing \item.
    Undefined control sequence.
    ...
Can someone please help me? Unfortunately i can't add here the code because is a very big project, but you can find it here on OpenLeaf: https://www.overleaf.com/read/ydjyyhhrgwdq

Recommended reading 2024:

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

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

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

HyperLink throwing errors on fully working project when imported

Post by Bartman »

A preamble in the files that are included in the main file looks strange to me. Maybe I have an educational gap, but I didn't learn that way.

Since I don't know whether lezione should be translated as lection or lesson in this context, I just use the filename.

To the error in the file lezione8.tex: You change the output of the enumerate environment with the help of the enumitem package, but you don't use the \item command.

To the error in the file lezione13.tex: I don't know what side effects it could have, but what happens if you remove the matrix environment in the \inter command? There seems to be a problem between loading hyperref and using the matrix environment in the required argument of the outline command.
Post Reply