0

I'm trying to use the longtabu environment but I get the following error:

Not in outer par mode. \end{longtabu}
Undefined control sequence.\end{longtabu}
Missing number, treated as zero. \end{longtabu}

I am also using the tabu environment in the fancy header, and I notice that when I comment my fancyhdr code, the error disapears.

I don't know how can I manage to successfully have both of the tables.

So here is my code

\documentclass{TN_tmp}

\usepackage[main=spanish,english]{babel}    % Paquetes de idioma y codificación
\usepackage[utf8x]{inputenc}                % Entrada de acentos
\usepackage[ddmmyyyy,12hr]{datetime} %para insertar fecha y hora

\begin{document}

\pagenumbering{roman}
\title{Titulo del documento}
\maketitle

\newpage
\tableofcontents

\pagenumbering{arabic}
\setcounter{page}{1}

{
\tabulinesep=5pt
\taburulecolor {naranjaSaveTrack}
\newtabulinestyle { punt=1pt on 2pt off 1pt}
\arrayrulewidth=2pt

\begin{longtabu} to \linewidth [c] {|[2pt]X[l]|[punt]X[c]|[2pt]}

    \tabucline [2pt]\hline
    \rowfont[c]{\footnotesize\bfseries\color{naranjaSaveTrack}}
%   \cellcolor{black!70}Dependencia (\textit{shared object}) & \cellcolor{black!70}Licencia\\
%   \rowfont[c]{\normalsize\bfseries\cellcolor{lightgray}}
    linux-vdso.so.1 & GPL \\
    libasound.so.2 & LGPL \\
    libopencv\_video.so.2.4 & BSD \\
    libopencv\_objdetect.so.2.4 & BSD \\
    libopencv\_imgproc.so.2.4 & BSD \\
    libopencv\_highgui.so.2.4 & BSD \\
    libopencv\_core.so.2.4 & BSD \\
    libopencv\_calib3d.so.2.4 & BSD \\
    libTracker.so & Comercial \\
    libgtop-2.0.so.7 & GPLv2+ \\
    libdropbox.so & MIT \\
    libfuzzylited.so & APLv2 \\
    libstdc++.so.6 & GPLv3 \\
    libcurl.so.4 & BSD \\
    libjansson.so.4 & MIT \\
    libcairo.so.2 & LGPLv2.1 \\
    libdl.so.2 & LGPLv3 \\
    libm.so.6 & LGPLv3 \\
    libpthread.so.0 & \\
    libX11.so.6 & LGPLv3 \\
    libgcc\_s.so.1 & GPL+ \\
    libc.so.6 & LGPL \\
    librt.so.1 & LGPL \\
    libtbb.so.2 & Intelv2 \\
    libGL.so.1 & \\
    libjpeg.so.8 & GPLv2 \\
    libpng12.so.0 & The zlib/libpng Lic \\
    libtiff.so.5 & Similar BSD \\
    libjasper.so.1 & Similar MIT \\
    libIlmImf.so.6 & \\
    libHalf.so.6 & \\
    libdc1394.so.22 & LGPL \\
    libv4l1.so.0 & LGPLv2.1 \\
    libavcodec.so.54  & LGPL \\
    libavformat.so.54 & LGPL \\
    libavutil.so.52 & LGPL \\
    libswscale.so.2 & GPL \\
    libQtOpenGL.so.4 & GPLv2+ \\
    libQtGui.so.4 & GPLv2+ \\
    libQtTest.so.4 & GPLv2+ \\
    libQtCore.so.4 & GPLv2+ \\
    libz.so.1 & MIT \\
    libopencv\_flann.so.2.4 & BSD \\
    libopencv\_features2d.so.2.4 & BSD \\
    libXau.so.6 & X11 \\
    libglib-2.0.so.0 & GPLv2+ \\
    libcurl-gnutls.so.4 & LGPL \\
    liboauth.so.0 & MIT \\
    libidn.so.11 & LGPLv2.1 \\
    librtmp.so.0 & LGPL \\
    libssl.so.1.0.0 & similar BSD \\
    libcrypto.so.1.0.0 & LGPLv2.1 \\
    libgssapi\_krb5.so.2 & \\
    liblber-2.4.so.2 & \\
    libldap\_r-2.4.so.2 & \\
    libpixman-1.so.0 & MIT \\
    libfontconfig.so.1 & \\
    libfreetype.so.6 & Similar BSD, compatible con GPLv3 \\
    libxcb-shm.so.0 & MIT \\
    libxcb-render.so.0 & MIT \\
    libxcb.so.1 & MIT \\
    libXrender.so.1 & AGPLv3+ \\
    libXext.so.6 & MIT \\
    libglapi.so.0 & \\
    libXdamage.so.1 & MIT \\
    libXfixes.so.3 & MIT \\
    libX11-xcb.so.1 & MIT \\
    libxcb-glx.so.0 & MIT \\
    libxcb-dri2.so.0 & MIT \\
    libxcb-dri3.so.0 & MIT \\
    libxcb-present.so.0 & MIT \\
    libxcb-sync.so.1 & MIT \\
    libxshmfence.so.1 & MIT \\
    libXxf86vm.so.1 & MIT \\
    libdrm.so.2 & MIT \\
    liblzma.so.5 & LGPLv2.1 \\
    libjbig.so.0 & GPL \\
    libIex.so.6 & \\
    libIlmThread.so.6 & \\
    libraw1394.so.11 & LGPL v2 \\
    libusb-1.0.so.0 & LGPL v2.1 \\
    libv4l2.so.0 & LGPL v2.1 \\
    libxvidcore.so.4 & \\
    libx264.so.142 & GPL \\
    libvpx.so.1 & liberal lic \\
    libvorbisenc.so.2 & Similar BSD \\
    libvorbis.so.0 & Similar BSD \\
    libtheoraenc.so.1 & LGPL v2.1 \\
    libtheoradec.so.1 & LGPL v2.1 \\
    libspeex.so.1  & BSD \\
    libschroedinger-1.0.so.0 & MIT, LGPL v2, GPL v2 \\
    libopus.so.0 & BSD \\
    libopenjpeg.so.2 & BSD \\
    libmp3lame.so.0 & \\
    libgsm.so.1 & Sin especificar \\
    libva.so.1 & MIT \\
    libgnutls.so.26 & LGPLv2.1+ \\
    libbz2.so.1.0 & Similar BSD \\
    libaudio.so.2 & APLv2 \\
    libgobject-2.0.so.0 & \\
    libSM.so.6 & MIT \\
    libICE.so.6 & MIT \\
    libXi.so.6 & MIT \\
    libpcre.so.3 & BSD \\
    libgcrypt.so.11 & LGPL \\
    libnss3.so & Mozilla License \\
    libkrb5.so.3 & AGPLv3+ \\
    libk5crypto.so.3 & \\
    libcom\_err.so.2 & MIT \\
    libkrb5support.so.0 & \\
    libresolv.so.2 & \\
    libsasl2.so.2 & GPLv2+ \\
    libgssapi.so.3 & GPLv1+ \\
    libexpat.so.1 & MIT \\
    libXdmcp.so.6 & \\
    libudev.so.1 & GPL v2 \\
    libv4lconvert.so.0 & LGPL v2.1 \\
    libogg.so.0 & BSD \\
    liborc-0.4.so.0 & BSD / Motorola Lic \\
    libtasn1.so.6 & LGPL v2.1 \\
    libp11-kit.so.0 & \\
    libXt.so.6 &  \\
    libffi.so.6 & liberal lic \\
    libuuid.so.1 & BSD \\
    libgpg-error.so.0 & GPLv2 / LGPLv2.1  \\
    libnssutil3.so & MPLv2.0 \\
    libplc4.so & \\
    libplds4.so & \\
    libnspr4.so & \\
    libkeyutils.so.1 & \\
    libheimntlm.so.0 & \\
    libkrb5.so.26 & GPL \\
    libasn1.so.8 & \\
    libhcrypto.so.4 & BSD \\
    libroken.so.18 & \\
    libcgmanager.so.0 & LGPLv2.1+ / GPLv2 \\
    libnih.so.1 & \\ 
    libnih-dbus.so.1 & \\
    libdbus-1.so.3 & Similar BSD \\
    libwind.so.0 & \\
    libheimbase.so.1 & Similar BSD \\
    libhx509.so.5 & Similar BSD \\
    libsqlite3.so.0 & Public Domain \\
    libcrypt.so.1 & MIT \\ \hline
\end{longtabu}
}

