When trying to force an image to be centered, I get the following error:

! Package keyval Error: center undefined.See the keyval package documentation for explanation.Type H for immediate help.... {\sffamily\centering }

This is the code I am using

      \includegraphics[width=200pt, center]{./pictures/arcsdeobr.png}
      \caption[ArcSDE logic]{ArcSDE logic(source: ArcSDE)}
      \label{fig:ArcSDE logic}

My classmate that has been using the same template does not have this issue when using "center".


center is not a standard key for \includegraphics. Use \centering, if you want to center the contents of the figure:

  \caption[ArcSDE logic]{ArcSDE logic(source: ArcSDE)}
  \label{fig:ArcSDE logic}

This answer explains:

To align images inside a figure easily you can use the adjustbox package which allows you to add alignment keys to \includegraphics

So adding the following code somewhere before that code should do the trick:


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.