2

I've been trying to fix this but to no avail. Is there a way to move the alignment of the rotated text in the attached figure? as shown in the attached figure I'm using LLNCS document class. My current code is

\usepackage{graphicx}
\usepackage{booktabs, makecell, tabularx}
\usepackage{rotating}
\usepackage[export]{adjustbox}
\begin{figure*}[t!]
% \setlength\tabcolsep{1pt}
\settowidth\rotheadsize{Unhyperlink}
\begin{tabularx}{0.8\linewidth}{c c c c c}
\rothead{{Hyperlink}}    &  \includegraphics[width=0.13\paperwidth]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth]{img.jpg}  
                        &  \includegraphics[width=0.13\paperwidth]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth]{img.jpg}\\  
                        % \addlinespace[1pt]
                        % \hline
\rothead{{Unhyperlink}} &   \includegraphics[width=0.13\paperwidth]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth]{img.jpg}\\
\end{tabularx}
\caption{Contoh}
\label{fig_seq}
\end{figure*}
4

2 Answers 2

0

There is no need to use (and load) tabularx if you're not going to insert an X-column. Also, rather set elements based on \linewidth (or \textwidth), not \paperwidth. A vertical mis-alignment in the indices (Hyperlink and Unhyperlink) is corrected by rotating a \smashed version, together with a centred vertical align thanks to adjustbox.

enter image description here

\documentclass{llncs}

\usepackage[export]{adjustbox}

\begin{document}

\begin{figure}
  \begin{tabular}{ *{5}{c} }
    ~\rotatebox[origin=c]{90}{\smash{Hyperlink}}~~
        \includegraphics[valign=c,width=0.2\linewidth]{example-image}
      & \includegraphics[valign=c,width=0.2\linewidth]{example-image}
      & \includegraphics[valign=c,width=0.2\linewidth]{example-image}
      & \includegraphics[valign=c,width=0.2\linewidth]{example-image} \\ \\
    ~\rotatebox[origin=c]{90}{\smash{Unhyperlink}}~~
        \includegraphics[valign=c,width=0.2\linewidth]{example-image}
      & \includegraphics[valign=c,width=0.2\linewidth]{example-image}
      & \includegraphics[valign=c,width=0.2\linewidth]{example-image}
      & \includegraphics[valign=c,width=0.2\linewidth]{example-image}
  \end{tabular}
  \caption{A figure}
\end{figure}

\end{document}
0

With the valign=c option from the adjustbox package that you already load:

enter image description here

\documentclass{article}

\usepackage[demo]{graphicx} %<---- remove demo option in real document
\usepackage{booktabs, makecell, tabularx}
\usepackage{rotating}
\usepackage[export]{adjustbox}

\begin{document}
\begin{figure*}[t!]
% \setlength\tabcolsep{1pt}
\settowidth\rotheadsize{Unhyperlink}
\begin{tabularx}{0.8\linewidth}{c c c c c}
\rothead{{Hyperlink}}    &  \includegraphics[width=0.13\paperwidth, valign=c]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth, valign=c]{img.jpg}  
                        &  \includegraphics[width=0.13\paperwidth, valign=c]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth, valign=c]{img.jpg}\\  
                         \addlinespace
                        % \hline
\rothead{{Unhyperlink}} &   \includegraphics[width=0.13\paperwidth, valign=c]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth, valign=c]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth, valign=c]{img.jpg}
                        &  \includegraphics[width=0.13\paperwidth, valign=c]{img.jpg}\\
\end{tabularx}
\caption{Contoh}
\label{fig_seq}
\end{figure*}

\end{document}

You must log in to answer this question.

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