1

I want to align the bullet item text to the top of the cell. How can i do that? This is the tex syntax :

\begin{sidewaystable}
    \begin{tabular}[t]{p{0.1\textwidth}p{0.2\textwidth}p{0.3\textwidth}p{0.3\textwidth}}
        \hline
        \toprule[0.05em]
        Category & Methods & Advantages & Disadvantanges \\ 
        \hline
 
        Conventional HE
        & Gonzalez
        & \begin{itemize}[noitemsep,topsep=0pt]
            \item Improve the contrast.
            \item Simple and no parameter tuning required.
        \end{itemize}
         
        & \begin{itemize}[noitemsep,topsep=0pt]
            \item Unable to adjust the degree of enhancement.
            \item Often produce unwanted visual artifacts.
            \item Produce unnatural image appearance, such as the mean brightness of image is 
                  different between the original image and enhanced image. 
        
        \end{itemize} \\
     \addlinespace
        
        Local-based HE
        & \begin{itemize}[noitemsep,topsep=0pt] 
          \item AHE 
          \item CLAHE 
          \item CEDHE 
        \end{itemize}
    
        & \begin{itemize}[noitemsep,topsep=0pt]
            \item Can preserve the details
          \end{itemize}
        
        & \begin{itemize}[noitemsep,topsep=0pt]
            \item Increase computational time and complexity
            \item Might caused overenhancement and blocking effect  
        \end{itemize}   \\
        \addlinespace
                
 \hline
 
\end{tabular}
\end{sidewaystable} 

The result from the above code is as below figure : enter image description here

I want to align the text with the bullet to the top of the cell.

Thanks

New contributor
Hidayah is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • 1
    Welcome to TeX SX! Try using \begin{itemize}[nosep].
    – Bernard
    Nov 25 at 10:55
  • Thank You Bernard. I have tried but nothing change
    – Hidayah
    Nov 26 at 2:06
1

Since you're making use of the enumitem package, I'd like to suggest that you employ that package's \newlist and \setlist macros to create a bespoke itemize-like environment that is automatically (a) embedded in a minipage environment (to remove the whitespace at the top and bottom) and (b) sets the options nosep and left=0pt (in order order to promote compactness of the lists).

Oh, and don't use \hline (or \cline) and instead exclusively use the line-drawing macros of the booktabs package -- \toprule, \midrule, \cmidrule, \bottomrule, and \addlinespace.

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{rotating,enumitem,booktabs,ragged2e}

\newlist{myitemize}{itemize}{1} % create a bespoke itemize-like env.
\setlist[myitemize,1]{label=\textbullet,nosep,left=0pt,
            before={\begin{minipage}[t]{\hsize}\RaggedRight},
            after ={\end{minipage}}}
\begin{document}

\begin{sidewaystable}
\centering
    \begin{tabular}{@{} p{0.14\textwidth}
                        p{0.16\textwidth}
                        p{0.3\textwidth}
                        p{0.3\textwidth} @{}}
        %%%%%\hline
        \toprule %[0.05em]
        
        Category & Methods & Advantages & Disadvantanges \\ 
        %%%%%\hline
        \midrule
 
        Conventional HE
        & Gonzalez
        & \begin{myitemize}
            \item Improve the contrast.
            \item Simple and no parameter tuning required.
        \end{myitemize}       
        & \begin{myitemize}
            \item Unable to adjust the degree of enhancement.
            \item Often produce unwanted visual artifacts.
            \item Produce unnatural image appearance, such as the  
                  mean brightness of image is different between 
                  the original image and enhanced image.       
        \end{myitemize} \\
        
        \addlinespace
        
        Local-based HE
        & \begin{myitemize} 
          \item AHE 
          \item CLAHE 
          \item CEDHE 
        \end{myitemize} 
        & \begin{myitemize}
            \item Can preserve the details
          \end{myitemize}   
        & \begin{myitemize}
            \item Increase computational time and complexity
            \item Might caused overenhancement and blocking effect  
        \end{myitemize} \\  
                     
        %%%%%\hline
        \bottomrule
    \end{tabular}
\end{sidewaystable} 

\end{document}
1
  • Thank you Mico. very much appreciated!
    – Hidayah
    Nov 26 at 2:06
0

I propose this simplified code, using the \compresscommand, which makes latex believe the start of a cell is the start of a minipage and thus suppresses all spacings above a list.

I also removed the horizontal spacing before bullets.

\documentclass{article}
\usepackage{array, rotating}
\usepackage{booktabs}
\usepackage{enumitem}
    \makeatletter
        \newcommand*{\compress}{\@minipagetrue}
    \makeatother

\begin{document}

\begin{sidewaystable}
\setlist[itemize]{left=0pt, nosep}
    \begin{tabular}[t]{p{0.1\textwidth}>{\compress}p{0.2\textwidth}>{\compress}p{0.3\textwidth}> {\compress}p{0.3\textwidth}}
        \hline
        \toprule[0.05em]
        Category & Methods & Advantages & Disadvantanges \\
        \midrule
        Conventional HE
        & Gonzalez
        & \begin{itemize}
            \item Improve the contrast.
            \item Simple and no parameter tuning required.
        \end{itemize}

        & \begin{itemize}
            \item Unable to adjust the degree of enhancement.
            \item Often produce unwanted visual artifacts.
            \item Produce unnatural image appearance, such as the mean brightness of image is
                  different between the original image and enhanced image.
        \end{itemize} \\
     \addlinespace

        Local-based HE
        & \begin{itemize}
          \item AHE
          \item CLAHE
          \item CEDHE
        \end{itemize}

        & \begin{itemize}
            \item Can preserve the details
          \end{itemize}

        & \begin{itemize}
            \item Increase computational time and complexity
            \item Might caused overenhancement and blocking effect
        \end{itemize} \\
        \bottomrule
\end{tabular}
\end{sidewaystable}

\end{document} 

enter image description here

Your Answer

Hidayah is a new contributor. Be nice, and check out our Code of Conduct.

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.