Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-opus-4-20250514· AnthropicHugging Face LMArena Human Preference 140K

For whatever reason, the hspace is not working to shift the table left (when it used…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Hunyuanhunyuan-turbos-20250416’s answer.
  1. User

    For whatever reason, the hspace is not working to shift the table left (when it used to). How do I fix this?

    \small
    \singlespacing
    \hspace*{-3cm}
    \begin{longtable}{l c c l c c}
    \hline
    \multicolumn{3}{l}{\textbf{Input variables}} & \multicolumn{3}{l}{\textbf{Output variables}} \\
    \hline
    \textbf{Variable} & \textbf{Unit} & $N_z$ & \textbf{Variable} & \textbf{Unit} & $N_z$  \\
    \hline
    Temperature & K & 60 & Heating tendency & K s$^{-1}$ & 60 \\
    Specific humidity & kg kg$^{-1}$ & 60 & Moistening tendency & kg kg$^{-1}$ s$^{-1}$ & 60 \\
    Cloud liquid mixing ratio & kg kg$^{-1}$ & 60 & Cloud liquid mixing ratio tendency & kg kg$^{-1}$ s$^{-1}$ & 60 \\
    Cloud ice mixing ratio & kg kg$^{-1}$ & 60 & Cloud ice mixing ratio tendency & kg kg$^{-1}$ s$^{-1}$ & 60 \\
    Zonal wind speed & m s$^{-1}$ & 60 & Zonal wind tendency & m s$^{-1}$ s$^{-1}$ & 60 \\
    Meridional wind speed & m s$^{-1}$ & 60 & Meridional wind tendency & m s$^{-1}$ s$^{-1}$ & 60 \\
    Ozone volume mixing ratio & mol mol$^{-1}$ & 60 & Net surface shortwave flux & W m$^{-2}$ & 1 \\
    CH4 volume mixing ratio & mol mol$^{-1}$ & 60 & Downward surface longwave flux & W m$^{-2}$ & 1 \\
    N2O volume mixing ratio & mol mol$^{-1}$ & 60 & Snow rate & m s$^{-1}$ & 1 \\
    Surface pressure & Pa & 1 & Rain rate & m s$^{-1}$ & 1 \\
    Solar insolation & W m$^{-2}$ & 1 & Visible direct solar flux & W m$^{-2}$ & 1 \\
    Surface latent heat flux & W m$^{-2}$ & 1 & Near-IR direct solar flux & W m$^{-2}$ & 1 \\
    Surface sensible heat flux & W m$^{-2}$ & 1 & Visible diffused solar flux & W m$^{-2}$ & 1 \\
    Zonal surface stress & N m$^{-2}$ & 1 & Near-IR diffused solar flux & W m$^{-2}$ & 1 \\
    Meridional surface stress & N m$^{-2}$ & 1 & & & \\
    Cosine of solar zenith angle & & 1 & & & \\
    Albedo for diffuse longwave radiation & & 1 & & & \\
    Albedo for direct longwave radiation & & 1 & & & \\
    Albedo for diffuse shortwave radiation & & 1 & & & \\
    Albedo for direct shortwave radiation & & 1 & & & \\
    Upward longwave flux & W m$^{-2}$ & 1 & & & \\
    Ice areal fraction & & 1 & & & \\
    Land areal fraction & & 1 & & & \\
    Sea areal fraction & & 1 & & & \\
    Snow depth over ice & m & 1 & & & \\
    Snow depth over land & m & 1 & & & \\
    \hline
    \multicolumn{2}{l}{Size of stacked vectors} & 557 & \multicolumn{2}{l}{} & 368 \\
    \hline
    \caption{Table showing input and output variables, their units, and their number of vertical levels $N_z$ for the original ClimSim paper.} \label{tab:inputsoutputs_ClimSim1} \\
    \end{longtable}
    
  2. Claude Assistant

    The \hspace*{-3cm} command might not be working as expected for several reasons. Here are some solutions to shift your table to the left:

    Solution 1: Use adjustbox package

    \usepackage{adjustbox}
    
    \begin{adjustbox}{width=\textwidth,center}
    \small
    \singlespacing
    \begin{longtable}{l c c l c c}
    % ... your table content ...
    \end{longtable}
    \end{adjustbox}
    

    Solution 2: Adjust margins temporarily

    \small
    \singlespacing
    \begin{adjustwidth}{-3cm}{0cm}
    \begin{longtable}{l c c l c c}
    % ... your table content ...
    \end{longtable}
    \end{adjustwidth}
    

    (Requires \usepackage{changepage})

    Solution 3: Use @{} in column specification

    \small
    \singlespacing
    \begin{longtable}{@{\hspace{-3cm}}l c c l c c@{}}
    % ... your table content ...
    \end{longtable}
    

    Solution 4: Set table position with \LTleft

    \setlength{\LTleft}{-3cm}
    \small
    \singlespacing
    \begin{longtable}{l c c l c c}
    % ... your table content ...
    \end{longtable}
    \setlength{\LTleft}{\fill} % Reset to default
    

    Solution 5: Use a minipage

    \noindent\hspace*{-3cm}%
    \begin{minipage}{\dimexpr\textwidth+3cm\relax}
    \small
    \singlespacing
    \begin{longtable}{l c c l c c}
    % ... your table content ...
    \end{longtable}
    \end{minipage}
    

    The most reliable approach is usually Solution 4 with \LTleft, as it's specifically designed for longtable positioning. If you need the table to extend into both margins, you can combine it with \LTright:

    \setlength{\LTleft}{-1.5cm}
    \setlength{\LTright}{-1.5cm}
    

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.