I have a word document containing tables. The columns have different column width. Attached here.
I want to translate the word table into LaTex. The new table in LaTeX looks quite bad. The alignment of text are bad. In addition, I am getting warning from Overleaf as 'Overfull' \hbox. I'm not sure why am I getting warning regarding the width of the table.
The new table is here.
\documentclass[a4paper,landscape]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[nottoc]{tocbibind}
\usepackage[margin=24mm,
bottom= 5mm,%
footskip=4\baselineskip,
includefoot,
% showframe
]{geometry}
\usepackage{tikz}
\usetikzlibrary{backgrounds, positioning, scopes}
\tikzset{FOOT/.style = {
every node/.append style = {font=\sffamily\bfseries,
text=white,
align=center,
minimum height=15mm,
outer sep=0pt,
},
sx/.style = {xshift=##1mm}
}
}
\usepackage{color,soul}
\usepackage[usestackEOL]{stackengine}
\usepackage{caption}
\usepackage{placeins}
\usepackage{subcaption}
\usepackage{tcolorbox}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{csquotes}
\usepackage[normalem]{ulem}
\usepackage{multirow}
% To add URL of website
\usepackage{url}
% Set line spacing using the following package
\usepackage{setspace}
\usepackage{lastpage}
%% Useful packages
\usepackage{amsmath}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{2pt}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\definecolor{darkgoldenrod}{rgb}{0.72, 0.53, 0.04}
\usepackage{cleveref}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
% \fancyhead{} % clear all header fields
\fancyhead[RO]{Development Action Plan}
\fancyfoot{} % clear all footer fields
%%========================= Footer template ============================
\fancyfoot[O]{% odd pages
\begin{tikzpicture}[FOOT,
remember picture, overlay,
node distance=0pt]
\node (O1) [minimum width=25mm,
above right=of current page.south west]
{};
\node (O2) [minimum width=0.5\textwidth, align=left,
right=of O1]
{ Continuing Professional Development\\
\footnotesize
January 2019};
\node (O3) [minimum width=0.5\textwidth,
align=center,
right=of O2]
{ LarCoS\\
\footnotesize
Membership no. 123456\qquad};
\node (O4) [minimum width=25mm, font=\sffamily\bfseries,
right=of O3]
{\thepage~of~\pageref*{LastPage}};
\begin{scope}[on background layer]
\fill[teal] (O1.south west) |- ([sx= 3] O3.north east)
-- ([sx=-3] O3.south east)
-- cycle;
\fill[black] ([sx=-3] O2.south east) -- ([sx= 3] O2.north east) -|
(O4.south east) -- cycle;
\path[white, line width=1mm, shorten >=-0.5mm, shorten < =-0.5mm]
([sx=-3] O2.south east) edge ([sx=3] O2.north east)
([sx=-3] O4.south west) edge ([sx=3] O4.north west);
\end{scope}
\end{tikzpicture}
} %odd page
%%%%==========================================
%%========================= Footer template ============================
\begin{document}
\begin{table}[tbh]
\begin{tabular}{|C{0.75cm}|C{0.7cm}|L{3cm}|L{3.25cm}|L{3cm}|L{2.7cm}|L{3cm}|L{2.45cm}|L{2.1cm}|}
\hline
\multicolumn{9}{|l|}{\textbf{Job role and responsibilities:}} \\ \hline
\multicolumn{5}{|c|}{\textbf{Review of learning needs}} & \multicolumn{4}{c|}{\textbf{Development plan}}\\ \hline
\textbf{Date} & \textbf{Ref} & \textbf{\begin{tabular}[c]{@{}l@{}}In what area do \\ I need to improve \\ my performance?\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}How does this link\\ to other objectives\\ (eg employer, ICE,\\ etc)?\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}What do I need\\ to learn in\\ order to \\ achieve this?\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}What will I do\\ to achieve this?\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}What are the \\ likely resources \\ and support \\ that I will need?\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}How will I\\ evaluate a\\ successful \\ outcome?\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}What are\\ my \\ deadlines \\for meeting \\this target?\end{tabular}} \\ \hline
Jul 2006 & RB-DAP-01 &~Understanding structural steel detail drawings and preparing design drawing using AutoCAD~&~Knowledge of load transfer thorough proper detailing and to be represented in drawings & Several structural components and their behaviour under loading; for AutoCAD, needed to learn the commands & Rigorous study of design drawings and draw the details using AutoCAD & Drawings from previous projects and the software AutoCAD and its manuals & I shall be able to prepare structural detailing using AutoCAD & Sep 2006 \\ \hline
& & & & & & & & \\ \hline
& & & & & & & & \\ \hline
& & & & & & & & \\ \hline
\end{tabular}
\end{table}
\end{document}
Best Answer
like this?
(red lines indicate text area)
i reduce your mwe to the part concerning only table. for it i add three packages:
ragged2e
(for nicer hyphenation of text in table's cells)makecell
(for more vertical space around cells' contents) andtabularx
(for multi line cells with equal width):remarks:
\small
or evenfootnotesize
c
orl
)addendum: from your comment below can be understand, that your table will spam many (at least two) pages. in this case you need:
table
for usingtabularx
you should replace it (or just add) the packageltablex
, which combine properties of thelongtable
andtabularx
packagestabularx
features (which is slightly changed with theltablex
packagedefine the first and other table headers (if you like to repeat them on the each page), table foots and the last table foot (see mwe below)
note:
\begingroup
and\endgroup
is used for limiting some settings (font size, additional vertical space) of table only to this table