problema “undefined color”

  • Creatore
    Topic
  • #112495
    Up
    0
    Down
    ::


    Ciao a tutti,
    premetto che non ho conoscenze di Latex.
    Vorrei scrivere un documento, con capitoli e paragrafi, in nero, ma mi ritrovo a dover utilizzare un preambolo già definito dal mio professore, in cui sono stati definiti due colori tramite \definecolor.
    Se provo a sostituirli con il nero, definito come:
    `\definecolor{nero}{rgb}{0,0,0}`

    e lo faccio perchè non saprei fare altrimenti, mi vengono restituiti i seguenti errori:
    `package xcolor error: undefined color 'gold'
    package xcolor error: undefined color 'azzurro'
    `

    Questo è la parte di preambolo che modifico:

    `\documentclass[envcountsame,envcountchap]{svmono}

    %\usepackage[latin1]{inputenc}
    \usepackage[utf8]{inputenc}
    \usepackage{eurosym}
    \usepackage{makeidx} % allows index generation
    \usepackage{graphicx} % standard LaTeX graphics tool
    \usepackage{xtab} % when including figure files
    \usepackage{multicol}
    \usepackage{qtree}
    \usepackage{booktabs}
    \usepackage{latexsym}
    \usepackage{psfig} % used for the two-column index
    \usepackage[bottom]{footmisc} % places footnotes at page bottom
    \usepackage[italian]{babel}
    \usepackage{my_listings}
    \usepackage[hyphens]{url}
    \usepackage{algorithm}
    \usepackage{algorithmic}
    \usepackage{multirow}
    \usepackage{xcolor}
    \usepackage{float}
    \usepackage{titlesec}
    \usepackage{csquotes}
    \usepackage{python}
    \usepackage{verbatim}
    \usepackage{eurosym}
    \usepackage[figuresright]{rotating}
    \usepackage{pdflscape}
    \usepackage{tcolorbox}
    %\setcounter{secnumdepth}{3}
    %\setcounter{tocdepth}{3}
    \makeatletter
    \titleformat{\section}[display]%
    {\Large\bfseries\boldmath}{\color{azzurro}{\thesection}}{-1.1em}{\hspace{2em}\color{azzurro}}[{\titlerule[0pt]}]
    \makeatother

    \makeatletter
    \titleformat{\subsection}[display]%
    {\large\bfseries\boldmath}{\color{gold}{\thesubsection}}{-1em}{\hspace{3em}\color{gold}}[{\titlerule[0pt]}]
    \makeatother

    \makeatletter
    \titleformat{\subsubsection}[display]%
    {\normalsize\bfseries\boldmath}{\color{gold}{\thesubsubsection}}{-1em}{\color{gold}}[{\titlerule[0pt]}]
    \makeatother

    \definecolor{gold}{rgb}{0.64,0.54,0.29}
    \definecolor{azzurro}{rgb}{0,0.29,0.57}

    \def\lstlistlistingname{\textbf{Elenco dei listati}}
    \addto\captionsitalian{\renewcommand{\contentsname}{\textbf{Indice}}}
    \addto\captionsitalian{\renewcommand{\listfigurename}{\textbf{Elenco delle figure}}}

    \makeatletter
    \let\old@rule\@rule
    \def\@rule[#1]#2#3{\textcolor{gold}{\old@rule[#1]{#2}{#3}}}
    \makeatother

    \setlength{\textwidth}{12.7cm}
    \setlength{\textheight}{20.0cm}
    \setlength{\oddsidemargin}{3.50cm}
    \setlength {\evensidemargin}{-0.3cm}
    \setlength {\topmargin}{-1cm}

    \makeindex

    \author{}

    \date{13 marzo 2018}

    \begin{document}
    \pagenumbering{{\color{azzurro}Roman}}

    \end{document}
    `

    in cui sostituisco i vari “azzurro” e “gold” con “nero” definito come sopra.

    Non ho idea di cos’altro potrei cambiare.

    Grazie e ciao!

  • Devi essere connesso per rispondere a questo topic.

Go to top