# Table with Text and Numbers

I am making a table with text but not able to produce it in the right form.

A minimal working example is given below.

      \documentclass[12pt, a4paper, twoside]{article}
\usepackage{titlesec}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage[latin9]{inputenc}
\usepackage[english]{babel}
\usepackage{float}
\usepackage{url}
\usepackage{setspace}
\onehalfspacing
\usepackage{titlesec}
\usepackage{tabulary}
\usepackage[para]{threeparttable}
\usepackage{array,booktabs,longtable,tabularx}
\setlength{\LTcapwidth}{7in}
\usepackage[flushleft]{threeparttablex}
\usepackage{pdflscape}
\usepackage{amssymb}
\usepackage{multirow}
\begin{document}
Some text in the main section
\begin{table}[htbp]
\centering
\caption{Asset Details}
\begin{tabulary}{\columnwidth}{p{6cm}p{2cm}
\toprule
\textbf{Item} & \textbf{Factor} \\
\midrule
\multicolumn{2}{c}{\textbf{Details }} \\
\midrule
\textbf{A. Level 1 } &  \\
\midrule
All the assets held by the bank  & \multirow{4}[2]{*}{100\%} \\
Some of important assets held by the bank.  &  \\
Some other text will be added here. This text can be long as well.  &  \\
More Text &  \\
\midrule
\multicolumn{1}{l}{\textbf{Level 2}} &  \\
\midrule
\textbf{Level 2A assets} &  \\
\midrule
Some 2A Assets  & \multirow{3}[2]{*}{85\%} \\
Bank Debt &  \\
\textit{\textbf{Some more text }} &  \\
\midrule
\textbf{Level 2B assets (maximum of 15\% of HQLA)} &  \\
\midrule
\textit{\textbf{Assets of High Quality}} & 75\% \\
Assets of Lower Quality  & 50\% \\
Assets of Lower Quality  & 50\% \\
\bottomrule
\end{tabulary}%
\label{tab:asset}%
\end{table}%
\end{document}


The actual table should look like this. Any help will be appreciated.

• What are you trying to obtain? – Bernard Nov 15 '16 at 12:43
• @AhmedArif: 'working' means the document can be processes without errors by LaTeX. Your document can't. For example the \begin{tabulary}{\columnwith}{p{6cm}p{2cm} line has two errors. \columnwith must be \columnwidth and there is a missing }. Also you use multirow without loading the package. Please check the document before posting it. And then you don't tell us what the right form is. How should we know? – Pieter van Oostrum Nov 15 '16 at 12:45
• @Bernard and Piet Van Oostrum, I have edited the codes and added the desired form of the Table. – Ahmed Arif Nov 15 '16 at 13:50
• @PietvanOostrum I have also added the relevant package. – Ahmed Arif Nov 15 '16 at 13:55

Maybe this looks like what you want?

\documentclass[12pt, a4paper, twoside]{article}
\usepackage{titlesec}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage[latin9]{inputenc}
\usepackage[english]{babel}
\usepackage{float}
\usepackage{url}
\usepackage{setspace}
\onehalfspacing
\usepackage{titlesec}
\usepackage{tabulary}
\usepackage[para]{threeparttable}
\usepackage{array,booktabs,longtable,tabularx}
\setlength{\LTcapwidth}{7in}
\usepackage[flushleft]{threeparttablex}
\usepackage{pdflscape}
\usepackage{amssymb}
\usepackage{multirow}
\begin{document}
Some text in the main section
\begin{table}[htbp]
\centering
\caption{Asset Details}
\begin{tabulary}{\linewidth}{Jc}
\toprule
\textbf{Item} & \textbf{Factor} \\
\multicolumn{2}{c}{\textbf{Details }} \\
\midrule
\textbf{A. Level 1 } & \\
\midrule
All the assets held by the bank & \multirow{4}[2]{*}{100\,\%} \\
Some of important assets held by the bank. \\
Some other text will be added here. This text can be long as well. \\
More Text \\
\midrule
\multicolumn{1}{l}{\textbf{Level 2}} \\
\textbf{Level 2A assets} & \\
\midrule
Some 2A Assets & \multirow{3}[2]{*}{85\,\%} \\
Bank Debt \\
\textit{\textbf{Some more text }} \\
\midrule
\textbf{Level 2B assets (maximum of 15\,\% of HQLA)} & \\
\midrule
\textit{\textbf{Assets of High Quality}} & 75\,\% \\
Assets of Lower Quality & 50\,\% \\
Assets of Lower Quality & 50\,\% \\
\bottomrule
\end{tabulary}%
\label{tab:asset}%
\end{table}%

\end{document}


Comment aside: package times is totally deprecated. Use newtxtext and newtxmath instead.

• Did you apply fixes beyond the ones I suggested in my answer? Just curious. – Mico Nov 15 '16 at 14:51
• @Mico: I suppose so since I copied the OP's code (fixed, he said) and some others – a missing closing brace in the table preamble, which I finally replaced, as you can see (no tabulary column type in the preamble!) – Bernard Nov 15 '16 at 15:06
• Thanks. I hadn't noticed you're no longer using tabulary... – Mico Nov 15 '16 at 15:07
• ào: ?? I'm using it on the contrary (J type). I meant the O.P. declared a tabulary environment but did not use any of its column types. But maybe did I misuse it? I'm not very familiar with this package. – Bernard Nov 15 '16 at 15:12

There are (at least) three errors in your code:

• You need to load the multirow package in the preamble, via \usepackage{multirow}.

• The code snippet

\begin{tabulary}{\columnwith}{p{6cm}p{2cm}


should be

\begin{tabulary}{\columnwidth}{p{6cm}p{2cm}}


Note the spelling of "columnwidth" and the addition of a closing curly brace.

\end document

\end{document}