TransWikia.com

Finding it difficult to create a table in Authorea

TeX - LaTeX Asked by Mohanasundaram on March 15, 2021

I am new to LaTex and using Authorea for editing a script. When I create a table, I am getting the error. Authorea is displaying this table. However, I am unable to export it to PDF, as there is some error with the code. When I export the tex file and running it on Texmaker, I am getting the pdf. Can you help me on this error?

Sample Code:

begin{table*}
caption{label{tab:table1}Summary Table}
begin{center}
renewcommand{arraystretch}{0.7}
small
begin{tabular}{cccccc}
hline
Method & Head 1 & Head 2 & Head 3 & Head 4 & Head 5
midrule
multicolumn{6}{c}{textbf{Model: FF3F}}
midrule
multicolumn{6}{l}{textbf{alpha}}
Method A & -0.2703 & -0.00248 & 0.0490 & 0.1743 & 0.1921
Method A  & -0.2706 & -0.00215 & 0.0498 & -0.1726 & 0.1960
Method A  & -0.2706 & -0.00215 & 0.0497 & -0.1732 & 0.1948
hline
end{tabular}
end{center}
end{table*}

enter image description here

enter image description here

One Answer

Your code has error, as I already told you in the my second comment below question. alpha had to be in math environment. So I suspect that your editor has nothing with your error.

See, if the following MWE (Minimal Working Example) works at you:

documentclass[twocolumn]{article}
usepackage{bm}
usepackage{booktabs}
usepackage[skip=1ex]{caption}
usepackage{siunitx}
usepackage{lipsum}

begin{document}
    begin{table*}
caption{label{tab:table1}Summary Table}
    centering
    renewcommand{arraystretch}{0.8}
begin{tabular}{l   S[table-format=-1.4]
                    S[table-format=-1.5]
                    S[table-format= 1.4]
                    S[table-format=-1.4]
                    S[table-format= 1.4]
                }
    toprule
Method & {Head 1} & {Head 2} & {Head 3} & {Head} 4 & {Head} 5
    midrule
multicolumn{6}{c}{textbf{Model: FF3F}}
    midrule
multicolumn{6}{l}{$bm{alpha}$}
Method A  & -0.2703 & -0.00248 & 0.0490 &  0.1743 & 0.1921
Method A  & -0.2706 & -0.00215 & 0.0498 & -0.1726 & 0.1960
Method A  & -0.2706 & -0.00215 & 0.0497 & -0.1732 & 0.1948
    bottomrule
end{tabular}
    end{table*}
lipsumlipsum
end{document}

As you can see, I took some library in a wee bit rewrite your table code. For columns with numbers I use S column type defined in the siunitx package, then use normal font size and employ bm package for boldface math symbols.

enter image description here

Correct answer by Zarko on March 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP