Creating Latex Tables with Units Beneath Parameters

  • LaTeX
  • Thread starter leviathanX777
  • Start date
  • Tags
    Latex Units
In summary, the conversation discusses the possibility of putting units of a parameter underneath it in a table instead of next to it. The suggested solutions include specifying text wrapping for each column and adding another row to the table without an \hline or using the \multirow command. The conversation also mentions using the float package and the H option to fix the location of moving images. A suggested solution for the table is to add a row for the units and specify their positions in the table.
  • #1
leviathanX777
42
0
Hello,

I'm just wondering is it possible to put the units of a parameter underneath it rather than next to it. My table is pretty long and I could free up space if I could do this.

For example, let's say I have Velocity (m/s)

I want it to have (m/s) below velocity

I can't figure out how to do this in a table!
 
Last edited:
Physics news on Phys.org
  • #2
I'm by no means an expert, but I'm pretty sure you would have to specify text wrapping on each column when you introduce the table.

Someone please correct me if there is a simpler method.
 
  • #3
if you add another row to the table, I think you can turn off the lines between and you should get something close to what you want.
 
  • #4
Either don't put an \hline between two rows as suggested or use the \multirow command found in the multicol package. Also, if you specify the width (p{*}, * is the width in some unit), [itex]\LaTeX{}[/itex] will automatically wrap text in a table.
 
  • #5
I tried, here's the code but no luck!

\begin{table}[htbp]
\centering
\small
\begin{tabular}{rrrrr}
\toprule
Fabricated & RMS BG (nm) & RMS Flake (nm) & E Mobility (cm$^2$/V.s) & H Mobility (cm$^2$/V.s) \\
\midrule
C2 (small) & 0.683 & 0.316 & 64.1 & 64.4 \\
C2 (big) & 0.984 & 0.565 & & \\
C8 & 0.287 & 1.057 & 171 & 165 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\centering
\caption{Roughness and mobility values of GFEDs as fabricated}
\end{table}%

Also something really annoying has happened now... some of my images don't appear till the end of the document even though there's room for the images where I set them to and using [h!] doesn't put them where I inserted them... gah!
 
  • #6
For the moving images, use the float package and the H option to fix their locations.

For the table, try something like:
Code:
\begin{table}[htbp] 
  \centering 
\small 
 \begin{tabular}{rrrrr} 
    \toprule 
    Fabricated & RMS BG & RMS Flake & E Mobility & H Mobility \\ 
                   & (nm) & (nm) & (cm$^2$/V.s) & (cm$^2$/V.s) \\
    \midrule 
    C2 (small) & 0.683 & 0.316 & 64.1  & 64.4 \\ 
    C2 (big) & 0.984 & 0.565 &       &  \\ 
    C8    & 0.287 & 1.057 & 171   & 165 \\ 
    \bottomrule 
    \end{tabular}% 
  \label{tab:addlabel}% 
\centering   
\caption{Roughness and mobility values of GFEDs as fabricated} 
\end{table}
 

Related to Creating Latex Tables with Units Beneath Parameters

1. How do I format my units in Latex tables?

To format units in Latex tables, you can use the \si{} command from the siunitx package. This command allows you to specify the units for each parameter in your table, ensuring consistency and proper formatting throughout.

2. Can I use different units for different parameters in my table?

Yes, you can use different units for different parameters in your Latex table. The \si{} command allows you to specify the units for each parameter individually, giving you flexibility in your table formatting.

3. How can I align my units beneath their respective parameters in a Latex table?

To align units beneath their respective parameters in a Latex table, you can use the \si{} command in the column header and the \num{} command in the data cells. This will ensure that the units are aligned properly and directly beneath their corresponding parameter.

4. Can I customize the appearance of my units in a Latex table?

Yes, you can customize the appearance of your units in a Latex table by using the options provided by the siunitx package. These options allow you to control the font, size, and other aspects of your units in the table.

5. Is there a way to automatically convert units in a Latex table?

Yes, you can use the \sisetup{} command from the siunitx package to automatically convert units in a Latex table. This command allows you to specify the desired output unit for each parameter, and the package will handle the conversion for you.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
4K
  • Feedback and Announcements
Replies
5
Views
498
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
528
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
20
Views
2K
Back
Top