1

i want to include an overview of several molecules and their names in my thesis. I need a long table as there are qute a few of them. Problem is that the Tikz drawn by chemfig allign and there is no space between the molecules (see MWE). I tried \renewcommand{\arraystretch}{3.0} but apperentyl it has no influence on my row space. I also found this Vertical alignment in tables containing chemfig figures, however the midrule always creates vertical brs for me and i dont want that in my table. Any help or recommodation is appreciated

  \documentclass{article}
  %%%%%%%%%%%%%%%%%% From my University Template
\usepackage{array} 
\usepackage{booktabs}
\usepackage{threeparttable} %makes your tables look nicer, see example
\usepackage{dcolumn} %decimal alignment of tables
    \newcolumntype{d}{D{.}{.}{-1}} % centers the decimal points in column
    \newcolumntype{s}{D{.}{.}{2}} % optimized for 2 decimal points
%%%%%%%%%%%%%%%%%%%%

 \usepackage{multirow}  
 \usepackage{chemfig}
 \usepackage{tikz}
 %Longtable
 \usepackage{tabularx}
 \usepackage{ltablex} 
 \usepackage{longtable}





 \begin{document}



 \begingroup
 \renewcommand{\arraystretch}{3.0}
 \begin{longtable}{ m{.30\textwidth} m{.70\textwidth} }
 \caption{Your caption here} 
  \label{tab:myfirstlongtable} \\
  Molecule Name & Molecule Structure \\
  \hline
  \endhead 

  Benzene & \chemfig{*6(=-=-=-)}    \\

  n-Butylbenzene & \chemfig{*6(=-=( -[:30]-[:330]-[:30]-[:330])-=-)} \\



  \bottomrule
   \end{longtable}
   \endgroup

   \end{document}

1 Answer 1

1

Play with the optional argument of \addlinespace:

 \documentclass{article}
  %%%%%%%%%%%%%%%%%% From my University Template
\usepackage{array}
\usepackage{booktabs}
\usepackage{threeparttable} %makes your tables look nicer, see example
\usepackage{dcolumn} %decimal alignment of tables
    \newcolumntype{d}{D{.}{.}{-1}} % centers the decimal points in column
    \newcolumntype{s}{D{.}{.}{2}} % optimized for 2 decimal points
%%%%%%%%%%%%%%%%%%%%

 \usepackage{multirow}
 \usepackage{chemfig}
 \usepackage{tikz}
 %Longtable
 \usepackage{ltablexl}

 \begin{document}

 \begin{longtable}{ m{.30\textwidth} m{.70\textwidth}}
 \caption{Your caption here}
  \label{tab:myfirstlongtable} \\
  Molecule Name & Molecule Structure \\
  \midrule
  \endhead
\addlinespace
  Benzene & \chemfig{*6(=-=-=-)} \\
\addlinespace[2ex]
  n-Butylbenzene & \chemfig{*6(=-=( -[:30]-[:330]-[:30]-[:330])-=-)} \\
\addlinespace
  \bottomrule
   \end{longtable}

   \end{document} 

enter image description here

2
  • looks, good however any explanation why arraystretch is not working? I am just curious... Jun 13, 2017 at 8:09
  • The value 3 is not enough, due to the height of the chemfigures. By trial and error, 4.5 works, but it has two drawbacks: it stretches every row, even those which don't require it, and it is asymmetrical between top and bottom of rows.
    – Bernard
    Jun 13, 2017 at 8:19

You must log in to answer this question.

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