Creating Latex Tables with Units Beneath Parameters

  • Context: LaTeX 
  • Thread starter Thread starter leviathanX777
  • Start date Start date
  • Tags Tags
    Latex Units
Click For Summary

Discussion Overview

The discussion revolves around formatting tables in LaTeX, specifically the placement of units beneath parameter names to save space in long tables. Participants explore various methods to achieve this layout while addressing related issues with image placement in documents.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about placing units beneath parameter names in a LaTeX table to optimize space.
  • Another suggests specifying text wrapping for each column as a potential solution.
  • A different participant proposes adding an additional row without lines between them to achieve the desired format.
  • Another response recommends using the \multirow command from the multicol package and adjusting column width to allow for text wrapping.
  • A participant shares their LaTeX code but expresses frustration that it does not work as intended and mentions issues with images not appearing where expected.
  • In response to the image placement issue, a participant advises using the float package with the H option to fix image locations.
  • Another participant provides a modified table code example that includes units in a second row beneath the parameter names.

Areas of Agreement / Disagreement

Participants present multiple approaches to formatting the table and addressing image placement, but no consensus is reached on a single best method. The discussion remains open with various suggestions and ongoing challenges.

Contextual Notes

Some suggestions depend on specific LaTeX packages and commands, which may not be universally applicable. The effectiveness of proposed solutions may vary based on the document's overall structure and settings.

leviathanX777
Messages
39
Reaction score
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
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.
 
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.
 
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.
 
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!
 
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}
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K