# Longtable caption error

I get this error when trying to compile my longtable caption. Without the caption it all works fine. I also included the \\ after the caption.

​!Undefined control sequence.

I tried everything related to find out how to get that error away, however, was not able to solve it. I would really appreciate if you know what to do.

Here is my LaTeX code:

% Preamble
%----------------------------------------------------------------------------------

\documentclass[11pt]{article}

% Default Package Setup
\usepackage{setspace,graphicx,epstopdf,amsmath,amsfonts,amssymb,amsthm}
\usepackage{marginnote,datetime,enumitem,subfigure,rotating,fancyvrb}
\usepackage{hyperref,float}
\usepackage[longnamesfirst]{natbib}
\usepackage{array}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{multirow}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage[autostyle]{csquotes}
\usepackage{caption}
\usepackage{natbib}
\captionsetup[table]{belowskip=10pt}
\usdate
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{setspace}
\usepackage{xltabular}
\usepackage{makecell}
\usepackage{pdflscape}

% These next lines allow including or excluding different versions of text
% using the package versionPO.sty

% Notes options
\usepackage[margin=1in,paperwidth=10in,right=2.5in]{geometry}%
\usepackage[textwidth=1.4in,shadow,colorinlistoftodos]{todonotes}%
\usepackage[margin=1in]{geometry}%

% Allow todonotes inside footnotes without blowing up LaTeX
% Next command works but now notes can overlap. Instead, we'll
% a special footnote note command that performs this redefinition.
%\renewcommand{\marginpar}{\marginnote}%

% Save original definition of \marginpar
\let\oldmarginpar\marginpar

% Workaround for todonotes problem with natbib (To Do list title comes out wrong)
\makeatletter\let\chapter\@undefined\makeatother % Undefine \chapter for todonotes

