1

I have a question that is very similar to this: How to use itemize in Table environment and Table with multiple lines in some cells However, instead of the content of the table being written directly in latex, it is for a big table that is being read in as xml output from R. For one column of the content, there are multiple entries (separated by a semi-colon) that I'd like to show as bullet points in one cell, for all elements in that column. Any ideas? I was thinking something with multirow{} or a tabular within the table, but I don't think these options work when the data is read in as an external format. Any help appreciated!

  • You would need some tool or other to generate LaTeX markup from your XML. It would seem more straightforward though to let R generate LaTeX directly? There seem to be R backends for that, although I haven't used them and don't know how to customize them at the level of detail you have in mind. – Michael Palmer Nov 3 '16 at 3:00
  • Without a minimal working example it's difficult to say but it sounds like you might profit from looking at either the cvssimple or datatool package. – user30471 Nov 4 '16 at 4:11
0
\documentclass{report}
\usepackage{array}
\usepackage{etoolbox}

\begin{document}
\begin{center}

\AtBeginEnvironment{tabular}{\small}
\newcolumntype{M}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{N}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{O}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{P}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{tabular}{| M{3cm} | N{3cm} | O{3cm} | P{3cm} |}

\hline
TITLE 1 & TITLE 2 & TITLE 3 & TITLE 4\\

\hline
Some content here &
Some content here\newline Some content here & 
Some content here\newline Some content here\newline Some content here & 
Some content here\newline Some content here\newline Some content here\newline Some content here\\
\hline

\hline
Some content here\newline Some content here &
Some content here\newline Some content here\newline Some content here & 
Some content here\newline Some content here\newline Some content here\newline Some content here & 
Some content here\\
\hline

\hline
Some content here\newline Some content here\newline Some content here &
Some content here\newline Some content here\newline Some content here\newline Some content here & 
Some content here & 
Some content here\newline Some content here\\
\hline

\hline
Some content here\newline Some content here\newline Some content here\newline Some content here &
Some content here & 
Some content here\newline Some content here & 
Some content here\newline Some content here\newline Some content here\\
\hline

\end{tabular}
\end{center}
\end{document}

enter image description here

| improve this answer | |

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