2

I would like to draw a table which has fewer cells on the left than the right i.e. for some rows each cell in the left is two on the right. For others it's one to one.

I've got the below, which technically at least, works. However there are a couple of things I'd like to improve:

  • The random extra rows are a bodge and there must be a better way of doing it.
  • I don't really want to have to use the horizontal rules if possible, it's just that it's such a horrible mess I can't see any way out of it. Were it laid at with latex's normal beauty I suspect I could avoid the need for them.

The example I have provided below has few idiosyncrasies as a result of the rest of the document.

  • The tabularx imports are as provided by classic thesis. I'm not sure if all the setting are relevant, but I thought I'd include them in case they were.
  • I refer to my research questions a lot in my thesis, hence having made them into macros.

Working Example:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx} % better tables
    \setlength{\extrarowheight}{3pt} % increase table row height
\newcommand{\tableheadline}[1]{\multicolumn{1}{c}{\spacedlowsmallcaps{#1}}}
\newcommand{\myfloatalign}{\centering} % to be used with each float for alignment
\usepackage{multirow} % to span multiple rows
\usepackage{caption}

\def\QuestionOtherData{Given the diverse information environment within the rail industry, how can heterogeneous datasources be combined, where there is value in so doing?}
\def\QuestionChange{Can an intermediary layer isolate information systems from changes to datastore interfaces?}
\def\QuestionSecurity{How can datastore security be managed within the setting of an ontology and IT infrastructure?}
\def\QuestionCombine{Given that that many stakeholders can benefit from combining multiple data sources, what techniques enable this?}
\def\QuestionSkillz{Given the current shortage of engineers with experience editing or connecting to ontologies, is it possible to create tools which improve their uptake and adoption?}
\def\QuestionCanOntologyScale{Given the velocity and volume of data within the rail domain, can an ontology based architectures be deployed on the scale of a national rail network?} 


\begin{document}

\noindent\begin{tabularx}{\textwidth}{@{}XX@{}} 
Question & Investigated In\\

\multirow{2}{*}{\mbox{\parbox{\linewidth}{\QuestionOtherData}}} & Chapter four \\
& Chapter six \\
& \\ %This is an ugly bodge to make it not draw the questions on top of each other
& \\
\hline
\multirow{2}{*}{\setlength{\fboxsep}{-\fboxrule}\mbox{\parbox{\linewidth}{\QuestionSkillz}}} & Chapter five \\
& Chapter six \\
& \\ 
& \\
\hline
\multirow{2}{*}{\setlength{\fboxsep}{-\fboxrule}\mbox{\parbox{\linewidth}{\QuestionCombine}}} & Chapter five \\
& Chapter six \\
& \\
\hline
\QuestionChange & Chapter five \\
\hline
\QuestionCanOntologyScale & Chapter six \\
\hline
\multirow{2}{*}{\mbox{\parbox{\linewidth}{\QuestionSecurity}}} & Chapter five \\
& Chapter six \\
\end{tabularx}
\end{document}

Any help would be greatly appreciated. Can anyone make it lay out neatly so I don't need the horizontal lines?

  • Welcome to TeX.SE! Real quick, though: What's a bodge? – Mico Dec 1 '17 at 16:56
  • Thank you. I hadn't realised how colloquial and British bodge was; it means an inelegant solution or a quick fix, like mending a car with gaffa-tape, for example. – ChrisUK Dec 1 '17 at 17:24
  • Ah, like a kludge in colloquial American english... :-) – Mico Dec 1 '17 at 17:31
  • 1
    Yes, a different colloquialism with the same meaning. :) – ChrisUK Dec 2 '17 at 14:12
0

I'd like to suggest the following reorganization (reorganisation?) of the contents of the tabularx material. Note the absence of all \multirow wrappers. Note also that (much) more space is being devoted to the first column, and (correspondingly) much less space -- basically: just the bare minimum -- to the second. I've dispensed with all horizontal lines in the body of table, using whitespace instead to provide visual separation.

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{caption}
\usepackage[british]{babel} % for "bodge"

\newcommand{\mycell}[1]{%
  \begin{tabular}[t]{@{}l@{}} #1 \end{tabular}}

\def\QuestionOtherData{Given the diverse information environment within the rail industry, how can heterogeneous datasources be combined, where there is value in so doing?}
\def\QuestionChange{Can an intermediary layer isolate information systems from changes to datastore interfaces?}
\def\QuestionSecurity{How can datastore security be managed within the setting of an ontology and IT infrastructure?}
\def\QuestionCombine{Given that that many stakeholders can benefit from combining multiple data sources, what techniques enable this?}
\def\QuestionSkillz{Given the current shortage of engineers with experience editing or connecting to ontologies, is it possible to create tools which improve their uptake and adoption?}
\def\QuestionCanOntologyScale{Given the velocity and volume of data within the rail domain, can an ontology based architectures be deployed on the scale of a national rail network?} 

\begin{document}

\noindent
\begin{tabularx}{\textwidth}{@{}Xl@{}} 
Question & Investigated in\\ 
\midrule
\QuestionOtherData & \mycell{Chapter four \\ Chapter six}\\ \addlinespace
\QuestionSkillz    & \mycell{Chapter five \\ Chapter six}\\ \addlinespace
\QuestionCombine   & \mycell{Chapter five \\ Chapter six}\\ \addlinespace
\QuestionChange    & Chapter five \\                        \addlinespace
\QuestionCanOntologyScale & Chapter six \\                  \addlinespace
\QuestionSecurity  & \mycell{Chapter five \\ Chapter six} \\ 
\bottomrule
\end{tabularx}
\end{document}


Addendum to show how to simplify the table some more: The material in the right-hand column can (and probably should) be simplified by using just one line at a time, as is shown in the following example.

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx,booktabs}
\usepackage[british]{babel} % for "bodge" :-)

