1

I have following data

Shahrawat, R., and Rao, K. D. & 2012&   Insured yet vulnerable: Out-of-pocket payments and India’s poor&    All ages&   2004-05&    124644& All Diseases&   Health& 5.1\\
Raban et al.,&  2013&   Variations in catastrophic health expenditure estimates from household surveys in India&    All Ages&   2004-05&    124644& All Diseases&   Consumption &   14\\
Raban et al.,&  2013&   Variations in catastrophic health expenditure estimates from household surveys in India&    All Ages&   2009-10&    100855& All Diseases&   Consumption &   13.9\\

Likewise 43 rows of data varying different titles. I want to have to fit a longtable and wider table in landscape page in Latex for my thesis. Can anyone help in this regard. Thanks

1
  • There are a number of ways to create a table in LaTeX, so a better approach would be to try one of those and ask a specific question about something that is not working (and include an MWE). As written, your question is really too vague to get a specific answer. Feb 7 at 22:10

1 Answer 1

1

I suggest using an xltabular environment, which combines the capabilities of the longtable and tabularx environments. I further suggest combining the information contained in the first two columns; if you accept this suggestion, the total number of columns in this table will be 8. Based on the sample rows you've provided, automatic line wrapping appears to be desirable for columns 1 and 2. I wouldn't use vertical rules for this table.

Since you've provided no information about what the table's header row(s) should contain, the overall look of the resulting table will necessarily be a bit spartan:

enter image description here

\documentclass{article} % or some other suitable document class

\usepackage{iftex}
\ifpdftex % pdfLaTeX is being used
  \usepackage[T1]{fontenc}
\else % either XeLaTeX or LuaLaTeX is being used
  \usepackage{fontspec}
\fi

\usepackage[english]{babel}
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably

\usepackage{xltabular} % combine capabilities of longtable and tabularx
\usepackage{ragged2e} % for '\RaggedRight' macro
\newcolumntype{P}[1]{>{\RaggedRight}p{#1}} % suppress full justification
\newcolumntype{L}{>{\RaggedRight}X} % suppress full justification
\usepackage{pdflscape} % for 'landscape' env.
\usepackage{booktabs} % for well-spaced horizontal rules

\begin{document}

\begin{landscape} % switch to landscape mode
\setlength\tabcolsep{4pt} % default: 6pt
\begin{xltabular}{\textwidth}{@{} P{1.9cm} L llllll @{}}

%% headers and footers
\toprule
\endhead

\bottomrule
\endfoot

%% body of table

Shahrawat, R. and Rao, K. D., 2012
  & Insured yet vulnerable: Out-of-pocket payments and India’s poor
  & All ages& 2004--05& 124644& All Diseases& Health& 5.1\\
\addlinespace
Raban et al., 2013
  & Variations in catastrophic health expenditure estimates from household surveys in India
  & All ages& 2004--05& 124644& All Diseases& Consumption & 14\\
\addlinespace
Raban et al., 2013
  & Variations in catastrophic health expenditure estimates from household surveys in India
  & All ages& 2009--10& 100855& All Diseases& Consumption & 13.9\\
\end{xltabular}
\end{landscape}

\end{document}

You must log in to answer this question.

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