0

Is there a way to fix the problem mentioned above, also I am using overleaf. I also have over 2000 lines of code for the document, is that a problem too

\begin{tabularx}{1.3\textwidth} { 
            | >{\centering\arraybackslash}X
            | >{\centering\arraybackslash}X | >{\centering\arraybackslash}X | >{\centering\arraybackslash}X |}
        \hline
        Touchscreen Type & Benefits & Drawbacks & Uses\\
        \hline
        Infrared Touchscreen (optical) \begin{itemize}[label=$\Rightarrow$]
        \item LEDs shine infrared light across a screen forming a matrix
        \item When the screen is touched the beams are interrupted
        \item The invisible beams that pass over the surface of the screen between LEDs on one side \& photocells on the other
        \end{itemize}
        Infrared Touchscreen (heat) \begin{itemize}[label=$\Rightarrow$]
            \item Use glass as the screen material
            \item Needs a warm object to carry an input operation
        \end{itemize}
        & \begin{itemize}[label=$\Rightarrow$]
            \item Both systems allow multi-touch capabilities
            \item The optical system allows the user of bare fingers \& gloved fingers
            \item Both systems have good screen durability - it takes a major impact to break the glass \end{itemize} & \begin{itemize}[label=$\Rightarrow$]
            \item It is relatively expensive
            \item Heat-sensitive system only allows bare fingers for input (gloved fingers/stylus does not work)
            \item Both systems are sometimes sensitive to light interference
            \item It is possible for accidental activation to take place if the infrared beams are disturbed in some way
            \item The screen can be sensitive to water or moisture
        \end{itemize}& \begin{itemize}[label=$\Rightarrow$]
            \item Tablets
            \item Laptops
            \item Smartphones
        \end{itemize}\\
        \hline
    \end{tabularx}
1
  • please make a small complete document that shows the problem, from your description it sounds like the table does not fit in the width allocated but you have given no indication of how big the table is (depends on fonts used) or how big the space is. A specification of \begin{tabularx}{1.3\textwidth} looks rather odd though: it is 30% larger than the available space so presumably always warns that it is over-full and sticking in to the right margin? Do not post your original document just a small 1-page document that indicates your problem, so people can test answers. Commented May 12 at 6:12

2 Answers 2

0

Welcome to TeX.SE!

