5

I am trying draw table. I use adjustbox package. I loaded this package in separate file. That separate file contains the packages I use.

\usepackage{inputenc}
\usepackage{graphicx,color}
\usepackage{caption}
\usepackage{Files/bibspacing}
\usepackage[round, sort&compress, numbers, authoryear]{natbib}
\setlength{\bibsep}{6pt}
\usepackage[version=3]{mhchem}
\usepackage{marvosym}
\usepackage[T1]{fontenc}
\usepackage{textcomp,gensymb}
\usepackage{subfigure}
\usepackage{float}
\usepackage{comment}
\usepackage{bibentry}
\usepackage{hanging}
\usepackage{verbatim}   % Needed for the "comment" environment to make LaTeX comments
\usepackage{xcolor,colortbl}
\usepackage{pstricks}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
\usepackage[normalem]{ulem}
\usepackage{paralist}
\usepackage{setspace} 
\usepackage{mathptmx}           %(for text and formulas)
\usepackage{lipsum}
\usepackage[english]{babel}
\usepackage[pangram]{blindtext}
\usepackage{fixltx2e}
\usepackage{tabularx,ragged2e}
\usepackage{booktabs}
\usepackage{pdflscape}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage[capitalise]{cleveref}
\usepackage{fixltx2e}
\usepackage{color}
\usepackage{bpchem}
\usepackage{mathtools}
\usepackage{xfrac}
\usepackage{nicefrac}
\usepackage{etoolbox}
\usepackage{catoptions}
\usepackage{adjustbox}

Below is the code I use to draw my table.

\begin{table}[ht]
\label{tbl:jadualS1} % is used to refer this table in the text
\caption{Values for dihedral angles.}
\centering
\begin{adjustbox}{width=1\textwidth}
\begin{tabular}{l|c|c|c|c} % centered columns (4 columns)
\toprule 

  & $\Phi$(H1-C1-O1-C4') & $\Psi$(C1-O1-C4'-H4') & & Ref    \\

 \midrule

malto & -36.0 & -49.0 & - & \cite{Ott1996}  \\
cello &  48.0 & -25.0 & - & \cite{Ham1970}  \\
 & $\Phi$(O5-C1-O1-C6') & $\Psi$(C1-O1-C6'-C5') & $\Omega$(O1-C6'-C5'-C4') & \\
isomal & -49.2 & 167.3 & -45.3 & \cite{Jeffrey1991} \\
\bottomrule
\end{tabular}
\end{adjustbox}
\end{table}

When I compile I get error message as "Command \clipbox already defined. }"

How to overcome this error?

  • Please reedit your question to contain a self contained example we can copy an run our self. (1) There is no indication of documentclass, (2) surely not all those packages are relevant for this problem. BTW: the process to preparing a truly minimal example often ends up giving the answer to the error, so it is a valuable lesson – daleif Dec 30 '14 at 10:10
  • 2
    BTW2: generally it is better to redesign a table, than to scale it, and (3) You have placed the \label in the wrong place, it goes after \caption. – daleif Dec 30 '14 at 10:11
  • 2
    dopn't load epsfig package – David Carlisle Dec 30 '14 at 10:15
8

pstricks defines a \clipbox command which clashes with adjustbox you can arrange to avoid that, but do you really need to load all those packages? it looks like there are lots of packages loaded that you do not need. epsfig should never be loaded, fixltx2e should always be loaded first you reference it twice, neither at the beginning, you load inputenc without specifying an encoding, so it does nothing useful.

So your best course of action is to delete every \usepackage that you do not use in the document, then see if you still have a clash.

If you do then if you add

\let\clipbox\relax

after loading pstricks it will be undefined when you later load adjustbox. But only do this if you really need both packages.

In particular scaling text such as

\begin{adjustbox}{width=1\textwidth}
\begin{tabular}{

almost always produces a typographically poor result as it produces inconsistent font sizes.

You don't enlarge the text in a normal paragraph to make it stretch to the page size, so why do that for text that happens to be in a table?

  • #David Carlisle, I found out the packages pstricks, pst-grad, and pst-plot giving the error. Thanks for the indication. Well I am use those packages for some special characters. I use \let\clipbox\relax after pstricks and associated packages. Now the compilation running fine. I use the ajustbox package to fit my table into a page and I get the info from (tex.stackexchange.com/questions/121155/…). Thanks for all. – Vijay Dec 30 '14 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.