1

I have a problem in aligning the table notes to the left (at the height where also the table begins) and in forcing the text to be tiny (use it for a cheatsheet). Do you have a solution?


% page setup
\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{enumitem,booktabs,cfr-lm}% aufzahlungen mit erklärung nach Tabelle
\usepackage[referable]{threeparttablex}
\renewlist{tablenotes}{enumerate}{1}

% geometry
\usepackage[landscape]{geometry}
\geometry{headsep=\baselineskip}

% table
\usepackage{ragged2e} % for \Centering and \RaggedRight macros
\usepackage{booktabs, tabularx} % for well-spaced horizontal lines
\newcolumntype{C}{>{\fontsize{4}{4}\selectfont\raggedright\arraybackslash}X}

%----------------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------------
\begin{document}
%----------------------------------------------------------------------------------------------
\begin{table}
\tiny
 \begin{threeparttable}
\begin{tabularx}{0.22\textwidth}{@{}*{2}{C} @{}}
    \toprule
\textbf{Congenital} & \textbf{Erworben} \\
\midrule
\begin{itemize}[leftmargin=*, noitemsep]
    \item A\tnote{1}
    \item B\tnote{2} 
    \item C \tnote{3}
    \item seltene Aetiologien\vspace*{-\baselineskip} 
\end{itemize}&
\begin{itemize}[leftmargin=*, noitemsep]
    \item A
\end{itemize}\\
    \bottomrule
    \end{tabularx}
\endtabularx
     \begin{tablenotes}
     \begin{tiny}
      \item[1] "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
      \item[2] "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
 \end{tiny}
    \end{tablenotes}
 \end{threeparttable}
\end{table}

\end{document}

My error with the solution error

3
  • 2
    threeparttablex is a package for tables notes in longtable and similar (xltabular).
    – Bernard
    Mar 28, 2021 at 22:27
  • Please, copy code from Overleaf, image is not readable. Also please, add list of errors, which you get at compiling this code. With my MWE compiled in Overleaf, I can't reproduce any error nor warnings.
    – Zarko
    Mar 29, 2021 at 16:04
  • It seems, that you have some troubles with Overleaf. Try to ask its support for the help.
    – Zarko
    Mar 29, 2021 at 16:12

1 Answer 1

2

If I correctly understood your question, you like to get the following result from your MWE:

enter image description here

The MWE for above table is:

\documentclass[]{article}
% geometry
\usepackage[landscape]{geometry}
\geometry{headsep=\baselineskip}

\usepackage[T1]{fontenc}
\usepackage{cfr-lm}

\usepackage{enumitem}% aufzahlungen mit erklärung nach Tabelle


% table
\usepackage{ragged2e} % for \Centering and \RaggedRight macros
\usepackage{booktabs, tabularx} % for well-spaced horizontal lines
\newcolumntype{C}{>{\raggedright\arraybackslash}X}
\usepackage[referable]{threeparttablex}

\begin{document}
\begin{table}
    \scriptsize
\setlist[itemize]{nosep=0pt,
                 leftmargin=*,
                 label=\textbullet,
                 before=\begin{minipage}[t]{\linewidth},
                 after=\end{minipage}}
    \begin{threeparttable}
    \caption{My three part table}
    \label{tab:...}
\begin{tabularx}{0.22\textwidth}{@{}*{2}{C} @{}}
    \toprule
\textbf{Congenital} & \textbf{Erworben} \\
    \midrule
\begin{itemize}
    \item A\tnote{1}
    \item B\tnote{2}
    \item C\tnote{3}
    \item seltene Aetiologien
\end{itemize}   &   \begin{itemize}
                    \item A
                    \end{itemize}\\
    \bottomrule
\end{tabularx}
     \begin{tablenotes}[flushleft]\tiny
      \item[1] "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
      \item[2] "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
      \item[3] "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
8
  • It looks really nice. Thats exactly what I wanted. But I get an error. I use overleaf and at first I canged after=\end{minipage} and placed it after before=\begin{minipage}[t]{\linewidth} But it still makes an error that a \begin{minipage} is endet by \begin{itemize}
    – Elia
    Mar 29, 2021 at 4:46
  • @Elia - I don't get an error message when I compile Zarko's code.
    – Mico
    Mar 29, 2021 at 5:19
  • @ mico could this be to some overleaf problem?
    – Elia
    Mar 29, 2021 at 6:00
  • @Elia, I tested my MWE in Overleaf. It worked fine. Probably you made some changes in my MWE.
    – Zarko
    Mar 29, 2021 at 6:18
  • 1
    @Elia, please copy my MWE as it is in Overleaf and then compile. If your real document has different preamble, please add to my MWE missed packages step by step and compile aster each step. At this take care that a some package will not be loaded twice.
    – Zarko
    Mar 29, 2021 at 6:48

You must log in to answer this question.

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