Seite 1 von 1

Frage zu Tabellen

Verfasst: Di 2. Aug 2016, 13:51
von AnneB
Hallo an alle,

ich bastel gerade an einer Tabelle für einen Projektbericht. Ich schreibe den Bericht mit der APA6-Vorlage (https://www.ctan.or/pkg/apa6?lang=de). Ich habe da den folgenden Code gefunden, der im Großen und Ganzen schon meinen Wünschen entspricht. Leider kann ich aber nicht herausfinden, wie ich die linke Spalte nochmal unterteile. Ich will also zu "Categorial-onset", "Probabilistic" und "Categorial-coda" noch jeweils Unterpunkte mit eigenen Daten.
Kann mir jemand helfen, wie ich das hinbekomme?

Danke und viele Grüße!
Anne

\documentclass{apa6}
\usepackage{threeparttable}
\usepackage{booktabs}
\begin{document}

\begin{table}
	\begin{threeparttable}
		\caption{A More Complex Decked Table}
		\label{tab:DeckedTable}
		\begin{tabular}{@{}lrrr@{}}         \toprule
			Distribution type  & \multicolumn{2}{l}{Percentage of} & Total number   \\
			& \multicolumn{2}{l}{targets with}  & of trials per  \\
			& \multicolumn{2}{l}{segment in}    & participant    \\ \cmidrule(r){2-3}
			&  Onset  &  Coda            &          \\ \midrule
			Categorical -- onset\tabfnm{a}  &    100  &     0            &  196     \\
			Probabilistic                   &     80  &    20\tabfnm{*}  &  200     \\
			Categorical -- coda\tabfnm{b}   &      0  &   100\tabfnm{*}  &  196     \\ \midrule
		\end{tabular}
		\begin{tablenotes}[para,flushleft]
			{\small
				\textit{Note.} All data are approximate.

				\tabfnt{a}Categorical may be onset.
				\tabfnt{b}Categorical may also be coda.

				\tabfnt{*}\textit{p} < .05.
				\tabfnt{**}\textit{p} < .01.
			}
		\end{tablenotes}
	\end{threeparttable}
\end{table}
\end{document}


Verfasst: Mi 3. Aug 2016, 10:51
von markusv
Wenn ich deine Frage richtig verstanden habe, suchst du so etwas in der Art?!?
\documentclass{apa6} 
\usepackage{threeparttable} 
\usepackage{booktabs} 
\begin{document} 

\begin{table} 
   \begin{threeparttable} 
      \caption{A More Complex Decked Table} 
      \label{tab:DeckedTable} 
      \begin{tabular}{@{}llrrr@{}}         
      \toprule 
        Distribution type  && \multicolumn{2}{l}{Percentage of} & Total number   \\
        && \multicolumn{2}{l}{targets with}  & of trials per  \\ 
        && \multicolumn{2}{l}{segment in}    & participant    \\ 
        \cmidrule(r){3-4}
        &&  Onset  &  Coda            &          \\ \midrule 
        Categorical -- onset\tabfnm{a}  &Unterteilung 1&    100  &     0 &196  \\
         &Unterteilung 2&&&\\
         &Unterteilung 3&&&\\
         \midrule
         Probabilistic  &Unterteilung 1&  80  &  20\tabfnm{*}  &  200 \\
         &Unterteilung 2&&&\\
         &Unterteilung 3&&&\\
         \midrule
         Categorical -- coda\tabfnm{b}  &Unterteilung 1& 0 & 100\tabfnm{*}  &  196\\
         &Unterteilung 2&&&\\
         &Unterteilung 3&&&\\
         \midrule
       \end{tabular} 
      \begin{tablenotes}[para,flushleft] 
         {\small 
            \textit{Note.} All data are approximate. 

            \tabfnt{a}Categorical may be onset. 
            \tabfnt{b}Categorical may also be coda. 

            \tabfnt{*}\textit{p} < .05. 
            \tabfnt{**}\textit{p} < .01. 
         } 
      \end{tablenotes}
   \end{threeparttable} 
\end{table} 
\end{document}  

Verfasst: Mi 3. Aug 2016, 22:01
von AnneB
Genau das habe ich gesucht, vielen vielen Dank! :D