0

How do I solve this error? When I click on it, overleaf doesn't point me to the line where the error is supposed to be, my document is not even 1876 lines long, I have no idea what is wrong and how to fix it.

/usr/local/texlive/2020/texmf-dist/tex/latex/adjustbox/adjustbox.sty, line 1876
LaTeX Error: Command \splitbox already defined.
Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ...

l.1876 }

Your command was ignored. Type I <command> <return> to replace it with another command, or <return> to continue without it.

I have very few packages loaded

\documentclass[twocolumn]{aastex63}
\usepackage[utf8]{inputenc}
\newcommand{\vdag}{(v)^\dagger}
\newcommand\aastex{AAS\TeX}
\newcommand\latex{La\TeX}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{color,soul}
\usepackage{adjustbox}

I need the adjustbox to fit a long table in one page

\begin{table*}[htp]
    \centering
    \begin{adjustbox}{width=0.9\textwidth,totalheight=0.9\textheight} %,keepaspectratio
    \begin{tabular}{c@{\hspace{3cm}}c@{\hspace{3cm}}c@{\hspace{3cm}}c@{\hspace{3cm}}c}
    \multicolumn{5}{c} {} \\ \hline \hline
campa
  • 31,130
  • 2
    you are loading two packages which define the same command (or you define it before loading adjustbox). – Ulrike Fischer Aug 26 '21 at 08:53
  • the line number is the line in adjustbox.sty that you do not care about, so you could show your example, which only needs to be as far as the point that you include adjustbox. If you minimise the example by removing all packages before that that are not needed to show the problem, you will actually find the answer as if you remove a package and the error goes you have found the clash. – David Carlisle Aug 26 '21 at 09:03
  • Once you figure out which two packages conflict, you can decide which version to keep and set things up so the other gets "undone". However, the specifics will depend on which order you ultimately want the packages to load. – Steven B. Segletes Aug 26 '21 at 09:04
  • 2
    The aastex63 class already defines \splitbox, so the package adjustbox isn't really compatible with the class. The class author(s) should be made aware of this. As alternatives you might want to look at https://tex.stackexchange.com/q/332902/82917, https://tex.stackexchange.com/q/170955/82917, https://tex.stackexchange.com/q/86911/82917, and related. – campa Aug 26 '21 at 09:24
  • 1
    Note that scaling tables should be a non-aim, it makes inconsistent font sizes and rule widths there are always better ways to format a table to stay on page https://tex.stackexchange.com/questions/332902/my-table-doesnt-fit-what-are-my-options – David Carlisle Aug 26 '21 at 09:24
  • 1
    why define \newcommand\latex{La\TeX} (which makes a non standard version of the latex logo) rather than use \LaTeX ? – David Carlisle Aug 26 '21 at 09:28

0 Answers0