I would like to know how to center the listings gerenated caption in LaTeX. It always go to the left of the code. The rest of the captions (tables) are OK.

\documentclass[11pt,a4paper,oneside, onecolumn]{IEEEtran}
\begin{lstlisting}[caption={Exemplo de uso da função CorelDB.},label={list1}]
fileName = 'CorelGCH.arff';
features = CorelDB(@NormalizedGCH);
dlmwrite(fileName, features, ',');

I think the problem is with the IEEEtran...


1 Answer 1


To center the caption in the class IEEEtran you have two possibilities:

  1. Load the class with the option conference. This was discussed at LaTeX Community: Cannot align caption to the center,

  2. Load the package caption with the option justification=centering:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .