TransWikia.com

How can I center the text in my table, so the information is closer in the pdf?

TeX - LaTeX Asked on May 1, 2021

I have programmed the following table in my document, but there is so much space between each column.

enter image description here

I would like to reduce the horizontal space so it looks nicer. Jut like this example.

enter image description here

My code is below and any suggestion(s) are more than welcome.

begin{table}[ht]
        centering
        caption{ Radiometric and photometric units for light intensity characterization. Radiometric units describe the absolute radiant energy, whereas photometric describe brightness as perceived by the human eye. }
        label{tbl:radiometri_photometric}
        begin{center}
            
            begin{tabular}{*{6}{p{.16linewidth}}}
                toprule
                multicolumn{6}{c}{Radiometric} 
                toprule
                multicolumn{2}{p{.33linewidth}}{Symbol} & multicolumn{2}{p{.33linewidth}}{Quantity} & 
                multicolumn{2}{p{.33linewidth}}{Unit} 
                midrule
                multicolumn{2}{l}{$Phi_e$} & multicolumn{2}{l}{Radiant flux} & multicolumn{2}{l}{si{watt}} 
                multicolumn{2}{l}{$E_e$} & multicolumn{2}{l}{Irradiance} & multicolumn{2}{l}{si{wattpersquaremeter}} 
                multicolumn{2}{l}{$I_e$} & multicolumn{2}{l}{Radiant intensity} & multicolumn{2}{l}{si{wattpersteradian}} 
                multicolumn{2}{l}{$L_e$} & multicolumn{2}{l}{Radiance} & multicolumn{2}{l}{si{wattper(squaremetercdotsteradian)}} 
                bottomrule
                
                %toprule
                multicolumn{6}{c}{Photometric} 
                %toprule
                %multicolumn{3}{p{.49linewidth}}{School} & multicolumn{3}{p{.49linewidth}}{State} & 
                %multicolumn{2}{p{.33linewidth}}{Unit} 
                midrule
                multicolumn{2}{l}{$Phi_v$} & multicolumn{2}{l}{Luminous flux} & multicolumn{2}{l}{Lumen (lm)=si{candelacdotsteradian}} 
                multicolumn{2}{l}{$E_v$} & multicolumn{2}{l}{Illuminance} & multicolumn{2}{l}{Lux(lx)=si{candelacdotsteradianpersquaremeter}} 
                multicolumn{2}{l}{$I_v$} & multicolumn{2}{l}{Luminous intensity} & multicolumn{2}{l}{Candela (cd) = si{lmpersteradian}} 
                multicolumn{2}{l}{$L_v$} & multicolumn{2}{l}{Luminance} & multicolumn{2}{l}{Nit (nt) = si{candelapersquaremeter}} 
                bottomrule
            end{tabular}
        end{center}
    end{table}

One Answer

documentclass{article}
usepackage{array}
usepackage{caption}
usepackage{booktabs}
usepackage{siunitx}

begin{document}


begin{table}[ht]
centering
caption{ Radiometric and photometric units for light intensity characterization. Radiometric units describe the absolute radiant energy, whereas photometric describe brightness as perceived by the human eye. }
label{tbl:radiometri_photometric}
begin{tabular}{@{}lll@{}}
    toprule
    multicolumn{3}{c}{Radiometric} 
    midrule
    Symbol & Quantity & Unit 
    midrule
    $Phi_e$ & Radiant flux & si{watt} 
    $E_e$ & Irradiance & si{wattpersquaremeter} 
    $I_e$ & Radiant intensity & si{wattpersteradian} 
    $L_e$ & Radiance & si{wattper(squaremetercdotsteradian)} 
    midrule
    multicolumn{3}{c}{Photometric} 
    midrule
    $Phi_v$ & Luminous flux & Lumen (lm)=si{candelacdotsteradian} 
    $E_v$ & Illuminance & Lux(lx)=si{candelacdotsteradianpersquaremeter} 
    $I_v$ & Luminous intensity & Candela (cd) = si{lmpersteradian} 
    $L_v$ & Luminance & Nit (nt) = si{candelapersquaremeter} 
    bottomrule
end{tabular}
end{table}


end{document}

Output of the above code

Correct answer by F. Pantigny on May 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP