5

I'm trying to implement this:

\documentclass[preprint,12pt]{elsarticle}

\usepackage{graphicx}
\usepackage{geometry}
\usepackage{amssymb}
\usepackage{longtable}
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage[T1]{fontenc}
\usepackage{float}
\usepackage{booktabs}
\usepackage{ltablex}
\usepackage{lineno}
\usepackage{color}
\usepackage{url}

\begin{document}

...

\begin{tabularx}{1.2\textwidth}{|m{4.5cm}|X|}\hline
Function & Indicator \\ \hline
\endhead

Function 1\newline Entrepreneurial\newline activities & No. of companies\newline Size of companies\newline Turnover of companies\newline No. of niche projects or experiments \newline No. of companies entering/exiting the innovation system\newline How innovative are they?\\\hline\

Function 2\newline Knowledge development & \begin{tabular}{p{4cm}|p{4cm}|p{3cm}}
Learning by searching  (R\&D) & Learning by doing & Learning by using\\\hline
No. of patents & No. of products produced & No. of users\\\hline
No. of research projects & No. of niche products & No. of niche projects\\\hline
No. of scientific papers & Product quality & User reviews\\
\end{tabular}\\\hline

Function 3\newline Knowledge diffusion through networks & 
No. of conferences \newline
No. of seminars \newline
No. of joint research projects \newline
Quality of formal and informal contacts between different actors \newline
Barriers to communication across networks \\\hline

Function 4\newline Guidance of the search & 
Goals \newline
Policy programmes \newline
Technological best practices and examples \newline
Ambitious/long terms objectives\\\hline

Function 5\newline Market formation & 
Market size \newline
Market characteristics (niche market or broader) \newline
Availability of market subsidies \newline
Motivation for buyers\\\hline

Function 6\newline Resources mobilization & 
No. and kind of financial resources \newline
No. of physical resources \newline
No. of human resources (research personnel/skilled labour) \newline
Skill level of workers \newline
Quality of education in the field\\\hline

Function 7\newline Creation of legitimacy & 
Public opinion of the technology \newline
Amount of resistance in regime \newline
Lobbying activities by innovation system members for financial and political support\\\hline
\caption{An overview of indicators for the FIS approach}
\label{tab:2}
\end{tabularx}

However, there are a number of problems. Namely, the table nested in my tabularx cell has too much padding, and when I try to center this tabularx it doesn't work. I've seen How can I center a too wide table? or Center figure that is wider than \textwidth, but to no avail.

Anyone have a clue how I could do the things I want?

  • Welcome to TeX.SE. While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Dec 25 '16 at 10:26
  • Good idea. I added what packages I'm using, as well as the class. – Tom Schoehuijs Dec 25 '16 at 10:46
  • I think in your case you need to use tabular environment not tabularx – Salim Bou Dec 25 '16 at 11:58
4

Add locally \setlength\LTleft{-0.1\textwidth}:

\documentclass[preprint,12pt]{elsarticle}

\usepackage{graphicx}
\usepackage{geometry}
\usepackage{amssymb}
\usepackage{longtable}
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage[T1]{fontenc}
\usepackage{float}
\usepackage{booktabs}
\usepackage{ltablex}%{tabularx}%
\usepackage{lineno}
\usepackage{color}
\usepackage{url}
\usepackage{ragged2e, changepage, lipsum}%

 \begin{document}
\lipsum[11]
...

{\setlength\LTleft{-0.1\textwidth}%
\begin{tabularx}{1.2\textwidth}{| >{\RaggedRight}m{4.5cm}|X|}
\hline
Function & Indicator \\ \hline
\endhead

Function 1\newline Entrepreneurial\newline activities & No. of companies\newline Size of companies\newline Turnover of companies\newline No. of niche projects or experiments \newline No. of companies entering/exiting the innovation system\newline How innovative are they?\\\hline\

Function 2\newline Knowledge development & \begin{tabular}{p{4cm}|p{4cm}|p{3cm}}
Learning by searching (R\&D) & Learning by doing & Learning by using\\\hline
No. of patents & No. of products produced & No. of users\\\hline
No. of research projects & No. of niche products & No. of niche projects\\\hline
No. of scientific papers & Product quality & User reviews\\
\end{tabular}\\\hline

Function 3\newline Knowledge diffusion through networks &
No. of conferences \newline
No. of seminars \newline
No. of joint research projects \newline
Quality of formal and informal contacts between different actors \newline
Barriers to communication across networks \\\hline

Function 4\newline Guidance of the search &
Goals \newline
Policy programmes \newline
Technological best practices and examples \newline
Ambitious/long terms objectives\\\hline

Function 5\newline Market formation &
Market size \newline
Market characteristics (niche market or broader) \newline
Availability of market subsidies \newline
Motivation for buyers\\\hline

Function 6\newline Resources mobilization &
No. and kind of financial resources \newline
No. of physical resources \newline
No. of human resources (research personnel/skilled labour) \newline
Skill level of workers \newline
Quality of education in the field\\\hline

Function 7\newline Creation of legitimacy &
Public opinion of the technology \newline
Amount of resistance in regime \newline
Lobbying activities by innovation system members for financial and political support\\\hline
\caption{An overview of indicators for the FIS approach}
\label{tab:2}
\end{tabularx}}

