Latex renewcommand not working properly
- by Nazgulled
Why is this not working:
\documentclass[a4paper,10pt]{article}
\usepackage{a4wide}
\usepackage[T1]{fontenc}
\usepackage[portuguese]{babel}
\usepackage[latin1]{inputenc}
\usepackage{indentfirst}
\usepackage{listings}
\usepackage{fancyhdr}
\usepackage{url}
\usepackage[compat2,a4paper,left=25mm,right=25mm,bottom=15mm,top=20mm]{geometry}
\usepackage{color}
\usepackage[colorlinks]{hyperref}
\usepackage[pdftex]{graphicx}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\pagestyle{fancy}
\fancyhead[L]{\small Laboratórios de Informática III}
\fancyhead[R]{\small Projecto 1 (Linguagem \textsf{C})}
\lstset{
basicstyle=\ttfamily\footnotesize,
showstringspaces=false,
frame=single,
tabsize=4,
breaklines=true,
}
\definecolor{Section1}{rgb}{0.09,0.21,0.36}
\definecolor{Section2}{rgb}{0.21,0.37,0.56}
\definecolor{Section3}{rgb}{0.30,0.50,0.74}
\hypersetup{
bookmarks=false,
linkcolor=red,
urlcolor=cyan,
}
\renewcommand{\section}[1]{\texorpdfstring{\color{green}#1}{#1}}
\parskip=6pt
\begin{document}
\begin{titlepage}
\begin{center}
\includegraphics[width=5cm]{./logo.jpg}\\[1cm]
\textsc{\LARGE Universidade do Minho}\\[1cm]
\textsc{\large Licenciatura em Engenharia Informática\\Laboratórios de Informática III}\\[1.5cm]
\rule{\linewidth}{0.5mm}\\[0.4cm]
\huge{\textbf{\textsc{Relatório do Projecto 1 (Linguagem C)}}}
\rule{\linewidth}{0.5mm}
\vfill
\begin{tabular}{c c}
\includegraphics[width=3.5cm]{./nuno.jpg} & \includegraphics[width=3.5cm]{./ricardo.jpg} \\
\textsc{\large{Nuno Mendes (51161)}} & \textsc{\large{Ricardo Amaral (48404)}} \\
\end{tabular}
\vfill
\large{\today}
\end{center}
\end{titlepage}
\tableofcontents
\newpage
\section{Introdução}
Lorem ipsum...
\newpage
\appendix
\section{\color{Section1}Diagrama das Estruturas de Dados}
\begin{center}
\includegraphics[width=16cm]{./Diagrama.pdf}
\end{center}
\end{document}
! LaTeX Error: Something's
wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX
Companion for explanation. Type H
for immediate help. ...
l.2 ...rline {1}\color
{green}Teste}{3}{section.1}
How can I make it work properly?