How do i wrap text in next line in order to fit this table in landscape orientation in the latex document. Need to wrap text particularly in column 7, 8 and column 9.
Attached image is how I want it to look in overload....but in landscape orientation.
Code:
\documentclass[a4paper,12pt]{article}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,comment}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{threeparttable}
\usepackage{booktabs}
\usepackage{lscape}
\usepackage{setspace}
\usepackage{adjustbox}
\usepackage{multirow}
\usepackage{color}
\usepackage{enumerate}
\usepackage{tfrupee}
\usepackage{tabularx}
\newcommand{\remark}[1]{{\color{red} \large \bf~#1~}}
\usepackage{caption}
\captionsetup[table]{name=Exhibit}
\captionsetup[figure]{name=Exhibit}
\usepackage[utf8]{inputenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{landscape}
\newpage
\begin{table}[htbp]
\setlength{\tabcolsep}{3pt}
\footnotesize
\renewcommand{\arraystretch}{1}
\caption{Cash Flow}
\centering
\begin{tabular}{lcc p{0.2\linewidth} p{0.3\linewidth}cccclrl}
\toprule
SNo. & Funding Date & Round Name & Funding Amount (USD) & Round Post-Money Valuation (USD) & Institutional Investors & Angel Investors & Lead Investor & Total Funding (USD) & Revenue Multiple \\
1 & Jul 26, 2021 & Series A & 2,50,00,000 & 10,39,39,264 & WestBridge,Accel,Tanglin Venture Partners, Calabasas Capital,AngelList,Sparkle Fund, Konark Trust,MMPL Trust,GP Partners & Ashneer Grover,Abhimanyu Munjal,Kushal Nahata,Ashish Singhal,Ankur Ashwin Shah,Ashish Sharma,Karthik Bhat,Gautam Kumar & WestBridge,Accel, Tanglin Venture Partners & 2,85,70,159 & ~ \\
2 & Oct 29, 2020 & Seed & 33,60,820 & 1,36,14,263 & Accel,Titan Capital,QED Innovation,Blue Wolf Capital Partners,ICICI Bank,Sparkle Fund & Sumit Maniyar,Ramakanth Sharma,Gaurav Agarwal,Nitin Gupta,Akshat Sharma,Harish Kumar Goel,Akhil Paul,Pramod Kumar Saraf,Chitransh Sahai,Kunal Bahl,Viswamani Ganesh,Ashish Santhalia,Anjali Bansal,Dilip KumarKarodimal Khandelwal,Rohit Bansal & Accel & 2,85,70,159 & 30.2 \\
3 & Nov 16, 2019 & Seed & 2,09,339 & 14,86,494 & Titan Capital & Rajesh Razdan,Ajay Garg,Mitesh Damania,Bipin Kumar Shah,Sunder Nookala,Kunal Bahl,Rohit Bansal & Titan Capital & 2,85,70,159 & 68.6 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\end{landscape}
\end{document}
I think it would be better if you removed the long wordy columns and moved them to another table. Then match everything by ID. To let table contain long text, you get very tall rows. I don't think it looks correct.
\documentclass[a4paper,12pt]{article}
\usepackage{tabularx}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{booktabs}
\usepackage{pdflscape} % \usepackage{lscape}
\usepackage{makecell}
\usepackage{caption}
\captionsetup[table]{name=Exhibit}
\captionsetup[figure]{name=Exhibit}
\begin{document}
\begin{landscape}
\begin{table}[htbp]
\setlength{\tabcolsep}{3pt}
\footnotesize
\renewcommand{\arraystretch}{1}
\renewcommand\theadgape{}
\renewcommand{\theadalign}{ct}
\caption{Cash Flow}
\label{tab:addlabel}
\centering
\begin{tabularx}{\linewidth}{lcc *2{r} *3{>{\raggedright\arraybackslash}X} rc}
\toprule
SNo.
& \thead{Funding\\Date}
& \thead{Round\\Name}
& \thead{Funding\\Amount\\(USD)}
& \thead{Round\\Post-Money\\Valuation\\(USD)}
& \thead{Institutional\\Investors}
& \thead{Angel\\Investors}
& \thead{Lead\\Investor}
& \thead{Total\\Funding\\(USD)}
& \thead{Revenue\\Multiple} \\
\midrule
1
& Jul 26, 2021
& Series A
& 2,50,00,000
& 10,39,39,264
& WestBridge, Accel, Tanglin Venture Partners, Calabasas Capital, AngelList, Sparkle Fund, Konark Trust, MMPL Trust, GP Partners
& Ashneer Grover, Abhimanyu Munjal, Kushal Nahata, Ashish Singhal, Ankur Ashwin Shah, Ashish Sharma, Karthik Bhat, Gautam Kumar
& WestBridge, Accel, Tanglin Venture Partners
& 2,85,70,159
& ~ \\
2
& Oct 29, 2020
& Seed
& 33,60,820
& 1,36,14,263
& Accel, Titan Capital, QED Innovation, Blue Wolf Capital Partners, ICICI Bank, Sparkle Fund
& Sumit Maniyar,Ramakanth Sharma,Gaurav Agarwal,Nitin Gupta,Akshat Sharma,Harish Kumar Goel,Akhil Paul, Pramod Kumar Saraf, Chitransh Sahai, Kunal Bahl, Viswamani Ganesh, Ashish Santhalia, Anjali Bansal, Dilip KumarKarodimal Khandelwal, Rohit Bansal
& Accel
& 2,85,70,159
& 30.2 \\
3
& Nov 16, 2019
& Seed
& 2,09,339
& 14,86,494
& Titan Capital
& Rajesh Razdan,Ajay Garg,Mitesh Damania,Bipin Kumar Shah,Sunder Nookala,Kunal Bahl,Rohit Bansal
& Titan Capital
& 2,85,70,159
& 68.6 \\
\bottomrule
\end{tabularx}
\end{table}%
\end{landscape}
\end{document}
I am trying to output a LaTex file using Stata's esttab command. I cannot get the decimals to align, nor can I get the nice formatting from the "booktabs" option to work. I also would like to increase the width of the columns. I have been tinkering with this for hours and have had no luck. Below is my Stata code and the LaTex code that I am running through Overleaf. Any help would be greatly appreciated!
Here is my Stata code:
#delimit ;
esttab r1 r2 r3 r4 using "C:\Users\user\Dropbox\Private
Code\Code\STATA\latex\table1.tex", replace
b(3) nomtitle label star(* 0.10 ** 0.05 *** 0.01)
booktabs alignment(D{.}{.}{-1})
title(Placeholder)
s(N DAY FFE FIRM_QUARTER r2_a,
fmt(%9.0fc 0 0 0 3)
label("Observations" "Day FE" "Firm FE" "Firm-Quarter FE" "Adj. R-Sq{\super 2}"))
compress nocons;
Here is the LaTex code it spits out:
\begin{table}[htbp]\centering
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{Placeholder}
\begin{tabular}{l*{4}{D{.}{.}{-1}}}
\toprule
&\multicolumn{1}{c}{(1)} &\multicolumn{1}{c}{(2)} &\multicolumn{1}
{c}{(3)} &\multicolumn{1}{c}{(4)} \\
\midrule
VAR1 & 0.007\sym{***}& 0.007\sym{***}& 0.006\sym{***}& 0.007\sym{***}\\
& (8.55) & (7.82) & (7.67) & (8.54) \\
\addlinespace
VAR2 & 0.132\sym{***}& 0.131\sym{***}& 0.131\sym{***}& 0.132\sym{***}\\
& (20.35) & (20.15) & (20.15) & (20.35) \\
\midrule
Observations &1,315,077 &1,315,077 &1,315,077 &1,315,077
\\
Day FE & No & Yes & Yes & No \\
Firm FE & Yes & No & Yes & No \\
Firm-Quarter FE & No & No & No & Yes \\
Adj. R-Sq{\super 2}& 0.045 & 0.027 & 0.046 & 0.044
\\
\bottomrule
\multicolumn{5}{l}{\footnotesize \textit{t} statistics in parentheses}\\
\multicolumn{5}{l}{\footnotesize \sym{*} \(p<0.10\), \sym{**} \(p<0.05\), \sym{***} \(
p<0.01\)}\\
\end{tabular}
\end{table}
Since you haven't provided the full code, I can't see what would your output be. When I add \documentclass{article} with missing packages in a preamble, I get very wide table which does not fit a page. Also, I don't know whether the code is automatically generated or created/altered by you.
Assuming the latter, I would do the following. Since you add footnotes in the table, I would enclose tabular within threeparttable, which splits the area for table into three parts: top for captions, middle for a table definition e.g. tabular, and bottom part for footnotes. It also adds a convenient macro \tnote{}.
Secondly, dcolumn causes big numbers to be pushed way too much to the left. You should let dcolumn suppress their alignment. I personally don't know how, although I assume there is a way.
I prefer siunitx for formatting numbers in tables. However siunitx needs a bit more work. It automatically parses numbers in cells and any non-number content generates errors. Therefore, non-numbers need to be enclosed within {...} which instructs siunitx to leave the content intact. It also forces numbers not to be formatted, aligned etc., which is what I did for the big numbers you have in the table. There's also option to format thousands and millions with any separator of your choice. For instance you could use one of the macros: \,, :, or \; for thin, mid or thick space, respectively instead of ,.
Below is my suggestion for your table based on siunitx and threeparttable, so you can compare it with your approach.
\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{threeparttable}
\newcommand\super[1]{\textsuperscript{#1}}
\sisetup{
group-separator={,},
table-format=1.3,
table-align-text-after = false,
}
\begin{document}
\begin{table}[htbp]
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\centering
\begin{threeparttable}
\caption{Placeholder}
\begin{tabular}{l *{4}{S}}
\toprule
& \multicolumn{1}{c}{(1)}
& \multicolumn{1}{c}{(2)}
& \multicolumn{1}{c}{(3)}
& \multicolumn{1}{c}{(4)} \\
\midrule
{VAR1} & 0.007\tnote{***} & 0.007\tnote{***} & 0.006\tnote{***} & 0.007\tnote{***} \\
& {(8.55)} & {(7.82)} & {(7.67)} & {(8.54)} \\
\addlinespace
VAR2 & 0.132\tnote{***} & 0.131\tnote{***} & 0.131\tnote{***} & 0.132\tnote{***} \\
& {(20.35)} & {(20.15)} & {(20.15)} & {(20.35)} \\
\midrule
Observations
& \multicolumn{1}{c}{\num{1315077}}
& \multicolumn{1}{c}{\num{1315077}}
& \multicolumn{1}{c}{\num{1315077}}
& \multicolumn{1}{c}{\num{1315077}} \\
Day FE & {No} & {Yes} & {Yes} & {No} \\
Firm FE & {Yes} & {No} & {Yes} & {No} \\
Firm-Quarter FE & {No} & {No} & {No} & {Yes} \\
Adj. R-Sq{\super2} & 0.045 & 0.027 & 0.046 & 0.044 \\
\bottomrule
\end{tabular}
\par\(t\) statistics in parentheses
\par\tnote{*} \(p < 0.10\),\quad\tnote{**} \(p < 0.05\),\quad\tnote{***} \(p < 0.01\)
\end{threeparttable}
\end{table}
\end{document}
EDIT. I also enclosed statistics in{...} because siunitx does not recognised brackets as part of a number.
I want to put a table and figure above/below one another in my article tex file as they are related. Until now it has worked in this document but suddenly it isn't working and I can't compile in Overleaf. Please help.
\begin{document}
\begin{minipage}[b]{1\textwidth}
\centering
\captionof{table}{Best Case Scenario A IC values when synthesis, desiccation (and algae collection) have been excluded from the system.}
\label{tab:BestA_synthANDdesiccation_excluded}
\begin{tabular}{#{}llcc#{}}
\toprule
IC & Unit & Total (no collection) & Total (with collection) \\ \midrule
CC & kg CO2 eq & -1.1E+03 & -7.0E+02 \\
Ecotox & CTUe & 2.1E+02 & 1.4E+04 \\
HTnc & CTUh & 6.9E-08 & 1.4E-05 \\
PM & disease inc. & 3.7E-07 & 1.0E-05 \\
RUf & MJ & 9.3E+01 & 5.6E+03 \\
RUm & kg Sb eq & 8.0E-06 & 3.6E-02 \\ \bottomrule
\end{tabular}
\end{minipage}
\begin{minipage}
\includegraphics[width=1\textwidth]{Pictures/A_best_nosynANDnodesiccationANDnocollection.png}
\captionof{figure}{Characterisation of the sub-systems in best-case scenario A when synthesis, desiccation and algae collection have been excluded from the system boundaries. Method: EF 3.0 Method (adapted) V1.00}
\label{fig:Abest_nosyn_nodesiccation}
\end{minipage}
\end{document}
The main problem is that the minipage has an mandatory argument to specify the width, so you'll need
\begin{minipage}{\linewidth}
Some other comments:
best not specify a file type for your image \includegraphics[width=1\textwidth]{Pictures/A_best_nosynANDnodesiccationANDnocollection}. If you have the same image in different formats latex will then include the one best suited for the engine you use to compile your document
Unless your minipage is in a float environment like figure or table you want to add \noindent before the minipage. Without this there is not enough space in your line to fit a minipage with \textwidth
if you want to have the numbers in your table nicely aligned, have a look at the siunitx package
\documentclass{article}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{graphicx}
\begin{document}
\noindent%
\begin{minipage}[b]{1\textwidth}
\centering
\captionof{table}{Best Case Scenario A IC values when synthesis, desiccation (and algae collection) have been excluded from the system.}
\label{tab:BestA_synthANDdesiccation_excluded}
\begin{tabular}{#{}llcc#{}}
\toprule
IC & Unit & Total (no collection) & Total (with collection) \\ \midrule
CC & kg CO2 eq & -1.1E+03 & -7.0E+02 \\
Ecotox & CTUe & 2.1E+02 & 1.4E+04 \\
HTnc & CTUh & 6.9E-08 & 1.4E-05 \\
PM & disease inc. & 3.7E-07 & 1.0E-05 \\
RUf & MJ & 9.3E+01 & 5.6E+03 \\
RUm & kg Sb eq & 8.0E-06 & 3.6E-02 \\ \bottomrule
\end{tabular}
\end{minipage}
\begin{minipage}{\linewidth}
\includegraphics[width=1\textwidth]{example-image-duck}
\captionof{figure}{Characterisation of the sub-systems in best-case scenario A when synthesis, desiccation and algae collection have been excluded from the system boundaries. Method: EF 3.0 Method (adapted) V1.00}
\label{fig:Abest_nosyn_nodesiccation}
\end{minipage}
\end{document}
I am new to LaTeX and I want to create a quite simple table (in german). As you can see in my code, it has to contain 5 rows and 5 columns. My problem is that the table is too large for my page and it overflows on the right side of the page. I don't want to rotate the table, so it should use hyphenation to use the given space better.
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[a4paper,lmargin={3cm},rmargin={2cm},
tmargin={2cm},bmargin = {2cm}]{geometry}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{mathptmx}
\usepackage{booktabs}
\MakeOuterQuote{"}
\linespread{1.5}
\begin{document}
\end{document}
\begin{table}[h]
\centering
\caption{Übersicht aller Umfragen zur Landtagswahl in Sachsen-Anhalt im April/Mai 2021.}
\begin{tabular}{l l l l l}
\toprule
Durchgeführt von:
& Erhebungszeitraum
& Datum der Veröffentlichung
& Erhebungsmethode(n)
& Veröffentlicht von:\\
\midrule
infratest dimap
& 16. – 21.April 2021
& 23.April 2021
& zufallsbasierte Telefon- und Onlineinterviews
& mrd.de \\
Forsa
& 20. – 27.April 2021
& 29.April 2021
& k.A.
& welt.de \\
Insa
& 17. – 23.Mai 2021
& 26.Mai 2021
& k.A.
& bild.de \\
infratest dimap
& 25. – 26.Mai 2021
& 27. Mai 2021
& zufallsbasierte Telefon- und Onlineinterviews
& tagesschau.de \\
Mannheimer Forschungsgruppe Wahlen
& 25. – 27.Mai 2021
& 28.Mai 2021
& zufallsbasierte Telefoninterviews
& zdf.de \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
I think a similar problem is described here, but to be honest; my table is much simpler (no multicolumns and no math-symbols), so I have some problems to find the right code to solve my problem.
Thank you very much for reading my question! :)
To get line breaks you'll need a column type of fixed with, e.g. p{<some width>} or you can use the tabularx package to automatically determine the width of the columns.
However even with line breaks, the table will still look awfully crowded. You can safe a bit more space by giving the months as numbers instead of words and adding #{} before/after the first/last column.
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[a4paper,lmargin={3cm},rmargin={2cm},
tmargin={2cm},bmargin = {2cm}]{geometry}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{mathptmx}
\usepackage{booktabs}
\usepackage{tabularx}
\MakeOuterQuote{"}
\linespread{1.5}
\begin{document}
\begin{table}[h]
\centering
\caption{Übersicht aller Umfragen zur Landtagswahl in Sachsen-Anhalt im April/Mai 2021.}
\begin{tabularx}{\linewidth}{#{} *5{>{\raggedright\arraybackslash}X} #{}}
\toprule
Durchgeführt von:
& Erhebungs\-zeitraum
& Datum der Veröffentlichung
& Erhebungs\-methode(n)
& Veröffentlicht von:\\
\midrule
infratest dimap
& 16. – 21.4.2021
& 23.4.2021
& zufallsbasierte Telefon- und Onlineinterviews
& mrd.de \\
Forsa
& 20.–27.4.2021
& 29.4.2021
& k.A.
& welt.de \\
Insa
& 17.–23.5.2021
& 26.5.2021
& k.A.
& bild.de \\
infratest dimap
& 25.–26.5.2021
& 27.5.2021
& zufallsbasierte Telefon- und Onlineinterviews
& tagesschau.de \\
Mannheimer Forschungsgruppe Wahlen
& 25.–27.5.2021
& 28.5.2021
& zufallsbasierte Telefoninterviews
& zdf.de \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}