Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to make a table with both left and right alignments. Now I can get the view like this enter image description here

The first problem is with the left alignment - there is a space between left side and tabular with two items.

The second problem is that I have to set width of parboxes manually. Isn't the way to automate that by the width of title? Maybe parboxes is not the best way for wrapping lines in tables?

My code:

\documentclass{article}

\usepackage{multicol}
\usepackage{makecell}
\usepackage{pbox}
\usepackage{array}
\usepackage{amsmath}

\begin{document}

    \begin{tabular}{l}

        {\Huge Some title text is written here...} \\
        \Xhline{1.5mm}
        \parbox{11.1cm}{
        \begin{multicols}{2} 
        \renewcommand{\arraystretch}{2}     
        \begin{tabular}{|c|c|}
                \hline
                 $\boldsymbol{\bigotimes}$  & {\large this is an example} \\
                 \hline
        \end{tabular} \\
        Lorem ipsum dolor sit amet, consectetur adipisicing elit
        \end{multicols}
        } \\

        \renewcommand{\arraystretch}{2}
        \begin{tabular}{|c|cll|}
            \hline
            $\bigcirc$ & 1 & First item & 
                \pbox{7.3cm}{Sed ut perspiciatis unde 
                omnis iste natus error sit voluptatem 
                accusantium doloremque laudantium} \\
            \hline
            $\bigcirc$ & 2 & Second item & Some definition. \\  
            \hline          
        \end{tabular}   
    \end{tabular}
    \end{document}
share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

The multiple nested tabulars and parboxes complicate the input, I think you can use a much simpler scheme, something like this:

enter image description here

\documentclass{article}

\usepackage{tabularx}
\usepackage{amsmath}

\setlength\extrarowheight{3pt}

\begin{document}

\noindent


 {\Huge \strut Some title text is written here...\par}
 \hrule height 3pt

\smallskip

\noindent
\begin{tabularx}{\textwidth}{|l|l|X}
        \cline{1-2}
                 $\boldsymbol{\bigotimes}$  &
       \large this is an example & 
  Lorem ipsum dolor sit amet, consectetur adipisicing elit\\
        \cline{1-2}
\end{tabularx}
\smallskip

\noindent
\begin{tabularx}{\textwidth}{|l|llX|}
\hline
            $\bigcirc$ & 1 & First item & 
             Sed ut perspiciatis unde 
                omnis iste natus error sit voluptatem 
                accusantium doloremque laudantium \\
            \hline
            $\bigcirc$ & 2 & Second item & Some definition. \\  
            \hline          
\end{tabularx}   
    \end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.