% Define note commands
\newcommand{\smalltodo}[2][] {\todo[caption={#2}, size=\scriptsize, fancyline, #1] {\begin{spacing}{.5}#2\end{spacing}}}
\newcommand{\rhs}[2][]{\smalltodo[color=green!30,#1]{{\bf RS:} #2}}
\newcommand{\rhsnolist}[2][]{\smalltodo[nolist,color=green!30,#1]{{\bf RS:} #2}}
\newcommand{\rhsfn}[2][]{%  To be used in footnotes (and in floats)
\renewcommand{\marginpar}{\marginnote}%
\smalltodo[color=green!30,#1]{{\bf RS:} #2}%
\renewcommand{\marginpar}{\oldmarginpar}}
%\newcommand{\textnote}[1]{\ifnotes{{\noindent\color{red}#1}}{}}
\newcommand{\textnote}[1]{\ifnotes{{\colorbox{yellow}{{\color{red}#1}}}}{}}

% Command to start a new page, starting on odd-numbered page if two side option
% is selected above
\newcommand{\clearRHS}{\clearpage\thispagestyle{empty}\cleardoublepage\thispagestyle{plain}}

% Number paragraphs and subparagraphs and include them in TOC
\setcounter{tocdepth}{3}

% RFS-specific includes:
% Use endnotes instead of footnotes
\usepackage{endnotes}
% RFS-specific formatting of sections, etc.
\captionsetup{labelfont=bf,justification=raggedright,singlelinecheck=false}
\newcommand{\citeRFS}[1]{\citeauthor{#1}~\citeyear{#1}}
% Stick footnotes to the end of the page.
\usepackage[bottom]{footmisc}

% Define theorem-like commands and a few random function names.
\newtheorem{condition}{Condition}
\newtheorem{corollary}{Corollary}
\newtheorem{proposition}{Proposition}
\newtheorem{obs}{Observation}
\newcommand{\argmax}{\mathop{\rm arg\,max}}
\newcommand{\sign}{\mathop{\rm sign}}
\newcommand{\defeq}{\stackrel{\rm def}{=}}

% Abbreviations
% Load packages
\usepackage[nonumberlist, nopostdot]{glossaries}
\setacronymstyle{long-short}
\makenoidxglossaries
\renewcommand\glossaryname{List of Abbreviations and Acronyms}

% Definitions
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\newacronym{mla}{MLA}{Machine Learning Algorithm}

% Special command to define plural forms that not add an S to the singular form.
\newacronym[\glslongpluralkey={Real Estate Operating Companies}]{reoc}{REOC}{Real Estate Operating Company}

% Appendix
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

\begin{document}

\appendix
\setcounter{secnumdepth}{0}
\section{Appendix}

\subsection*{A.1\quad Definition of Main Variables used in the Study}
\label{sec:App1}

\begingroup
\begin{scriptsize}
\begin{spacing}{1}
\begin{longtable}{llll}
\caption{Overview Variables}\\
\toprule
\textbf{\begin{tabular}[c]{@{}l@{}}Variable \\ Category\end{tabular}} & \textbf{Variable Name}         & \textbf{Description}                                                                                                                                     & \textbf{Formula}                                                                                                            \\ \midrule
\textit{Assets}                                                       & Cash                           & \begin{tabular}[c]{@{}l@{}}The most liquid asset of the firm, used \\ to acquire goods and services\end{tabular}                                         &                                                                                                                             \\
& ShortTermInvestments           & \begin{tabular}[c]{@{}l@{}}Securities that are expected to be sold \\ within a year\end{tabular}                                                         &                                                                                                                             \\
& CashAndShortTermInvestments    & \begin{tabular}[c]{@{}l@{}}The sum of cash and short-term \\ investments\end{tabular}                                                                    &                                                                                                                             \\
& Receivables                    & Short-term claims against customers                                                                                                                      &                                                                                                                             \\
& Inventories                    & \begin{tabular}[c]{@{}l@{}}Assets intended to be sold in \\ the ordinary course of business\end{tabular}                                                 &                                                                                                                             \\
& PropertyPlantEquipment         & \begin{tabular}[c]{@{}l@{}}Long-term tangible assets used in e.g. \\ production or administration\end{tabular}                                           &                                                                                                                             \\
& PrepaidExpenses                & \begin{tabular}[c]{@{}l@{}}Assets created through advanced \\ payments for goods or services to \\ be received in the future\end{tabular}                &                                                                                                                             \\
& OtherCurrentAssets             & \begin{tabular}[c]{@{}l@{}}Other current assets which do not \\ include the items listed above and \\ are converted within a year\end{tabular}           &                                                                                                                             \\
& CurrentAssets                  & \begin{tabular}[c]{@{}l@{}}Total current assets that are \\ expected to be converted \\ to cash within a year\end{tabular}                               &                                                                                                                             \\
& IntangibleAssets               & \begin{tabular}[c]{@{}l@{}}Assets that are not physical in nature \\ e.g. Goodwill\end{tabular}                                                          &                                                                                                                             \\
& OtherAssets                    & \begin{tabular}[c]{@{}l@{}}Other assets are a grouping of \\ accounts that have not been \\ listed above\end{tabular}                                    &                                                                                                                             \\
& YoYTotalAssetGrowth            & Yearly growth of total assets                                                                                                                            & \begin{tabular}[c]{@{}l@{}}(Total assets current year / \\ Total assets last year) - 1\end{tabular}                         \\ \midrule
\textit{Liabilities}                                                  & OtherCurrentLiabilities        & \begin{tabular}[c]{@{}l@{}}Claims against the company held by \\ others than suppliers\end{tabular}                                                      &                                                                                                                             \\
& CurrentLiabilities             & \begin{tabular}[c]{@{}l@{}}Sum of all obligations payable \\ within one year\end{tabular}                                                                &                                                                                                                             \\
& LongTermDebt                   & \begin{tabular}[c]{@{}l@{}}Long-term financial liability for \\ which payments will be required \\ after one year from initiation\end{tabular}           &                                                                                                                             \\
& OtherLiabilities               & \begin{tabular}[c]{@{}l@{}}Balance sheet entry used to group\\ together liabilities that are not \\ assigned to common liabilities\end{tabular}          &                                                                                                                             \\
& RetainedEarnings               & \begin{tabular}[c]{@{}l@{}}Retained earnings are the profits\\ earned to date, less dividends \\ paid to investors\end{tabular}                          &                                                                                                                             \\
& OrdinaryStock                  & \begin{tabular}[c]{@{}l@{}}Equity line item that is subordinate \\ to all other types of equity\end{tabular}                                             &                                                                                                                             \\
& WorkingCapital                 & \begin{tabular}[c]{@{}l@{}}Inidactes the firms efficiency \\ as well as its short-term \\ financial stability\end{tabular}                               & \begin{tabular}[c]{@{}l@{}}Current assets - \\ Current liabilities\end{tabular}                                             \\ \midrule
\textit{\begin{tabular}[c]{@{}l@{}}Income \\ Statement\end{tabular}}  & Revenue                        & \begin{tabular}[c]{@{}l@{}}Income generated from normal \\ business operations\end{tabular}                                                              &                                                                                                                             \\
& YoYRevenueGrowth               & Yearly growth of revenue                                                                                                                                 & \begin{tabular}[c]{@{}l@{}}(Revenue current year / \\ Revenue last year) - 1\end{tabular}                                   \\
& CostOfGoodsSold                & \begin{tabular}[c]{@{}l@{}}Direct costs related to the \\ manufacturing of \\ the goods sold\end{tabular}                                                &                                                                                                                             \\
& OperatingExpenses              & \begin{tabular}[c]{@{}l@{}}Sum of the expenses a business incurs \\ through its normal operations\end{tabular}                                           &                                                                                                                             \\
& OtherOperatingExpense          & \begin{tabular}[c]{@{}l@{}}Overhead expenses which do not \\ depend on general operations such \\ as sales or production\end{tabular}                    &                                                                                                                             \\
& StaffExpense                   & \begin{tabular}[c]{@{}l@{}}Expense for employees such \\ as salaries\end{tabular}                                                                        &                                                                                                                             \\
& ResearchAndDevelopment         & \begin{tabular}[c]{@{}l@{}}Includes the cost associated to \\ activities that create or improve \\ products or processes\end{tabular}                    &                                                                                                                             \\
& DepreciationAndAmortization    & \begin{tabular}[c]{@{}l@{}}Non-cash expense of both tangible \\ and intangible assets over time\end{tabular}                                             &                                                                                                                             \\
& EBIT                           & Earnings Before Interests and Taxes                                                                                                                      &                                                                                                                             \\
& EBITMargin                     & \begin{tabular}[c]{@{}l@{}}Percentage of revenue that turned \\ into EBIT\end{tabular}                                                                   & EBIT/Revenue                                                                                                                \\
& InterestExpense                & \begin{tabular}[c]{@{}l@{}}Non-operating expense which \\ represents interest payable\end{tabular}                                                       &                                                                                                                             \\
& PretaxIncome                   & \begin{tabular}[c]{@{}l@{}}Entire income of operations after \\ operating expense, interest and D\&A \\ but before taxes\end{tabular}                    &                                                                                                                             \\
& IncomeTaxes                    & Expense paid for taxes                                                                                                                                   &                                                                                                                             \\
& NetIncomeorLoss                & Profit or loss for the period                                                                                                                            &                                                                                                                             \\
& NonOperatingIncomeorExpense    & \begin{tabular}[c]{@{}l@{}}Expense or income incurred which \\ does not relate to its main \\ business activities\end{tabular}                           &                                                                                                                             \\ \midrule
\textit{Cash Flow}                                                    & CashFlowInvesting              & \begin{tabular}[c]{@{}l@{}}Amount of cash generated or used in \\ investing activities\end{tabular}                                                      &                                                                                                                             \\
& CashFlowOperating              & \begin{tabular}[c]{@{}l@{}}Amount of cash generated or used in \\ ongoing regular business activities\end{tabular}                                       &                                                                                                                             \\
& CashFlowFinancing              & \begin{tabular}[c]{@{}l@{}}Amount of cash generated or used in \\ financing activities\end{tabular}                                                      &                                                                                                                             \\
& Dividends                      & \begin{tabular}[c]{@{}l@{}}Portion of earnings paid from \\ company to its shareholders\end{tabular}                                                     &                                                                                                                             \\ \midrule
\textit{Ratios}                                                       & CurrentRatio                   & \begin{tabular}[c]{@{}l@{}}Liquidity measure which shows a \\ company's ability to pay short-term \\ liabilities\end{tabular}                            &                                                                                                                             \\
& EPS                            & \begin{tabular}[c]{@{}l@{}}Portion of the firm's income which is \\ available to the common stockholders\end{tabular}                                    & \begin{tabular}[c]{@{}l@{}}(Net income - \\ Preferred stock dividends) \\ / Common shares outstanding\end{tabular}          \\
& EPSExcludingExtraordinaryItems & \begin{tabular}[c]{@{}l@{}}EPS but computed with adjusted \\ Income, not taking in account \\ one-time items\end{tabular}                                & \begin{tabular}[c]{@{}l@{}}(Adjusted net income - \\ Preferred stock dividends) / \\ Common shares outstanding\end{tabular} \\
& TotalAssetTurnover             & \begin{tabular}[c]{@{}l@{}}Compares sales to assets to measure \\ the efficiency of the firm\end{tabular}                                                & Net sales / Total assets                                                                                                    \\
& InventoryTurnover              & \begin{tabular}[c]{@{}l@{}}Shows number of times that a \\ business sells and replaces its \\ inventory  within one year\end{tabular}                    & COGS / Ending Inventory                                                                                                     \\
& PriceToBookRatio               & \begin{tabular}[c]{@{}l@{}}Compares market price of the firm's\\ shares to its book value to measure \\ the market's valuation of the stock\end{tabular} & \begin{tabular}[c]{@{}l@{}}Share price / (Total assets - \\ Intangible assets - Liabilities)\end{tabular}                   \\
& PriceEarningsRatio             & \begin{tabular}[c]{@{}l@{}}Shows the multiple of earnings that \\ investors are willing to pay to buy \\ the company's shares\end{tabular}               & Share price / Earnings per share                                                                                            \\
& NetSalesWorkingCapitalRatio    & \begin{tabular}[c]{@{}l@{}}Measures how efficiently a company \\ is applying its working capital \\ to achieve sales\end{tabular}                        & Net sales / Working capital                                                                                                 \\
& ROE                            & \begin{tabular}[c]{@{}l@{}}Measure used by investors which \\ indicates the company's performance\end{tabular}                                           & \begin{tabular}[c]{@{}l@{}}Net Income / \\ Shareholders' equity\end{tabular}                                                \\
& ROA                            & \begin{tabular}[c]{@{}l@{}}Compares the firm's earnings to the\\  total assets and indicated the \\ efficiency of the usage of assets\end{tabular}       & After tax profits / Total assets                                                                                            \\
& InterestCoverage               & \begin{tabular}[c]{@{}l@{}}Measures a company's ability to pay \\ interest obligations on its \\ outstanding debt\end{tabular}                           & EBIT / Interest expense                                                                                                     \\
& EBITCashRatio                  & \begin{tabular}[c]{@{}l@{}}Measures the relationship of \\ EBIT and cash\end{tabular}                                                                    & EBIT / Cash                                                                                                                 \\
& FinancialLeverage              & \begin{tabular}[c]{@{}l@{}}Measures the ratio of total \\ debt to equity\end{tabular}                                                                    & Total debt / Total equity                                                                                                   \\
& SolvencyRatio                  & \begin{tabular}[c]{@{}l@{}}Measures if the firm's cash flow is \\ sufficient to meet its short- \\ and long-term liabilities\end{tabular}                & \begin{tabular}[c]{@{}l@{}}(Net income + depreciation) / \\ (Total liabilities)\end{tabular}                                \\
& QuickRatio                     & \begin{tabular}[c]{@{}l@{}}Measures the firm's ability to pay off \\ its short-term obligations with \\ liquid assets\end{tabular}                       & \begin{tabular}[c]{@{}l@{}}(Cash + Marketable securities + \\ Receivables) / Current liabilities\end{tabular}               \\
& DividendYield                  & \begin{tabular}[c]{@{}l@{}}Used by investors to determine \\ their yield by comparingthe \\ dividend paid to the firm's \\ share price\end{tabular}      & \begin{tabular}[c]{@{}l@{}}Yearly dividend paid / \\ Share price\end{tabular}                                               \\
& DebtAssetsRatio                & \begin{tabular}[c]{@{}l@{}}Measures the ratio of total debt \\ to total assets\end{tabular}                                                              & Total debt / Total assets                                                                                                   \\
& CashAssetsRatio                & \begin{tabular}[c]{@{}l@{}}Measures the ratio of cash to \\ total assets\end{tabular}                                                                    & Cash / Total assets                                                                                                         \\ \midrule
\textit{Macro}                                                        & TradeBalance                   & \begin{tabular}[c]{@{}l@{}}Measures the monetary difference \\ between exports and imports\end{tabular}                                                  & Exports - Imports                                                                                                           \\
\textit{}                                                             & 10YearSwissGovernmentBondYield & \begin{tabular}[c]{@{}l@{}}The yield for the 10-year Swiss \\ goverment bond\end{tabular}                                                                &                                                                                                                             \\ \midrule
\textit{Other}                                                        & MarketCapitalization           & \begin{tabular}[c]{@{}l@{}}The firm's current market value \\ (yearly measured)\end{tabular}                                                             & \begin{tabular}[c]{@{}l@{}}Number of shares outstanding * \\ Current share price\end{tabular}                               \\
& MarketBeta                     & \begin{tabular}[c]{@{}l@{}}Measures systematic risk of an \\ individual stock compared to \\ unsystematic risk of the market\end{tabular}                & \begin{tabular}[c]{@{}l@{}}Covariance (Return stock, \\ Return market) / \\ Variance (Return market)\end{tabular}           \\
& Employees                      & \begin{tabular}[c]{@{}l@{}}Number of employees gives an \\ indication of the firm's size\end{tabular}                                                    &                                                                                                                             \\
\bottomrule
\end{longtable}
\end{spacing}
\end{scriptsize}
\endgroup

\clearpage

\end{document}


Here you see that my column 2 is not top aligned but middle aligned to the description:

• Welcome to TeX.SE! Please make the code you posted here compilable by adding the documentclass, packages etc. That makes it easier to reproduce the issue and to start looking for a solution. – Marijn Sep 17 '19 at 16:55
• The code you have in your example has a \begingroup command, but not \endgroup. You have not provided a compilable example, so it is difficult to know if you have the same error in you document. So add a \endgroup just after the \end{scriptsize} (which I assume you have defiend as a new environment). – Sveinung Sep 17 '19 at 22:45
• Thank you for pointing this out with \endgroup, however, it did not solve the problem. the same error still occurs. And also thank you for the document class information. I have adjusted the code above. – Steve Wolfseher Sep 19 '19 at 6:29

## Regarding the updated question:

The code in your question can be further boiled down to the following MWE:

\documentclass[11pt]{article}

\usepackage{caption}
\usepackage{xltabular}

\begin{document}

\begin{longtable}{l}
\caption{Overview Variables}\\
text in table
\end{longtable}

\end{document}


that produces the following error message:

! Undefined control sequence. \LT@c@ption ...ndcsname }{#3}\LT@captionlistentry{#2}l.10 \caption{Overview Variables}\\


One can get rid of the error message by changing the load order of cpation and xltabular and load the latter after the former. With this little change, the MWE becomes compilable.

\documentclass[11pt]{article}

\usepackage{xltabular}
\usepackage{caption}

\begin{document}

\begin{longtable}{l}
\caption{Overview Variables}\\
text in table
\end{longtable}

\end{document}


This can of course also be applied to your large example document. Since we already saw that load orders of some packages do in fact matter, you might want to take the opportunity and clean up your preamble. hyperref should generally (with a few exceptions) be the last package that is loaded. Also, please avoid loading packages more thean just once. Your preamble loads at least natbib and booktabs twice.

With the information you currently provided, the error message is not reproducible. Here are however three variants of your table with an improved layout. Probably one of them suits your needs:

\documentclass{article}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{xltabular}
\usepackage{makecell}
\renewcommand{\theadfont}{\bfseries}

\newcolumntype{L}{>{\raggedright\arraybackslash}X}

\usepackage{pdflscape}

\begin{document}

{\small
\begin{xltabular}{\textwidth}{llLL}
\caption{Overview Variables}\\
\toprule
\thead{Variable \\ Category} & \thead{Variable Name} & \thead{Description} & \thead{Formula}                                                                                                            \\ \midrule
\endfirsthead
\toprule
\thead{Variable \\ Category} & \thead{Variable Name} & \thead{Description} & \thead{Formula}                                                                                                            \\ \midrule
\endhead
\textit{Assets}                                                       & Cash                           & The most liquid asset of the firm, used  to acquire goods and services &                                                                                                                             \\
& ShortTermInvestments           & Securities that are expected to be sold  within a year &                                                                                                                             \\
& CashAndShortTermInvestments    & The sum of cash and short-term  investments &                                                                                                                             \\
& Receivables                    & Short-term claims against customers                                                                                                                      &                                                                                                                             \\
& Inventories                    & Assets intended to be sold in  the ordinary course of business                                                 &                                                                                                                             \\
& PropertyPlantEquipment         & Long-term tangible assets used in e.g.  production or administration &                                                                                                                             \\
& PrepaidExpenses                & Assets created through advanced  payments for goods or services to  be received in the future                &                                                                                                                             \\
& OtherCurrentAssets             & Other current assets which do not  include the items listed above and  are converted within a year          &                                                                                                                             \\
& CurrentAssets                  & Total current assets that are  expected to be converted  to cash within a year                                &                                                                                                                             \\
& IntangibleAssets               & Assets that are not physical in nature  e.g. Goodwill &                                                                                                                             \\
& OtherAssets                    & Other assets are a grouping of  accounts that have not been  listed above &                                                                                                                             \\
& YoYTotalAssetGrowth            & Yearly growth of total assets                                                                                                                            & (Total assets current year /  Total assets last year) - 1                         \\
\bottomrule
\end{xltabular}}

\newpage

{\small
\begin{xltabular}{\textwidth}{@{\quad\quad}lLL}
\caption{Overview Variables}\\
\toprule
Variable Name & Description & Formula                                                                                                            \\ \midrule
\endfirsthead
\toprule
Variable Name & Description & Formula                                                                                                            \\ \midrule
\endhead
\multicolumn{1}{l}{\textit{Assets}} \\
Cash                           & The most liquid asset of the firm, used  to acquire goods and services &                                                                                                                             \\\addlinespace
\makecell[lt]{ShortTerm\\Investments}           & Securities that are expected to be sold  within a year &                                                                                                                             \\ \addlinespace
\makecell[lt]{CashAndShort\\TermInvestments}    & The sum of cash and short-term  investments &                                                                                                                             \\ \addlinespace
Receivables                    & Short-term claims against customers                                                                                                                      &                                                                                                                             \\\addlinespace
Inventories                    & Assets intended to be sold in  the ordinary course of business                                                 &                                                                                                                             \\\addlinespace
\makecell[lt]{PropertyPlant\\Equipment}         & Long-term tangible assets used in e.g.  production or administration &                                                                                                                             \\\addlinespace
PrepaidExpenses                & Assets created through advanced  payments for goods or services to  be received in the future                &                                                                                                                             \\\addlinespace
\makecell[lt]{OtherCurrent\\Assets}             & Other current assets which do not  include the items listed above and  are converted within a year          &                                                                                                                             \\\addlinespace
CurrentAssets                  & Total current assets that are  expected to be converted  to cash within a year                                &                                                                                                                             \\\addlinespace
IntangibleAssets               & Assets that are not physical in nature  e.g. Goodwill &                                                                                                                             \\\addlinespace
OtherAssets                    & Other assets are a grouping of  accounts that have not been  listed above &                                                                                                                             \\\addlinespace
\makecell[lt]{YoYTotalAsset\\Growth}            & Yearly growth of total assets                                                                                                                            & (Total assets current year /  Total assets last year) - 1                         \\
\bottomrule
\end{xltabular}}

\newpage

\begin{landscape}
\small
\begin{xltabular}{\linewidth}{@{\quad\quad}lLL}
\caption{Overview Variables}\\
\toprule
Variable Name & Description & Formula                                                                                                            \\ \midrule
\endfirsthead
\toprule
Variable Name & Description & Formula                                                                                                            \\ \midrule
\endhead
\multicolumn{1}{l}{\textit{Assets}} \\
Cash                           & The most liquid asset of the firm, used  to acquire goods and services &                                                                                                                             \\\addlinespace
\makecell[lt]{ShortTerm\\Investments}           & Securities that are expected to be sold  within a year &                                                                                                                             \\ \addlinespace
\makecell[lt]{CashAndShort\\TermInvestments}    & The sum of cash and short-term  investments &                                                                                                                             \\ \addlinespace
Receivables                    & Short-term claims against customers                                                                                                                      &                                                                                                                             \\\addlinespace
Inventories                    & Assets intended to be sold in  the ordinary course of business                                                 &                                                                                                                             \\\addlinespace
\makecell[lt]{PropertyPlant\\Equipment}         & Long-term tangible assets used in e.g.  production or administration &                                                                                                                             \\\addlinespace
PrepaidExpenses                & Assets created through advanced  payments for goods or services to  be received in the future                &                                                                                                                             \\\addlinespace
\makecell[lt]{OtherCurrent\\Assets}             & Other current assets which do not  include the items listed above and  are converted within a year          &                                                                                                                             \\\addlinespace
CurrentAssets                  & Total current assets that are  expected to be converted  to cash within a year                                &                                                                                                                             \\\addlinespace
IntangibleAssets               & Assets that are not physical in nature  e.g. Goodwill &                                                                                                                             \\\addlinespace
OtherAssets                    & Other assets are a grouping of  accounts that have not been  listed above &                                                                                                                             \\\addlinespace
\makecell[lt]{YoYTotalAsset\\Growth}            & Yearly growth of total assets                                                                                                                            & (Total assets current year /  Total assets last year) - 1                         \\
\bottomrule
\end{xltabular}
\end{landscape}

\end{document}


• Thx a alot leandriis. I will apply one of the solutions above. Would you therefore suggest not to use the longtable package but rather xltabular? Do zou happen to know what the problem could be with my longtable? – Steve Wolfseher Sep 19 '19 at 6:35
• You are welcome. In your case I'd definitely prefer xltabular since it offers an X type column that is flexible in its width and allows for automatic linebreaks of its contents. With it there is no need to nest tabulars in order to create manual linebreaks. Since the texts in your second last and last column seem to be rather long, I'd personally prefer variant 3 or 2. – leandriis Sep 19 '19 at 7:00
• Regarding your original longtable issue: as already stated, the code in your question is not yet a minimal working example since it will create different error messages related to missing packages, \begin{document} and \end{document}. If you want to know why your example does not work as expected, please edit your question to provide a MWE. – leandriis Sep 19 '19 at 7:04
• Thank you for the explanations. Excuse my ignorance, but what do you need in order to have the code running as a MWE to try out what the problem could be? Would you need all the packages I used as well as some more latex code? – Steve Wolfseher Sep 20 '19 at 7:38
• Ok perfect. I will try to implement your xltabular first. If this would not work, I will get back to you. Thank you again for the help! – Steve Wolfseher Sep 23 '19 at 9:22