1

Please, Help me inserting a table like this. I could not prepare this table easily because the long text i have to insert into the columns. I have been trying from some examples of stackechange but have not been successful. Perhaps the amount of text that includes the table. I am facing difficulties with merging the rows and columns. I am in an urgent need. Please Help !

Should I use all those packages? What and how each package is used?

\usepackage{multirow}
\usepackage{hhline}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabu}
\usepackage{makecell} 

This is the example i wanna get Thanks

enter image description here

\documentclass[11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[spanish,mexico]{babel}
\usepackage[T1]{fontenc}
%\usepackage{amsmath}
%\usepackage{amsfonts}
%\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{apacite}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabu}
\usepackage{makecell}
\begin{document}
\begin{table}[h]
\caption{``“Utilidad y Derivación de las Emociones Primarias (Riso, W., 2008)''}
\begin{center}
\small
\begin{tabu}{|[2pt]} >{\centering}p{3cm} | [2pt] >{\centering}p{3cm}
\tabucline[2pt]{-}
&{Emociones primarias} & {Derivación de las emociones primarias}\\ \tabucline[2pt]{-}
\multirow{6}{*}{\parbox{3 cm}{\textbf{Dolor}} & \multirow{6}{*}{\parbox{3 cm}{textbf{Sufrimiento}}\\
& Avisa cuando un órgano físico está funcionando mal o está siendo agredido, para que sea reparado o defendido. & Indica que hay una estructura mental afectada o un apego irracional que debe ser trabajado.\\
&\textbf{Miedo} & \textbf{Miedo psicológico}\\
& Protege ante un peligro real.& Indica que se ha dejado de actuar. La parálisis es sostenida por ideas irracionales.

\tabucline[2pt]{-}
\end{tabu}
\end{center}
\end{table}
\end{document}
  • 1
    Welcome to TeX.SX! Please help us help you by including a minimal working example (MWE) in your question and show us what you have so far. – eiterorm Sep 10 '14 at 21:57
  • How each package is used is easily spotted in each package's documentation. How a general tabular works: compile \begin{tabular}{rlc} a & b & c \\ dmnu & ertu & fghi \end{tabular} and it should give you an idea. – Manuel Sep 10 '14 at 21:58
  • Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – user31729 Sep 10 '14 at 22:01
2

tabular

Here is a way to use a simple tabular with the enhancements offered by booktabs. Trying to learn multiple packages to do similar things all at once before you understand the basics is, I think, a recipe for confusion and frustration.

\documentclass[11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[spanish,mexico]{babel}
\usepackage[T1]{fontenc}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
  \begin{table}
    \centering% This is an environment - we probably don't want the extra spacing of center in addition to that added by table etc.
    \caption{``Utilidad y Derivación de las Emociones Primarias (Riso, W., 2008)''}

    \small
    \begin{tabular}{*{2}{p{.425\linewidth}}}% The target layout does not centre the text so we don't want \centering
      \toprule% nicer rules courtesy of booktabs - but then we need to drop the verticals 
      Emociones primarias &  Derivación de las emociones primarias \\\midrule% Note that there is no & before the first column - & only comes between columns so if you define n columns, you can have at most n-1 & symbols in any row
      \textbf{Dolor} & \textbf{Sufrimiento}\\% No need for 6 rows of space for each title!
      Avisa cuando un órgano físico está funcionando mal o está siendo agredido, para que sea reparado o defendido. & Indica que hay una estructura mental afectada o un apego irracional que debe ser trabajado.\\\midrule% the p{} setting automatically lets these be multi-line - we don't want multiple rows on top of that and this is simpler as TeX does the hard work for us
      \textbf{Miedo} & \textbf{Miedo psicológico}\\
      Protege ante un peligro real.& Indica que se ha dejado de actuar. La parálisis es sostenida por ideas irracionales.\\
      \bottomrule
    \end{tabular}
  \end{table}
\end{document}

Your Answer

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.