\end{document} 

enter image description here

3

Based on Bernard answer with some small, off-topic improvements related to cells formating:

\documentclass[preprint,12pt]{elsarticle}
\usepackage[font=small,labelfont=bf]{caption}% <-- new

\usepackage{graphicx}
\usepackage{geometry}
\usepackage{amssymb}
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage[T1]{fontenc}
\usepackage{float}
\usepackage{booktabs, ltablex}%
\usepackage{lineno}
\usepackage{color}
\usepackage{url}
\usepackage{ragged2e}
\usepackage{calc}% <-- new
\usepackage{lipsum}%

 \begin{document}
\lipsum[1]
{\setlength\LTleft{-0.1\textwidth}%
 \setlength{\RaggedRightRightskip}{0pt plus 1fil}% <-- new
\begin{tabularx}{1.2\textwidth}{|>{\RaggedRight} p{3.3cm} | X |}
\hline
Function & Indicator \\ \hline
\endhead
Function 1:\newline\smallskip
Entrepreneurial activities 
&   No. of companies
    Size of companies\newline Turnover of companies\newline No. of niche projects or experiments \newline
    No. of companies entering/exiting the innovation system\newline 
    How innovative are 
    they? \\\hline
Function 2:\newline\smallskip 
Knowledge development 
&   \multicolumn{1}{@{}X@{}}{% <-- new
    \begin{tabular}[t]{*{3}{>{\raggedright\arraybackslash}% <-- changed
                         p{(\linewidth-4\tabcolsep-2\arrayrulewidth)/3}|}}
Learning by searching (R\&D)& Learning by doing         & Learning by using\\\hline
No. of patents              & No. of products produced  & No. of users\\\hline
No. of research projects    & No. of niche products     & No. of niche projects\\\hline
No. of scientific papers    & Product quality           & User reviews
    \end{tabular}
                            }\\\hline
Function 3:\newline\smallskip 
Knowledge diffusion through networks 
&   No. of conferences \newline
    No. of seminars \newline
    No. of joint research projects \newline
    Quality of formal and informal contacts between different actors \newline
    Barriers to communication across networks \\\hline
Function 4:\newline\smallskip 
Guidance of the search
&   Goals \newline
    Policy programmes \newline
    Technological best practices and examples \newline
    Ambitious/long terms objectives\\\hline
Function 5:\newline\smallskip
Market formation 
&   Market size \newline
    Market characteristics (niche market or broader) \newline
    Availability of market subsidies \newline
    Motivation for buyers\\\hline
Function 6:\newline\smallskip 
Resources mobilization 
&   No. and kind of financial resources \newline
    No. of physical resources \newline
    No. of human resources (research personnel/skilled labour) \newline
    Skill level of workers \newline
    Quality of education in the field\\\hline
Function 7:\newline\smallskip
Creation of legitimacy 
&   Public opinion of the technology \newline
    Amount of resistance in regime \newline
    Lobbying activities by innovation system members for financial and political support\\\hline
\caption{An overview of indicators for the FIS approach}
\label{tab:2}
\end{tabularx}%
}

enter image description here

3

You need no tabularx for this, since you can easily compute yourself the width of the second column.

\documentclass[preprint,12pt]{elsarticle}

\usepackage{graphicx}
\usepackage{geometry}
\usepackage{amssymb}
\usepackage{longtable,array}
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage[T1]{fontenc}
\usepackage{float}
\usepackage{booktabs}
\usepackage{lineno}
\usepackage{color}
\usepackage{url}

\newlength{\secondcolumn}

\begin{document}

\begingroup
\setlength{\LTleft}{-.1\textwidth}
\setlength{\LTright}{-.1\textwidth}
\setlength{\secondcolumn}{\dimexpr1.2\textwidth-4\tabcolsep-3\arrayrulewidth-4.5cm}
\begin{longtable}{
  |>{\raggedright}m{4.5cm}
  |>{\raggedright\arraybackslash}m{\secondcolumn}|
}
\hline
Function & Indicator \\ \hline
\endhead

