2

I'm unsucessfully trying to put table notes using threepartablex package, however the superscript numbers are placing wrong. How can I fix it?

\documentclass[a4paper]{article}
\usepackage{lineno,hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    bookmarksnumbered,
    citecolor=blue,
    urlcolor=blue,
    bookmarksopen=true}
\usepackage[
top=2.5cm,
left=2.5cm,
bottom=2.5cm,
right=2.5cm
]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{ltablex}
\usepackage{threeparttable}
\usepackage[referable]{threeparttablex}
\usepackage{booktabs}
\begin{document}
\begin{ThreePartTable}
\begin{TableNotes}
\item[1] \label{tn1} First table note
\item[2] \label{tn2} Second table note
\end{TableNotes}
\begin{tabularx}{10cm}{p{5cm}p{5cm}}
\toprule
Text\tnotex{tn1}&Text\tnotex{tn1}\\
Text\tnotex{tn1}\tnotex{tn2}&Text\tnotex{tn1,tn2}\\
\bottomrule
\insertTableNotes
\end{tabularx}
\end{ThreePartTable}
\end{document}

enter image description here

1 Answer 1

3

i guessing that you like obtain the following:

enter image description here

\documentclass[a4paper]{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amssymb}
\usepackage[referable]{threeparttablex}
\usepackage{booktabs, ltablex}
\keepXColumns
\usepackage{lineno,hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    bookmarksnumbered,
    citecolor=blue,
    urlcolor=blue,
    bookmarksopen=true}

\begin{document}
    \begin{ThreePartTable}
\begin{TableNotes}[para,raggedright]
\item[1] \label{tn1} First table note
\item[2] \label{tn2} Second table note
\end{TableNotes}
\begin{tabularx}{10cm}{XX}
\toprule
Text\tnotex{tn1}                        &   Text\tnotex{tn1}\\
Text\tnotex{tn1} \tnote{,} \tnotex{tn2} &   Text\tnotex{tn2}\\
\bottomrule
\insertTableNotes
\end{tabularx}
    \end{ThreePartTable}
\end{document}

note:

  • heperref package should be load (with rare exception) on the end of preamble
  • tnotex{...} consider all in {...} as one label
  • for two notes in one cell, used tnotex{...} had to be separated by empty space
  • for comma between two notes maybe exist better solution as i use in above mwe

You must log in to answer this question.

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