0

I have a table which contains footnotes. I want these footnotes to appear at the end of the page, but nothing is displaying. However footnote numbers are there in the table. I have tried doing this but it didn't work for me.

This is my table code:

\documentclass{book}                                                                                                 

\usepackage{booktabs}                                                                                                

\usepackage{url}                                                                                                     
\usepackage{tabularx}                                                                                                
\usepackage{ragged2e}                                                                                                
\usepackage{makecell}                                                                                                

\begin{document}                                                                                                     

\begin{table}[hbtp]                                                                                                  
    \centering                                                                                                       
    \begin{tabularx}{\textwidth}{ c >{\RaggedRight}X }                                                               
        \toprule                                                                                                     
        \textbf{$e_\#$} & \makecell[cc]{\textbf{Description}} \\                                                     
        \midrule                                                                                                     
        1 & Cathedral of Notre Dame fire during restorations work\footnote{https://www.nytimes.com/es/2019/04/15/not\
re-dame-incendio/}.  \\ \addlinespace                                                                                
        2 & Beginning of `Semana Santa' vacances in Madrid\footnote{https://www.abc.es/espana/madrid/abci-semana-san\
ta-2019-procesiones-madrid-recorrido-horario-y-programa-201904110105\_noticia.html}. \\ \addlinespace                
        3 & World Art Day\footnote{http://www.aimdigital.com.ar/15-de-abril-dia-mundial-del-arte/}. \\ \addlinespace 
        4 & Max Pradera, an Spanish journalist, posted an unfortunate comment about Almudena Cathedral and Notre Dam\
e\footnote{https://www.abc.es/internacional/abci-pradera-pudiendose-haber-quemado-almudena-y-quema-notre-dame-201904\
160310\_noticia.html}. \\ \addlinespace                                                                              
        5 & Premiere of the last season of Game of Thrones\footnote{https://www.elmundo.es/television/2019/04/09/5ca\
c665ffc6c8393168b46eb.html}. \\                                                                                      
        \bottomrule                                                                                                  
    \end{tabularx}                                                                                                   
   \caption{April 15th 2019 most important events}                                                                   
    \label{tab:april-events}                                                                                         
\end{table}                                                                                                          

\end{document}
  • What packages and documentclass do you use? Just including tabularx does not let me compile your table. Could you include a minimal working example (MWE)? – Taunch May 24 at 9:11
  • @Taunch Sorry, I didn't know what to post so I updated my question with my whole main.tex – Luiscri May 24 at 9:35
  • OK, that was a bit too much ;) I've edited your question so that the example remains "minimal", meaning that only things related to your question (= the table) remain. (The code would have also not compiled, since you seem to use a custom ´thesis.sty´) – Taunch May 24 at 9:50
  • @Taunch Right, I also added it to the question (I may have provided again too much) – Luiscri May 24 at 9:57
  • Ah, you really don't need that now, the new MWE does not rely on it anymore and compiles just fine on its own. – Taunch May 24 at 10:03
0

So, I've played around a bit and the quick fix seems to be using parnotes and a dirty hack to create new lines. It's not the most elegant solution, but it hopefully does what you want it to do.

\documentclass{book}                                                                                                 

\usepackage{booktabs}                                                                                                
\usepackage{tabularx}                                                                                                
\usepackage{ragged2e}                                                                                                
\usepackage{makecell}                                                                                                

\usepackage{parnotes} % for footnotes in tables                                                                      

\begin{document}                                                                                                     

\begin{table}[hbtp]                                                                                                  
    \centering                                                                                                       
    \begin{tabularx}{\textwidth}{ c >{\RaggedRight}X }                                                               
      \toprule                                                                                                       
      \textbf{$e_\#$} & \makecell[cc]{\textbf{Description}} \\                                                       
      \midrule                                                                                                       
      1 & Cathedral of Notre Dame fire during restorations work\parnote{https://www.nytimes.com/es/2019/04/15/notre-\
dame-incendio/\newline % <--- dirty hack for new lines                                                               
      }.  \\ \addlinespace                                                                                           
      2 & Beginning of `Semana Santa' vacances in Madrid\parnote{https://www.abc.es/espana/madrid/abci-semana-santa-\
2019-procesiones-madrid-recorrido-horario-y-programa-201904110105\_noticia.html\newline}. \\ \addlinespace           
      3 & World Art Day\parnote{http://www.aimdigital.com.ar/15-de-abril-dia-mundial-del-arte/\newline}. \\ \addline\
space                                                                                                                
      4 & Max Pradera, an Spanish journalist, posted an unfortunate comment about Almudena Cathedral and Notre Dame\\
parnote{https://www.abc.es/internacional/abci-pradera-pudiendose-haber-quemado-almudena-y-quema-notre-dame-201904160\
310\_noticia.html\newline}. \\ \addlinespace                                                                         
      5 & Premiere of the last season of Game of Thrones\parnote{https://www.elmundo.es/television/2019/04/09/5cac66\
5ffc6c8393168b46eb.html}. \\                                                                                         
      \bottomrule                                                                                                    
    \end{tabularx}                                                                                                   
    \caption{April 15th 2019 most important events}                                                                  
    \label{tab:april-events}                                                                                         
  \end{table}                                                                                                        
  \parnotes % actually create the footnotes, can also be placed inside table, but behaviour different                

\end{document} 

Output

It would also be possible to create a \newcommand to encompass the \newlines, depending on how often you need this.

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.