Function 1\newline Entrepreneurial\newline activities & 
  No. of companies\newline 
  Size of companies\newline 
  Turnover of companies\newline 
  No. of niche projects or experiments \newline
  No. of companies entering/exiting the innovation system\newline
  How innovative are they?\\\hline\

Function 2\newline Knowledge development & 
\multicolumn{1}{@{}p{\dimexpr\secondcolumn+2\tabcolsep}@{}|}{\begin{tabular}{
  >{\raggedright}p{\dimexpr\hsize/3-2\arrayrulewidth/3-2\tabcolsep}|
  >{\raggedright}p{\dimexpr\hsize/3-2\arrayrulewidth/3-2\tabcolsep}|
  >{\raggedright\arraybackslash}p{\dimexpr\hsize/3-2\arrayrulewidth/3-2\tabcolsep}
}
Learning by searching  (R\&D) & Learning by doing & Learning by using\\\hline
No. of patents & No. of products produced & No. of users\\\hline
No. of research projects & No. of niche products & No. of niche projects\\\hline
No. of scientific papers & Product quality & User reviews\\
\end{tabular}}\\\hline

Function 3\newline Knowledge diffusion through networks & 
No. of conferences \newline
No. of seminars \newline
No. of joint research projects \newline
Quality of formal and informal contacts between different actors \newline
Barriers to communication across networks \\\hline

Function 4\newline Guidance of the search & 
Goals \newline
Policy programmes \newline
Technological best practices and examples \newline
Ambitious/long terms objectives\\\hline

Function 5\newline Market formation & 
Market size \newline
Market characteristics (niche market or broader) \newline
Availability of market subsidies \newline
Motivation for buyers\\\hline

Function 6\newline Resources mobilization & 
No. and kind of financial resources \newline
No. of physical resources \newline
No. of human resources (research personnel/skilled labour) \newline
Skill level of workers \newline
Quality of education in the field\\\hline

Function 7\newline Creation of legitimacy & 
Public opinion of the technology \newline
Amount of resistance in regime \newline
Lobbying activities by innovation system members for financial and political support\\\hline
\caption{An overview of indicators for the FIS approach}
\label{tab:2}
\end{longtable}
\endgroup
\end{document}
1

Here your table with simple tabular environment

\documentclass[preprint,12pt]{elsarticle}
\usepackage{graphicx}
\usepackage[margin=2cm]{geometry}
\usepackage{amssymb}
\usepackage{longtable}
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage[T1]{fontenc}
\usepackage{float}
\usepackage{booktabs}
\usepackage{ltablex}
\usepackage{lineno}
\usepackage{color}
\usepackage{url}



\begin{document}

...

\begin{table}[h!]
\centerline{% 
\begin{tabular}{|m{4.5cm}|m{15cm}|}\hline
Function                                                & Indicator \\ \hline
Function 1\newline Entrepreneurial\newline activities   & No. of companies\newline Size of companies\newline Turnover of companies\newline No. of niche projects or experiments \newline No. of companies entering/exiting the innovation system\newline How innovative are they?\\\hline\
Function 2\newline Knowledge development                & 
\begin{tabular}{p{4cm}|p{4cm}|p{3cm}}
Learning by searching  (R\&D) & Learning by doing & Learning by using\\\hline
No. of patents                & No. of products produced & No. of users\\\hline
No. of research projects      & No. of niche products & No. of niche projects\\\hline
No. of scientific papers      & Product quality & User reviews\\
\end{tabular}\\\hline
Function 3\newline Knowledge diffusion through networks & 
No. of conferences \newline
No. of seminars \newline
No. of joint research projects \newline
Quality of formal and informal contacts between different actors \newline
Barriers to communication across networks \\\hline
Function 4\newline Guidance of the search               & 
Goals \newline
Policy programmes \newline
Technological best practices and examples \newline
Ambitious/long terms objectives\\\hline
Function 5\newline Market formation                     & 
Market size \newline
Market characteristics (niche market or broader) \newline
Availability of market subsidies \newline
Motivation for buyers\\\hline
Function 6\newline Resources mobilization               & 
No. and kind of financial resources \newline
No. of physical resources \newline
No. of human resources (research personnel/skilled labour) \newline
Skill level of workers \newline
Quality of education in the field\\\hline
Function 7\newline Creation of legitimacy               & 
Public opinion of the technology \newline
Amount of resistance in regime \newline
Lobbying activities by innovation system members for financial and political support\\\hline
\end{tabular}}
\caption{An overview of indicators for the FIS approach}
\label{tab:2}
\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.