\def\QuestionOtherData{Given the diverse information environment within the rail industry, how can heterogeneous datasources be combined, where there is value in so doing?}
\def\QuestionChange{Can an intermediary layer isolate information systems from changes to datastore interfaces?}
\def\QuestionSecurity{How can datastore security be managed within the setting of an ontology and IT infrastructure?}
\def\QuestionCombine{Given that that many stakeholders can benefit from combining multiple data sources, what techniques enable this?}
\def\QuestionSkillz{Given the current shortage of engineers with experience editing or connecting to ontologies, is it possible to create tools which improve their uptake and adoption?}
\def\QuestionCanOntologyScale{Given the velocity and volume of data within the rail domain, can an ontology based architecture be deployed on the scale of a national rail network?} 

\begin{document}

\noindent
\begin{tabularx}{\textwidth}{@{} X l @{}} 
Question           & Investigated in \\ \midrule
\QuestionOtherData & Chapters 4 \& 6 \\ \addlinespace
\QuestionSkillz    & Chapters 5 \& 6 \\ \addlinespace
\QuestionCombine   & Chapters 5 \& 6 \\ \addlinespace
\QuestionChange    & Chapter 5       \\ \addlinespace
\QuestionCanOntologyScale & Chapter 6\\ \addlinespace
\QuestionSecurity  & Chapters 5 \& 6 \\ \bottomrule
\end{tabularx}
\end{document}
  • Perfect, thank you, just what I what I was after. – ChrisUK Dec 1 '17 at 17:25
1

Like this?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx} % better tables   
\newcommand{\tableheadline}[1]{\multicolumn{1}{c}{\spacedlowsmallcaps{#1}}}
\newcommand{\myfloatalign}{\centering} % to be used with each float for alignment
\usepackage{makecell, booktabs}
\usepackage{caption}
\usepackage{soulutf8}
\usepackage[table, svgnames]{xcolor}

\def\QuestionOtherData{Given the diverse information environment within the rail industry, how can heterogeneous datasources be combined, where there is value in so doing?}
\def\QuestionChange{Can an intermediary layer isolate information systems from changes to datastore interfaces?}
\def\QuestionSecurity{How can datastore security be managed within the setting of an ontology and IT infrastructure?}
\def\QuestionCombine{Given that that many stakeholders can benefit from combining multiple data sources, what techniques enable this?}
\def\QuestionSkillz{Given the current shortage of engineers with experience editing or connecting to ontologies, is it possible to create tools which improve their uptake and adoption?}
\def\QuestionCanOntologyScale{Given the velocity and volume of data within the rail domain, can an ontology based architectures be deployed on the scale of a national rail network?}

\newcommand{\nl}{\newline}

\begin{document}


\noindent\begin{tabularx}{\linewidth}{@{}>{\hsize=1.5\hsize\arraybackslash}X@{\qquad}>{\hsize=0.5\hsize\arraybackslash}X@{}}
\caps{Question}& \caps{Investigated In} \\
\arrayrulecolor{LightSteelBlue}\midrule[\heavyrulewidth]
\QuestionOtherData & Chapter four \nl Chapter six \\
\addlinespace
\QuestionSkillz & Chapter five \nl Chapter six \\
\addlinespace
\QuestionCombine & Chapter five \nl Chapter six \\
\addlinespace
\QuestionChange & Chapter five \\
\addlinespace
\QuestionCanOntologyScale & Chapter six \\
\addlinespace
\QuestionSecurity & Chapter five \nl Chapter six \\
\bottomrule
\end{tabularx}

\end{document} 

enter image description here

  • I like the coloured rules, also much better than my solution, thank you – ChrisUK Dec 1 '17 at 17:54
  • @Mico: You're right. It's what remains of a first trial, with the O.P.'s hlines – I forgot to delete it. – Bernard Dec 1 '17 at 19:04

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.