to long for comment ...

  • you should provide a complete small document beginning with \docoumentclass{.,,} and end with \end{document}
  • your table is wider than text block, consequently it spill out of right page border
  • with your code sniped inserted in som standard article document` doesn't produce described problem.

Some off-topic suggestion:

  • structure of your table is a bit unusual. To me is unclear what table should tell to readers
  • lists in table are to sloppy. I would add options which better exploits column width
  • text between lists (in the first column} should be somehow emphasized the it can be more easy to distinguish from text in items
  • use \small font size for better filling columns
\documentclass{article}
\usepackage[margin=25mm]{geometry}
\usepackage{tabularx}
\usepackage{enumitem}
                
\begin{document}

\begin{table}
\small
\setlist[itemize]{nosep,
                  label=$\Rightarrow$,
                  leftmargin=*}

\begin{tabularx}{\textwidth}{| *{4}{>{\centering\arraybackslash}X|}}
    \hline
Touchscreen Type & Benefits & Drawbacks & Uses\\
    \hline
Infrared Touchscreen (optical)   
    \begin{itemize}
\item LEDs shine infrared light across a screen forming a matrix
\item When the screen is touched the beams are interrupted
\item The invisible beams that pass over the surface of the screen between LEDs on one side \& photocells on the other
    \end{itemize}
Infrared Touchscreen (heat) 
    \begin{itemize}
\item Use glass as the screen material
\item Needs a warm object to carry an input operation
    \end{itemize}
        &   \begin{itemize}
        \item Both systems allow multi-touch capabilities
        \item The optical system allows the user of bare fingers \& gloved fingers
        \item Both systems have good screen durability - it takes a major impact to break the glass \end{itemize} 
            &   \begin{itemize}
            \item It is relatively expensive
            \item Heat-sensitive system only allows bare fingers for input (gloved fingers/stylus does not work)
            \item Both systems are sometimes sensitive to light interference
            \item It is possible for accidental activation to take place if the infrared beams are disturbed in some way
            \item The screen can be sensitive to water or moisture
                \end{itemize}
                &   \begin{itemize}
                \item Tablets
                \item Laptops
                \item Smartphones
                    \end{itemize}\\
    \hline
\end{tabularx}
    \end{table}
\end{document}

enter image description here

As you can see, your code snipped doesn't produce any issues mentioned in your question. So, please privide a code example which reproduce your problem.

0

You can get the overspilling table to be centered with respect to the text block by hiding it in a box.

However, you should think again about whether a four-column table is appropriate: narrow columns make for difficult reading and there is no actual correspondence between the items in the four columns.

I propose a different layout (horizontal, rather than vertical).

\documentclass{article}
\usepackage{tabularx,enumitem,booktabs}

\begin{document}

\begin{table}[p]

\makebox[\textwidth]{%
\begin{tabularx}{1.3\textwidth} { | *{4}{>{\raggedright\arraybackslash}X|} }
\hline
\multicolumn{1}{|c|}{Touchscreen Type} &
\multicolumn{1}{c|}{Benefits} &
\multicolumn{1}{c|}{Drawbacks} &
\multicolumn{1}{c|}{Uses} \\
\hline
Infrared Touchscreen (optical)
  \begin{itemize}[label=$\Rightarrow$,nosep]
    \item LEDs shine infrared light across a screen forming a matrix
    \item When the screen is touched the beams are interrupted
    \item The invisible beams that pass over the surface of the screen 
          between LEDs on one side \& photocells on the other
  \end{itemize}
  Infrared Touchscreen (heat)
  \begin{itemize}[label=$\Rightarrow$,nosep]
    \item Use glass as the screen material
    \item Needs a warm object to carry an input operation
  \end{itemize} &
  \begin{itemize}[label=$\Rightarrow$,nosep]
    \item Both systems allow multi-touch capabilities
    \item The optical system allows the user of bare fingers \& gloved fingers
    \item Both systems have good screen durability -- it takes a major impact
          to break the glass
  \end{itemize} &
  \begin{itemize}[label=$\Rightarrow$,nosep]
    \item It is relatively expensive
    \item Heat-sensitive system only allows bare fingers for input
          (gloved fingers/stylus does not work)
    \item Both systems are sometimes sensitive to light interference
    \item It is possible for accidental activation to take
          place if the infrared beams are disturbed in some way
    \item The screen can be sensitive to water or moisture
  \end{itemize} &
  \begin{itemize}[label=$\Rightarrow$,nosep]
    \item Tablets
    \item Laptops
    \item Smartphones
    \end{itemize} \\
\hline
\end{tabularx}%
}% end of \makebox

\caption{This isn't the best way to present the material}

\end{table}

\begin{table}[p]

\begin{tabular}{@{}p{\textwidth}@{}}
\toprule
\textbf{Touchscreen type}
  \begin{itemize}[nosep,leftmargin=*,parsep=1ex]
  \item Infrared Touchscreen (optical)
    \begin{itemize}[label=$\Rightarrow$,nosep]
      \item LEDs shine infrared light across a screen forming a matrix
      \item When the screen is touched the beams are interrupted
      \item The invisible beams that pass over the surface of the screen 
            between LEDs on one side \& photocells on the other
    \end{itemize}
  \item Infrared Touchscreen (heat)
    \begin{itemize}[label=$\Rightarrow$,nosep]
      \item Use glass as the screen material
      \item Needs a warm object to carry an input operation
    \end{itemize}
  \end{itemize}

\vspace{\topsep}

\textbf{Benefits}
  \begin{itemize}[label=$\Rightarrow$,nosep]
    \item Both systems allow multi-touch capabilities
    \item The optical system allows the user of bare fingers \& gloved fingers
    \item Both systems have good screen durability -- it takes a major impact
          to break the glass
  \end{itemize}

\vspace{\topsep}

\textbf{Drawbacks}
  \begin{itemize}[label=$\Rightarrow$,nosep]
    \item It is relatively expensive
    \item Heat-sensitive system only allows bare fingers for input
          (gloved fingers/stylus does not work)
    \item Both systems are sometimes sensitive to light interference
    \item It is possible for accidental activation to take
          place if the infrared beams are disturbed in some way
    \item The screen can be sensitive to water or moisture
  \end{itemize}

\vspace{\topsep}

\textbf{Uses}
  \begin{itemize}[label=$\Rightarrow$,nosep]
    \item Tablets
    \item Laptops
    \item Smartphones
    \end{itemize}
\\[-\normalbaselineskip]
\bottomrule
\end{tabular}

\caption{Isn't this better?}

\end{table}

\end{document}

The [p] option would be [htp] in your document; I used just [p] in order to show the two layouts side by side.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .