2

This is a simple question. There are too many white spaces between the words of the 3rd column. Is it possible to adjust the text to have just one space between 'commas' and 'words'?

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass{report}
\usepackage{float,threeparttable,booktabs,fontspec}
\begin{document}

\begin{table}[H]
\caption{Estructura del guión de entrevista: apartados, componentes y temas}
 \label{tab:guionentrevistas}
\centering
 \begin{threeparttable}
    \begin{tabular}{llp{0.4\textwidth}}
    \toprule
            \bf Apartado &  \bf Componente & \bf Tema \\
            \midrule
         Presentación & Explicaciones & Proyecto, preguntas, registro, lenguaje, dinámica.\\
         Descripciones &  Perfil       & Formación, trayectoria, profesión.\\ 
        Cuestionario  & Extensión 15M & Acciones, organización, entornos, actividades, opinión\\ 
                      & Objetivos 15M & Manifestaciones, acampadas, destinatarios\\
                   & Estructura 15M   & Actores, procesos, roles, organigrama, herencias, gestión del consenso\\
                   & Mentalidad 15M   & Ideas, orígenes, creencias\\
                   & Comunicación 15M   & Ideas\\

\bottomrule
\end {tabular}
    \begin{tablenotes}
      \small
      \item
    \end{tablenotes}
  \end{threeparttable}

\end{table}

\end{document}

enter image description here

1
  • 2
    I had to edit your code to add a \usepackage statement with 4 [!] arguments in order to make the code compilable. Please don't make your readers go through needless and pointless guesswork.
    – Mico
    Commented Dec 29, 2016 at 10:21

1 Answer 1

4

Some suggestions and comments:

  • To switch the appearance of the third column from fully-justified to ragged-right, you should (a) load the packages array and ragged2e in the preamble and (b) change the column format of the third column from

    p{0.4\textwidth}
    

    to

    >{\RaggedRight\arraybackslash}p{0.4\textwidth}
    
  • Don't employ instructions such as \bf in a LaTeX document; use \bfseries instead.

  • The position of the instruction \begin{threeparttable} is incorrect. It should be placed before \caption, and not before \begin{tabular}.

  • You should probably also load the babel package with a suitable language option. (spanish, maybe?)

A full MWE that incorporates these points:

enter image description here

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass{report}
\usepackage{float,threeparttable,booktabs,fontspec}
\usepackage{array,ragged2e}
\usepackage[spanish]{babel} % is "spanish" correct?
\begin{document}

\begin{table}[H]
\begin{threeparttable}
\caption{Estructura del guión de entrevista: apartados, componentes y temas}
\label{tab:guionentrevistas}
\centering
\begin{tabular}{ll>{\RaggedRight\arraybackslash}p{0.4\textwidth}}
\toprule
\bfseries Apartado & {\bfseries Componente}\tnote{a} & \bfseries Tema \\
\midrule
Presentación  & Explicaciones & Proyecto, preguntas, registro, lenguaje, dinámica.\\
Descripciones & Perfil        & Formación, trayectoria, profesión.\\
Cuestionario  & Extensión 15M & Acciones, organización, entornos, actividades, opinión\\
    & Objetivos 15M    & Manifestaciones, acampadas, destinatarios\\
    & Estructura 15M   & Actores, procesos, roles, organigrama, herencias, gestión del consenso\\
    & Mentalidad 15M   & Ideas, orígenes, creencias\\
    & Comunicación 15M & Ideas\\
\bottomrule
\end{tabular}
\begin{tablenotes}
      \small
      \item[a] Bla bla bla
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}
12
  • With foreign languages and XeLaTeX and LuaLaTeX, is better to use: \usepackage[quiet]{polyglossia} \setdefaultlanguage{spanish} \hyphenrules{spanish}
    – djnavas
    Commented Dec 29, 2016 at 10:54
  • Thanks for your patience and your work Mico. Look at the results here, not working..es.sharelatex.com/project/5864e3382ff353be2d9589e5 Commented Dec 29, 2016 at 10:56
  • @djnavas - I disagree. What is the basis for your claim? It is true that several years ago, polyglossia was indeed better than babel for use under XeLaTeX; on the other hand, several years ago, polyglossia didn't work at all with LuaLaTeX. Nowadays, however, both packages work fine with both XeLaTeX and LuaLaTeX, at least for the "major" languages of the world. In my book, Spanish is one of the "major" languages. I'll readily confess, though, to having no idea how good either package is when it comes to dealing with the less-well-known languages of the world.
    – Mico
    Commented Dec 29, 2016 at 11:00
  • @JuanLinares If you change your documentclass from DissertateB5 to report, your table compiles without problems.
    – djnavas
    Commented Dec 29, 2016 at 11:06
  • 1
    @JuanLinares - I've posted a screenshot so that you know what the table should look like if you manage to get around the quirks of the sharelatex software. :-)
    – Mico
    Commented Dec 29, 2016 at 11:41

You must log in to answer this question.

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