3

I have two tex files and use the command \input to include the table on my main file as follows:

Main.tex

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{inconsolata}
\usepackage{url}
\usepackage{hyperref}
\usepackage{color}
\usepackage{graphicx}
\usepackage[table,xcdraw]{xcolor}

\usepackage{minted}
\usepackage{listings}


\begin{document}

Eos ea harum labores scaevola, mea autem vivendo interesset ne, vis verterem patrioque at. Et adhuc malis perpetua quo. Aperiri deseruisse qui in, sea nihil aperiri et. Per tale dolore apeirian at, nam reque liber meliore id.

\input{table}

Euismod meliore duo te, at vivendo officiis per. Ea verterem lucilius urbanitas duo, nibh autem tamquam eu sea. Feugait mediocrem vel an, eu graecis tibique vulputate pro. Ne aperiri facilis scriptorem vix. Ad sed causae virtute antiopam, te usu suas sale neglegentur, tation quidam delenit has ne.

\end{document}

Table.tex

\begin{table}[ht]
\begin{center}
\caption{My caption}
\label{my-label}
\begin{tabular}{|l|}
\hline
\rowcolor[HTML]{C0C0C0} 
\multicolumn{1}{|c|}{\cellcolor[HTML]{C0C0C0}\textbf{Saucelabs\footnote{\textit{Saucelabs}: \url{https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options/}}}} \\ \hline
Browser Name                                                        \\ \hline
Browser Version                                                     \\ \hline
Platform Name                                                       \\ \hline
\end{tabular}
\end{center}
\end{table}

Result

enter image description here

How do I that the footnote in the table header to appear on the main page?

4

2 Answers 2

2

Your MWE did not work for me, so I commented out \usepackage{minted}. The easiest way for me to solve your problem was to split the footnote-order in two orders: \footnotemark and \footnotetext{Some text to indicate a reference.}

%In main.tex add:
\input{table}\footnotetext{{\textit{Saucelabs}: \url{https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options/}}}

%In table.tex change to:
\multicolumn{1}{|c|}{\cellcolor[HTML]{C0C0C0}\textbf{Saucelabs\footnotemark}} \\ \hline

Perhaps there is a nicer way in achieving this. But for a quick solution it might work. If your are using several different footnotes, you can call an argument for \footnotemark[17] and \footnotetext[17]{Some Text that will be footnote with the number 17.}

Best

2
  • Thank​ you so much for your help @HATEthePLOT, now it's all working! Commented Dec 23, 2015 at 11:32
  • Hello @HATEthePLOT,I ended up using the \tablefootnote with the package \usepackage{tablefootnote} for the correct numbering of the footnote was not working. But either way you surely helped me a lot. Thank you so much! Commented Dec 23, 2015 at 11:59
5

Is the following what you intended (please note that the question is unrelated to \input command, see below):

\documentclass{article}
\usepackage{url}
\usepackage{hyperref}
\usepackage{color}
\usepackage[table,xcdraw]{xcolor}
\begin{document}

Eos ea harum labores scaevola, mea autem vivendo interesset ne, vis.

\begin{table}[ht]
\begin{center}
\caption{My caption}
\label{my-label}
\begin{tabular}{|l|}
\hline
\rowcolor[HTML]{C0C0C0}
\multicolumn{1}{|c|}{\cellcolor[HTML]{C0C0C0}\textbf{Saucelabs}\footnotemark}      \\ \hline
Browser Name                                                                       \\ \hline
Browser Version                                                                    \\ \hline
Platform Name                                                                      \\ \hline
\end{tabular}
\end{center}
\end{table}

Euismod meliore duo te, at vivendo officiis per. Ea verterem lucilius. 

\footnotetext{\url{https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options/}}
\end{document}

Same example with an \input command

\documentclass{article}
\usepackage{url,filecontents}
\usepackage{hyperref}
\usepackage{color}
\usepackage[table,xcdraw]{xcolor}
\begin{filecontents}{ifil}
\begin{table}[ht]
\begin{center}
\caption{My caption}
\label{my-label}
\begin{tabular}{|l|}
\hline
\rowcolor[HTML]{C0C0C0}
\multicolumn{1}{|c|}{\cellcolor[HTML]{C0C0C0}\textbf{Saucelabs}\footnotemark}      \\ \hline
Browser Name                                                                       \\ \hline
Browser Version                                                                    \\ \hline
Platform Name                                                                      \\ \hline
\end{tabular}
\end{center}
\end{table}
\end{filecontents}
\begin{document}

Eos ea harum labores scaevola, mea autem vivendo interesset.

\input{ifil}

Euismod meliore duo te, at vivendo officiis per. 

\footnotetext{\url{https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options/}}
\end{document}
1
  • Hello @Denis, thank you so much for your help! Commented Dec 23, 2015 at 11:34

You must log in to answer this question.

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