Search code examples
latex

Latex how to cite a source for a table


The goal is for the output to resemble something like the following where you have a '1' on the top and on the bottom it refers to the '1' providing more information.

enter image description here

Now, my values in the table are different, but it should still resemble that image.

    \begin{table}[!ht]
        \centering
        \caption{Atomic Numbers and Melting Points in Kelvin of Elements O, S, Se, Te, and Po.\label{table:elements}}
        \begin{tblr}{
                colspec={|c|c|c|},
                row{1} = {font=\bfseries, bg=black!15}
            }
        \toprule
        Element &   Atomic Number   & Melting Point (K) \\
        \midrule
        Oxygen       &  8       &   54.8            \\
        Sulfur       &  16      &   388.36          \\
        Selenium     &  34      &   494             \\
        Tellurium    &  52      &   722.66          \\
        Polonium     &  84      &   528             \\
        \bottomrule
        \end{tblr}
    \end{table}

enter image description here


Solution

  • I am sure that there is a better way, but this is what I did.

    enter image description here

    \documentclass{article}
    \usepackage[utf8]{inputenc}
    
    \usepackage[export]{adjustbox}
    \usepackage{graphicx}
    \graphicspath{ {./figures/} }
    \usepackage[labelfont=bf]{caption}
    \usepackage[most]{tcolorbox}
    \usepackage{tabularray}
    \usepackage{hyperref}
    \usepackage{ulem}
    \hypersetup{
        colorlinks=true,       % false: boxed links; true: colored links
        urlcolor=blue        % color of external links
    }
    \UseTblrLibrary{booktabs}
    
    \pagenumbering{gobble}
    
    \begin{document}
        \begin{table}[!ht]
            \centering
            \caption{Atomic Numbers and Melting Points in Kelvin of Elements O, S, Se, Te, and Po.\textsuperscript{1}}
            \begin{tblr}{
                    colspec={|c|c|c|},
                    row{1} = {font=\bfseries, bg=black!15}
                }
            \toprule
            Element &   Atomic Number   & Melting Point (K) \\
            \midrule
            Oxygen       &  8       &   54.8            \\
            Sulfur       &  16      &   388.36          \\
            Selenium     &  34      &   494             \\
            Tellurium    &  52      &   722.66          \\
            Polonium     &  84      &   528             \\
            \bottomrule
            \end{tblr}
        \end{table}
        \footnotesize{\textsuperscript{1}Periodic Table, \color{blue}\uline{\url{https://ptable.com/\#Properties}} \color{black}(accessed September 12, 2022)}
    
    \end{document}