2

How to achieve Decimal alignment as well auto fit table in tabulary package, below is my code, or is there any other way to achieve both, please guide,

\documentclass{article}

\renewcommand{\arraystretch}{1.5}

\usepackage{tabulary}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\begin{document}



\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\begin{center}
\begin{tabulary}{0.9\textwidth}{LLCL}
\hline
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\hline
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\hline
\end{tabulary}
\end{center}
\end{table}



\end{document}
2

Just use an aligned column, as normal:

enter image description here

\documentclass{article}

\renewcommand{\arraystretch}{1.5}

\usepackage{tabulary}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\usepackage{dcolumn}

\begin{document}



\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\centering
\begin{tabulary}{0.9\textwidth}{LD..{1.2}CL}
\hline
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\hline
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\hline
\end{tabulary}

\end{table}
2

There's no requirement that all columns should be LCR:

\documentclass{article}

\usepackage{tabulary,siunitx}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\begin{document}

\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\medskip
\centering
\begin{tabulary}{0.9\textwidth}{LS[table-format=1.3]CL}
\hline
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\hline
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\hline
\end{tabulary}
\end{table}

\end{document}

enter image description here

I removed the setting to \arraystretch. If you want a better layout, use booktabs.

\documentclass{article}

\usepackage{tabulary,siunitx,booktabs}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\begin{document}

\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\medskip
\centering
\begin{tabulary}{0.9\textwidth}{LS[table-format=1.3]CL}
\toprule
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\midrule
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
\addlinespace
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\bottomrule
\end{tabulary}
\end{table}

\end{document}

enter image description here

You can also use dcolumn, instead of siunitx (but I recommend updating your TeX distribution anyway).

\documentclass{article}

\usepackage{tabulary,dcolumn,booktabs}

\usepackage{showframe}

\usepackage[newcommands]{ragged2e}

\begin{document}

\begin{table}
\caption{Sample Table 1 }\label{table_specrot}
\medskip
\centering
\begin{tabulary}{0.9\textwidth}{LD{.}{.}{1.3}CL}
\toprule
Definition and Validation of Dynamic Video Reframing based on &1.1 & Definition and Validation of & Definition and Validation of Dynamic \\
\midrule
Definition and Validation of Dynamic Video Reframing based on &1.441 & Definition and Validation of & Definition and Validation of Dynamic \\
\addlinespace
Definition and Validation of Dynamic &1.2 & Definition and Validation of  & Definition and Validation of \\
\bottomrule
\end{tabulary}
\end{table}

\end{document}
  • 1
    Thanks for your answer, i am getting some expl13.sty error, we are using Miktex 2.7 version, will it work there?? – user52124 Jul 13 '16 at 12:19
  • 1
    @user52124 Surely not: MiKTeX is currently at version 2.9. I added a version using dcolumn. But update your TeX system nonetheless. – egreg Jul 13 '16 at 12:22
  • Thanks a lot Mate for your help, very soon i have to upgrade my Tex system :-) – user52124 Jul 14 '16 at 4:06
  • Is it possible to have Auto Continuation of Table like we have in longtable combined with tabulary, dcolumn packages?? – user52124 Jul 14 '16 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.