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
6
  • 2
    you are loading two packages which define the same command (or you define it before loading adjustbox). Commented Aug 26, 2021 at 8: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. Commented Aug 26, 2021 at 9:03
  • 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 tex.stackexchange.com/q/332902/82917, tex.stackexchange.com/q/170955/82917, tex.stackexchange.com/q/86911/82917, and related.
    – campa
    Commented Aug 26, 2021 at 9: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 tex.stackexchange.com/questions/332902/… Commented Aug 26, 2021 at 9:24
  • 1
    why define \newcommand\latex{La\TeX} (which makes a non standard version of the latex logo) rather than use \LaTeX ? Commented Aug 26, 2021 at 9:28

0

You must log in to answer this question.

Browse other questions tagged .