1

I try to align my first row in a table. Only the first row needs another alignment.

%-----TABLE-----%
\begin{table}[H]
    \begin{tcolorbox}
    [
        tabularx={|Y|Y|Y|Y|Y|Y|Y|Y|},
        title=Uitvoeringstijd Full Search Algoritme (in ms),
        Table1
    ]
        tE      & blocksize & search-window & omroepster & tennis & vaneigens & vliegtuig & werkman \\ 
        \hline
        \hline
        0,00\%  & 8x8       & +8           & 20235      & 46191  &           &           &         \\
        0,50\%  & 8x8       & +8           & 251        & 17048  &           &           &         \\
        1,00\%  & 8x8       & +8           & 138        & 10226  &           &           &         \\
        0,00\%  & 16x16     & +8           & 11155      &        &           &           &         \\
        0,50\%  & 16x16     & +8           & 128        &        &           &           &         \\
        1,00\%  & 16x16     & +8           & 82         &        &           &           &         \\
        0,00\%  & 32x32     & +8           & 7843       &        &           &           &         \\
        0,50\%  & 32x32     & +8           & 73         &        &           &           &         \\
        1,00\%  & 32x32     & +8           & 60         &        &           &           &         \\
        0,00\%  & 8x8       & +16          & 66340      &        &           &           &         \\
        0,50\%  & 8x8       & +16          & 459        &        &           &           &         \\
        1,00\%  & 8x8       & +16          & 127        &        &           &           &         \\
        0,00\%  & 16x16     & +16          & 46148      &        &           &           &         \\
        0,50\%  & 16x16     & +16          & 158        &        &           &           &         \\
        1,00\%  & 16x16     & +16          & 81         &        &           &           &         \\
        0,00\%  & 32x32     & +16          & 32705      &        &           &           &         \\
        0,50\%  & 32x32     & +16          & 61         &        &           &           &         \\
        1,00\%  & 32x32     & +16          & 57         &        &           &           &         \\
        0,00\%  & 8x8       & +32          & 285377     &        &           &           &         \\
        0,50\%  & 8x8       & +32          & 1671       &        &           &           &         \\
        1,00\%  & 8x8       & +32          & 218        &        &           &           &         \\
        0,00\%  & 16x16     & +32          & 175305     &        &           &           &         \\
        0,50\%  & 16x16     & +32          & 255        &        &           &           &         \\
        1,00\%  & 16x16     & +32          & 85         &        &           &           &         \\
        0,00\%  & 32x32     & +32          & 136241     &        &           &           &         \\
        0,50\%  & 32x32     & +32          & 74         &        &           &           &         \\
        1,00\%  & 32x32     & +32          & 68         &        &           &           &        
    \end{tcolorbox}
    \caption[Tabel Cerlce]{Tabel Cercle}
    \label{tab: Tabel Cercle Brugge}
\end{table}
  • 4
    Welcome to TeX - LaTeX! Can you clarify what type of alignment you wish to get, e.g. provide a sketch of the required output. – Andrew Swann Dec 18 '15 at 15:11
  • 1
    And please, make your MWE complete, i.e. with \begin{document} ..<used packages and column definition> \begin{document} ...<your table with only few rows> ... \end{document}. – Zarko Dec 18 '15 at 16:35
  • Are you after e.g. \multicolumn{1}{l}{tE}? – Torbjørn T. Dec 27 '15 at 21:43
1

Since you didn't provide complete MWE I was faced with ungratefull task to make own. Since from your question is not clear, how to be formated first row, I decided to format table according to my taste:

enter image description here

(in table I consider only few first rows).

\documentclass{article}
    \usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
    \usepackage[dvipsnames,table]{xcolor}
    \usepackage[many]{tcolorbox}
    \usepackage{siunitx}
    \usepackage{stackengine}

    \usepackage[margin=25mm,showframe]{geometry}

    \begin{document}
\begin{table}[htb]
\sisetup{table-format = 6.2}
\tcbset{enhanced,
        fonttitle=\bfseries\large,fontupper=\normalsize\sffamily,
        colback=yellow!10!white,colframe=red!50!black,colbacktitle=orange!30!white,
        coltitle=black,center title}
    \begin{tcolorbox}
    [
        tabularx={|*{3}{Y|}*{6}{S|}},
        title={Uitvoeringstijd Full Search Algoritme (in ms), Table1}
    ]
tE      &   blocksize 
                &   \stackon{window}{search-}
                        &   {omroepster} 
                                &   {tennis} 
                                        & {vaneigens}
                                                &   {vliegtuig}
                                                        &   {werkman}   \\
        \hline\hline
0,00\%  & 8x8   & +8    & 20235 & 46191 &       &       &               \\
0,50\%  & 8x8   & +8    & 251   & 17048 &       &       &               \\
1,00\%  & 8x8   & +8    & 138   & 10226 &       &       &               \\
0,00\%  & 16x16 & +8    & 11155 &       &       &       &               \\
0,50\%  & 16x16 & +8    & 128   &       &       &       &               \\
1,00\%  & 16x16 & +8    & 82    &       &       &       &               \\
0,00\%  & 32x32 & +8    & 7843  &       &       &       &               \\
    \end{tcolorbox}
    \caption[Tabel Cerlce]{Tabel Cercle}
    \label{tab: Tabel Cercle Brugge}
\end{table}
    \end{document}

In formatting of table I use packages siunuitx (better alignment of numbers in table), stackengine (for two line head of third column). Column heads are still centered (I assume, that was task `` type for columns, all table remind me to example given in manual for tcolorbox), however, I may be wrong.

With package geometry with option showframe I set-up page and look how table fit in page. See, if so formatted table looks nice/usable to you.

  • @RubenDefour, see if my answer can help you. – Zarko Dec 28 '15 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.