4

I am trying to do this

enter image description here

Using this code. It does not look good and also table tends to float and sometimes need to be broken. How can I do it in a better way? Here is my code:

        \documentclass[tikz,border=10pt]{standalone}
    \begin{document}
    \begin{table}[]
        \begin{tabular}{llllll}
            & Nearly &  & Sometimes &  & Rarely \\
            1. When I set a goal, I write it down.               &        &  &           &  &        \\ \cline{2-2} \cline{4-4}  \cline{6-6}
            2. I describe my goal in specific, measurable terms. &        &  &           &  &        \\ \cline{2-2} \cline{4-4}  \cline{6-6}
            3.                                                   &        &  &           &  &        \\ \cline{2-2} \cline{4-4}  \cline{6-6}
            4.                                                   &        &  &           &  &      \\  \cline{2-2} \cline{4-4}  \cline{6-6}
        \end{tabular}
    \end{table}
    \end{document}

OOzy Pal
  • 1,571

2 Answers2

6

Withtabularray and booktabs TblrLibrary:

\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\begin{document} \begin{table} \begin{tblr}{colspec={r X[2.5,l] X[c,b] X[c,b] X[c,b]}, rows={font=\linespread{0.84}\selectfont}, row{1}={font=\bfseries}, } & & {Nearly\ Always} & Sometimes & Rarely \

  1. & When I set a goal, I write it down.
    & & & \ \cmidrule[lr]{3-3} \cmidrule[lr]{4-4} \cmidrule[lr]{5-5}
  2. & I describe my goal in specific, measurable terms. & & & \
    \cmidrule[lr]{3-3} \cmidrule[lr]{4-4} \cmidrule[lr]{5-5}
  3. & I offten visualize my goals & & & \ \cmidrule[lr]{3-3} \cmidrule[lr]{4-4} \cmidrule[lr]{5-5}
  4. & My goals are achievable & & & \ \cmidrule[lr]{3-3} \cmidrule[lr]{4-4} \cmidrule[lr]{5-5}
  5. & I set realistic deadlines for completing my goals & & & \ \cmidrule[lr]{3-3} \cmidrule[lr]{4-4} \cmidrule[lr]{5-5}
  6. & \dots & & & \ \cmidrule[lr]{3-3} \cmidrule[lr]{4-4} \cmidrule[lr]{5-5}

\end{tblr} \end{table} \end{document}

enter image description here

With tabularx, booktabs and makecell:

\documentclass{article}
\usepackage{geometry}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}

\begin{document} \begin{table}[ht] \begin{tabularx}{\linewidth}{r >{\hsize=1.6\hsize}X *{3}{>{\hsize=0.8\hsize}X} } & & \thead[bc]{Nearly\ Always} & \thead[bc]{Sometimes} & \thead[bc]{Rarely} \

  1. & When I set a goal, I write it down.
    & & & \ \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
  2. & I describe my goal in specific, measurable terms. & & & \
    \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
  3. & I offten visualize my goals & & & \ \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
  4. & My goals are achievable & & & \ \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
  5. & I set realistic deadlines for completing my goals & & & \ \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
  6. & \dots & & & \ \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}

\end{tabularx} \end{table} \end{document}

enter image description here

Zarko
  • 296,517
5

Do you expect like this?

\documentclass[tikz,border=10pt]{standalone}
\usepackage{tabularx}
    \begin{document}

    \begin{table}[]

% \begin{tabular}{llllll} \begin{tabularx}{\textwidth}{lp{5cm}lll} && \textbf{Nearly} \ &&\textbf{Always} & \textbf{Sometimes} & \textbf{Rarely} \

  1. &When I set a goal, I write it down. &\hrulefill &\hrulefill &\hrulefill\
  2. &I describe my goal in specific, measurable terms. &\hrulefill &\hrulefill &\hrulefill\ \end{tabularx} \end{table} \end{document}

enter image description here

MadyYuvi
  • 13,693