0

This thread is the continua of the thread here. I want to set the centers of the rows (YLEIS, EPAJARJESTYS) at the same position such that the approach works also with any number of rows. Code

\documentclass{beamer}
\usepackage[english]{babel}
\usetheme{Berkeley}
\usepackage{microtype}% more flexibility for narrow columns
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{adjustbox}

\usepackage{eforms}

\begin{document}
\begin{frame}
\begin{adjustbox}{max width=1.1\textwidth,center}
\begin{table}[!ht]
\centering
    % TODO have Form options in the table cells
    \begin{tabular}{|l|l|l|l|l|l|l|l|l|}
    \hline
    \textbf{Key} & 
        \textbf{V2} & \textbf{V1} & \textbf{V0} 
        & \textbf{SCORE} 
        & \textbf{P1} & \textbf{P2} & \textbf{P3} 
        & \textbf{Critical} \\ \hline
        &  &  &  & 1. Skills &  &  &  & \\ \hline
    \end{tabular}
\end{table}
\end{adjustbox}

    \begin{tabular}{lll}
    V2 & V1 & V0  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}
    &
    \end{tabular}
    %
    YLEIS
    %
    \begin{tabular}{lll}
    P1 & P2 & P3  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}
    &
    \end{tabular}

    \begin{tabular}{lll}
    V2 & V1 & V0  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}
    &
    \end{tabular}
    %
    EPAJARJESTYS
    %
    \begin{tabular}{lll}
    P1 & P2 & P3  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}
    &
    \end{tabular}

\end{frame}

\begin{frame}
% Show reproduction of the answers in the next sheet. 

\end{frame}
\end{document}

Fig. 1 Output

enter image description here

Expected output: row names aligned at the center

Teting Ulrike's approach with minimal headings

Code

\documentclass{beamer}
\usepackage[english]{babel}
\usetheme{Berkeley}
\usepackage{microtype}% more flexibility for narrow columns
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{adjustbox}

\usepackage{eforms}

\begin{document}
\begin{frame}
\begin{adjustbox}{max width=1.1\textwidth,center}
%    % TODO have Form options in the table cells
    \begin{tabular}{|l|l|l|l|l|l|l|l|l|}
    \hline
    \textbf{Key} &
        \textbf{V2} & \textbf{V1} & \textbf{V0}
        & \textbf{SCORE}
        & \textbf{P1} & \textbf{P2} & \textbf{P3}
        & \textbf{Critical} \\ \hline
        &  &  &  & 1. Skills &  &  &  & \\ \hline
    \end{tabular}
\end{adjustbox}

\begin{tabular}{@{}lll@{}}
    \begin{tabular}{lll}
    V2 & V1 & V0  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}    
    \end{tabular}
    &
    YLEIS
    &
    \begin{tabular}{lll}
    P1 & P2 & P3  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}
    \end{tabular}\\
    \begin{tabular}{lll}
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}    
    \end{tabular}
    &
    EPAJARJESTYS
    &
    \begin{tabular}{lll}
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}    
    \end{tabular}
\end{tabular}    

\end{frame}

\end{document}

Fig. 2 Output where the checkboxes are not aligned

enter image description here

OS: Debian 9
TeXLive: 2017 manual installation at /usr/local/
Acrotex and eforms: here

1 Answers1

2

Your code doesn't compile, a number of your tabulars have to many cells in a row, and also you shouldn't put a table inside an adjustbox. Beside this: I would probably use an external tabular to align the boxes:

\documentclass{beamer}
\usepackage[english]{babel}
\usetheme{Berkeley}
\usepackage{microtype}% more flexibility for narrow columns
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{adjustbox}

\usepackage{eforms}

\begin{document}
\begin{frame}
\begin{adjustbox}{max width=1.1\textwidth,center}
%    % TODO have Form options in the table cells
    \begin{tabular}{|l|l|l|l|l|l|l|l|l|}
    \hline
    \textbf{Key} &
        \textbf{V2} & \textbf{V1} & \textbf{V0}
        & \textbf{SCORE}
        & \textbf{P1} & \textbf{P2} & \textbf{P3}
        & \textbf{Critical} \\ \hline
        &  &  &  & 1. Skills &  &  &  & \\ \hline
    \end{tabular}
\end{adjustbox}

\begin{tabular}{@{}lll@{}}
   \begin{tabular}{lll}
    V2 & V1 & V0  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}    
    \end{tabular}
    &
    YLEIS
    &
    \begin{tabular}{lll}
    P1 & P2 & P3  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}
    \end{tabular}\\
    \begin{tabular}{lll}
    V2 & V1 & V0  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}    
    \end{tabular}
    &
    EPAJARJESTYS
    &
    \begin{tabular}{lll}
    P1 & P2 & P3  \\
    \radioButton{mybuttom}{1em}{1em}{1}
    &
    \radioButton{mybuttom}{1em}{1em}{2}
    &
    \radioButton{mybuttom}{1em}{1em}{3}    
    \end{tabular}
\end{tabular}    

\end{frame}

\end{document}

enter image description here

Ulrike Fischer
  • 327,261
  • Please, see the body for the proposal of the minimum approach but the checkboxes are not anymore aligned. What do you think? – Léo Léopold Hertz 준영 Oct 08 '17 at 08:12
  • I think you should get some book about tabulars in LaTeX and learn about the various column types and what they do. Also I already told you once not to extend existing questions. This is not a discussion forum and I don't want to constantly have to adapt answers because you changed the question. This also means the question with the new bounty. – Ulrike Fischer Oct 08 '17 at 12:34