Control line space between an itemize list and next line

I am unable to control the line spacing between the last line of itemize and the next line as shown in the figure. Can someone suggest a solution to fix this please? I also would like to know if I can get more compact list.

\documentclass[10pt,a4paper,oneside]{article}
\usepackage[a4paper,left=0.9in,right=0.9in,top=1in,bottom=1in]{geometry}
\usepackage{longtable}
\usepackage{enumitem}

\renewcommand{\familydefault}{\sfdefault}

\begin{document}

\scriptsize
\begin{minipage}[t]{0.5\textwidth}
\begin{longtable}[t]{|p{1.0cm}|p{5.5cm}|}
\hline
\texttt{A} & Department
\begin{itemize} \setlength{\itemsep}{0pt}
\item \texttt{A} - Apple
\item \texttt{B} - Boy
\item \texttt{C} - Cat
\item \texttt{D} - Dog
\end{itemize}\\
\texttt{E} &  Elephant \\
\texttt{F} &  Fan \\
\hline
\end{longtable}
\end{minipage}%

\end{document}


• Have a look at this question, maybe that helps. BTW, why do you put longtable inside a minipage? Aug 27 '16 at 17:11
• I'm genuinely a little confused about how you got that output when you have $ and $ instead of [ and ], e.g. \documentclass$10pt,a4paper,oneside${article}. I mean, I'm assuming you must have generated your output with a totally different file, but if so, what happened between creating that file and writing this question :S :S Also \end{document} shouldn't have a ] after it Aug 27 '16 at 17:41
• There were characters that got I added when I was dragging the image. Had to redo it but I missed some of these weird symbols. Aug 27 '16 at 17:45

Two variations on the layout. I reduced the indent of the list and the vertical spacing w.r.t. the surrounding text.

Note an optional argument to a command or an environment, has be delimited by a pair of brackets ([option]), not between a pair of bracket commands ($option$). Also font commands such as \bf have been deprecated for more than 20 years. Use the \textbf{…} command instead or the \bfseries switch.

Last, not least, as @Zarko pointed, a long table is made to break across pages, and a minipage cannot. You can use the multicols environment instead.

\documentclass[10pt,a4paper,oneside]{article}
\usepackage[a4paper,hmargin=0.9in, vmargin=1in]{geometry}
\usepackage{longtable}
\usepackage{enumitem}

\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\scriptsize
\begin{minipage}[t]{0.5\textwidth}
\renewcommand\arraystretch{1.33}
\begin{longtable}[t]{|p{1.0cm}|p{5.5cm}|}
\hline
\texttt{A} & Department
\begin{itemize}[wide = 0.5em, nosep, after=\vspace{-\baselineskip}]
\item \texttt{A} - Apple
\item \texttt{B} - Boy
\item \texttt{C} - Cat
\item \texttt{D} - Dog
\end{itemize}\\
\texttt{E} & Elephant \\
\texttt{F} & Fan \\
\hline
\end{longtable}
\end{minipage}%

\begin{minipage}[t]{0.5\textwidth}
\renewcommand\arraystretch{1.33}
\begin{longtable}[t]{|c|p{5.5cm}|}
\hline
\texttt{A} & Department
\begin{itemize}[wide = 0.5em, nosep, after=\vspace{-\baselineskip}]
\item \texttt{A} - Apple
\item \texttt{B} - Boy
\item \texttt{C} - Cat
\item \texttt{D} - Dog
\end{itemize}\\
\texttt{E} & Elephant \\
\texttt{F} & Fan \\
\hline
\end{longtable}
\end{minipage}%
\end{document}


• The table environment longatble suppose to be over many pages .. so put it in minipage hasn't sense. Aug 27 '16 at 18:05
• @zarko, I am new a newbie in the land of latex and trying to reuse some working parts to get job done within deadline. No philosophical reason, only desperation! Aug 27 '16 at 18:12
• @Zarko: Perfectly right. I'll add it to the answer. Aug 27 '16 at 18:24

If you load the enumitem package, then you can set options for lists (single or multiple of them), including the command you need which is after=. For example, if you write after=\vspace{\baselineskip}, that's what will happen after the list.

If you want a more compact list, you can also use negative values, like itemsep=-1mm. In any case, check how I used these commands, because the way you used is not the standard one. To align the longtable to the left, add the optional argument [l].

Also, make sure you check your code, you have a lot of  where they shouldn't be, maybe a result of search and replace.

Code

\documentclass[10pt,a4paper,oneside]{article}
\usepackage[a4paper,left=0.9in,right=0.9in,top=1in,bottom=1in]{geometry}
\usepackage{longtable}
\usepackage{enumitem}

\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\scriptsize
%\begin{minipage}[t]{0.5\textwidth}
\begin{longtable}[l]{|p{1.0cm}|p{5.5cm}|}
\hline
\texttt{A} & Department
\begin{itemize}[itemsep=0pt, after=\vspace{-1ex}]
\item \texttt{A} - Apple
\item \texttt{B} - Boy
\item \texttt{C} - Cat
\item \texttt{D} - Dog
\end{itemize}\\
\texttt{E} &  Elephant \\
\texttt{F} &  Fan \\
\hline
\end{longtable}
%\end{minipage}%
\end{document}

• In answer you also should emphasize, that OP wrongly use options of packages and environments. Instead in [... ] he/she put them in math environment $...$ ... Given MWE is not possible to compile. Aug 27 '16 at 17:17
• @Zarko Ah yes, I did notice that. Aug 27 '16 at 17:18
• The weird characters got inserted while I was trying to upload picture. It was a working example. Sorry about that. :( Aug 27 '16 at 18:05

I do not know what is requestes behind of this table design, however, I will design as follows:

\documentclass[10pt,a4paper,oneside]{article}
\usepackage[a4paper,hmargin=0.9in, vmargin=1in]{geometry}
\usepackage{tabularx}
\usepackage{enumitem}

\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\renewcommand\arraystretch{1.2}
\begin{tabularx}{0.5\textwidth}{|>{\ttfamily}c|>{\ttfamily}X|}
\hline
A & Department
\begin{itemize}[wide = 0.5em, nosep, after=\vspace{-\baselineskip}]
\item A - Apple
\item B - Boy
\item C - Cat
\item D - Dog
\end{itemize}\\
E & Elephant \\
F & Fan \\
\hline
\end{tabularx}
\end{document}


i.e. without minipages, with use of tabularx, which span table to desired width and define font family in column options. This make code more concise and less prone for errors. Above MWE gives:

Addendum: If you for columns head use thead macro from makecell package, you can obtain:

The needed changes of above MWE are:

\usepackage{makecell,tabularx}
\usepackage{enumitem}

\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\renewcommand\arraystretch{1.2}
\begin{tabularx}{0.5\textwidth}{|>{\ttfamily}c|>{\ttfamily}X|}
\hline

• Maybe a twocolumns{2} environment, if there must be text next to the table? Aug 27 '16 at 18:22