Graphics, Figures & Tables\end{longtabu} not compiling

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
KatarinaD
Posts: 10
Joined: Mon Mar 30, 2015 9:39 am

\end{longtabu} not compiling

Post by KatarinaD »

Cross posted (sorry - beginner's mistake): http://tex.stackexchange.com/questions/ ... 664_236134

I have copy-pasted the codes and usepackages from a colleague to help me set up a long table landscape style. When I try to compile the copied code in a fresh document the compiling stops at the \end{longtabu} and I can not figure out why.

This is what I have in my document:

Code: Select all

Code, edit and compile here:
\documentclass[a4paper, 12pt]{article}
\usepackage{tabularx}
\usepackage[english]{babel}
%\usepackage[round,sort&compress]{natbib} % Natbib for better citations %longnamesfirst
\usepackage{pdflscape} % landscape env
\usepackage[bottom]{footmisc}% places footnotes at page bottom
\usepackage{rotating}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{tablefootnote}
\usepackage{lipsum}
\usepackage{blindtext}
%\usepackage{fancyref}
%\renewcommand{\fancyrefdefaultformat}{plain}
\usepackage[round,colon]{natbib}
\title{xxx}
\author{yyy}
\begin{document}
\tabcolsep=3pt % Half the width of the horizontal space between columns
\extrarowsep=3pt
\begin{landscape}
\scriptsize
\begin{longtabu} to \linewidth {
p{14em} % paper col aligned left
c % levels
p{5em} % criterion
X[2.5,l] % state var
X[1,l] % stage length
p{4em} % decisions
l % application
X[2.5,l] % misc
}
\caption{Overview over literature using MDPs for modeling within cattle farming.}\label{tab:cattle}\\
\toprule
Paper\footnotemk{a} & Levels\footnotemk{b} & Criterion\footnotemk{c} & State variables\footnotemk{d} & Stage Length\footnotemk{e} & Decisions\footnotemk{f} & Application\footnotemk{g} & Misc\\
\midrule
\endfirsthead
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Last edited by KatarinaD on Tue Mar 31, 2015 3:12 pm, edited 1 time in total.

Recommended reading 2024:

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

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

\end{longtabu} not compiling

Post by Johannes_B »

Getting code from some other dude is almost always a quite bad idea, no matter how nice he is or how high his academic degree is.

Very very often, code that gets inherited like this is often old and obsolete, or simple faulty. So please be careful.


In the example above, package booktabs is missing. Furthermore, your colleague seems to have made own and a bit shorter commands, \footnotemk instead of \footnotemark
and \footnotetxt instead of \footnotetext. Maybe a package i don't know actually provides thos commands, but right now, this is impossible for me to tell.

As you can see, the benefit is minimal, but it is very very hard for a beginner to find the cause and once you send some article to a publisher, it will drive their copy editor simply mad. Some user-defined commands are usefull, but they should be defined in the document ;-)
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
KatarinaD
Posts: 10
Joined: Mon Mar 30, 2015 9:39 am

Re: \end{longtabu} not compiling

Post by KatarinaD »

Thank you very much for your answer (and again: sorry for the cross posting). I can see what you mean about my colleague making his own definitions.

I will begin defining the table from scratch - and actually trying to find the solution to my problem has provided me with a lot of useful information on how to build tables - which packages exist (at least some of them) and what they do.

Thanks again :mrgreen:
Post Reply