\end{document}

And the class Document is the next:

% Copyright note: This package defines how titles should
% be typeset at the columbidae University
% Please check for updates


\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{TN_tmp}[2015/11/18 v.01 a general package]
\LoadClass{article}

%\RequirePackage[main=spanish,english]{babel}   % Paquetes de idioma y codificación


%===========================================
% NEW COMMANDS
%===========================================
\newcommand*{\adressto}[1]{\gdef\@project{#1}}

%\newcommand*{\revision}[1]{\gdef\@revision{#1}}
%\newcommand*{\@revision}[1]{#1}

%
%\newcommand*{\@project}{Final Year Project}
%
%\newcommand*{\supervisor}[1]{\gdef\@supervisor{#1}}
%
%\newcommand*{\@supervisor}{\texttt{\string\supervisor} currently not set. Please fix this.}

%\newcommand{\headlinecolor}{\normalcolor}

\newcommand{\blankpage} {%
    \thispagestyle{empty}%
    {
        \vspace*{\fill}
        \begin{center}
            This page intentionally left blank.
        \end{center}
        \vspace*{\fill}
        \vspace*{\fill}
    } %
    \newpage
}


%===========================================
% COLORES
%===========================================
\RequirePackage[table,xcdraw]{xcolor}
\definecolor{naranjaSaveTrack}{RGB}{255,178,38}
\definecolor{azulBosch}{RGB}{28,115,178}
\definecolor{slcolor}{HTML}{882B21}


%===========================================
% HYPER-REFERENCES
%===========================================
\RequirePackage{hyperref}
\hypersetup{colorlinks=true,linkcolor=black,urlcolor=black}


%===========================================
% GEOMETRY
%===========================================
\RequirePackage[includehead, includefoot, top=1cm, headheight=2cm, headsep=1cm,%
                bottom=1cm, footskip=30pt, left=2cm, right=2cm]%
                {geometry}


%===========================================
% REVISION HISTORY
%===========================================
\RequirePackage[tocentry,tablegrid,owncaptions]{vhistory}

\renewcommand{\vhhistoryname}{Revisi\'on Hist\'orica}
\renewcommand{\vhversionname}{Revisi\'on}
\renewcommand{\vhdatename}   {Fecha}
\renewcommand{\vhauthorname} {Autores}
\renewcommand{\vhchangename} {Descripci\'on}


%===========================================
% HEADER AND FOOTER definition
%===========================================
\RequirePackage{fancyhdr}   % Paquete para configurar el encabezado y pie de página
\RequirePackage{longtable}
\RequirePackage{tabu}
\RequirePackage{multirow}
\RequirePackage{multicol}
\RequirePackage{float}
\RequirePackage{graphicx}

\fancyhead{}
\fancyhead{%
    {
    \begin{tabu} to \linewidth [c] {|X[1.5,l]|X[5,l]|X[1,l]|X[1.3,l]|X[2,c]|}
        \tabulinesep=5pt
        \hline
        T\'itulo & \multicolumn{3}{l|}{\@title}  & \multirow{3}{*}{\includegraphics[width=2.5cm]{img/savetrack_640_480.png}} \\ \cline{1-4}
        Dirigido a &        & Fecha    &    \vhCurrentDate  &                   \\ \cline{1-4}
        Autor  &    \@author        & Revisi\'on &  \vhCurrentVersion   &                   \\ \hline
    \end{tabu}
    }
}
\renewcommand{\headrule}{}


\fancyfoot{} % clear all footer fields
\lfoot{{\bf\color{naranjaSaveTrack}\thepage / }\bf\@title}
\rfoot{\bf\color{azulBosch}www.savetrack.com}
\renewcommand{\footrulewidth}{0.4pt}

\pagestyle{fancy}



%===========================================
% CHAPTER - SECTION - SUBSECTION
%===========================================
%\renewcommand*\thesection{\arabic{section}}
\RequirePackage[uppercase, sf, explicit, raggedright]{titlesec}
\titleformat{\section}{\color{azulBosch}\sf\large\bf}{\thesection\hspace{2pt}}{.5em}{#1}
\titleformat{\subsection}{\color{azulBosch}\sf\large\bf}{\thesubsection\hspace{2pt}}{.5em}{#1}
\titleformat{\subsubsection}{\sf\normalsize\bf}{\thesubsubsection\hspace{2pt}}{.5em}{#1}

\setcounter{secnumdepth}{3}



%===========================================
% TITLE PAGE
%===========================================
\RequirePackage[pages=some]{background}


\backgroundsetup{scale=1,angle=0,opacity=1,placement=top,vshift=4pt,
    contents={
        \includegraphics[width=\paperwidth,height=.4\paperheight]
        {img/bg-tecnologia.jpg}
    }
}

\renewcommand{\maketitle}{%
%   \hrule
    \BgThispage
    \newgeometry{left=3cm,right=3cm,top=13cm,bottom=3cm} %defines the geometry for the titlepage
    \thispagestyle{empty}
    \begin{titlepage}           
        \pagecolor{naranjaSaveTrack}
        \definecolor{ahora}{RGB}{255,255,255}

        %\noindent
        \begin{center}
            \includegraphics[width=5cm]{img/savetrack_640_480.png}\\
            \vspace*{-15pt}\centering\Large\sffamily\color{black!70}\textbf{Vision and Intelligence on the road}\\
            \color{ahora}\rule{\textwidth}{1mm}
        \end{center}    

        \vfill
        \noindent
        {\huge\sffamily\@title} \\[10pt]
        \sffamily{\vhCurrentDate}

    \end{titlepage}
    \restoregeometry    % restores the geometry
    \nopagecolor        % Use this to restore the color pages to white
}
3
  • Please post a document, not just fragments of code
    – user31729
    Dec 17, 2015 at 14:00
  • What's in documento.tex? And you should use the class option demo to provent \includegraphics complaining
    – user31729
    Dec 17, 2015 at 14:46
  • Sorry, It shouldn't be there, it contains the actual table but it was on another tex file.
    – alegasalv
    Dec 17, 2015 at 14:48

1 Answer 1

1

Personally, i would avoid using package tabu, especially in headers.

Following a not very elegant way of doing the header, though i would avoid that much information in a header.

texsxTabuHeader

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{blindtext}
\usepackage{vhistory}
\usepackage{graphicx}
\makeatletter
\setlength{\headheight}{95pt}
\fancyhead{%
    \begin{minipage}[c]{.7\textwidth}%
        \begin{tabularx}{\linewidth}{l>{\raggedright}X@{\quad\quad}ll}
            T\'itulo   & \multicolumn{3}{>{\raggedright}p{.7\linewidth}}{\@title}\\
            Dirigado a &          & Fecha      & \vhCurrentDate\\
            Autor      & \@author & Revisi\'on & \vhCurrentVersion\\
        \end{tabularx}
    \end{minipage}\hfill
    \begin{minipage}[c]{.25\textwidth}
        \hfill
        \includegraphics[width=\linewidth,keepaspectratio]{example-image-1x1}
    \end{minipage}\vspace{1ex}
}
\makeatother
\pagestyle{fancy}
\title{The wonderful journey of Walter Wombat and his friends to the magic mountain}
\author{Carl Capybara}

\begin{document}
\blindtext[5]
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .