1

I am using IEEEtran.cls for a write-up. I needed to include a longtable in the text spanning two columns, so I changed to \onecolumn in order to accommodate the table. After the table, I wished to return to two columns using \twocolumn at the end of the paper i.e., before acknowledgement section. Everything worked fine, however, the problem is, I observed that the text after the \twocolumn command is centered as shown in the following figure. How can I change this to the traditional IEEE justification, i.e., not center-aligned?

Sample figure

  • 1
    \twocolumn doesn't affect text justification, you will have an error in the markup of the acknowledgement, but as you have given no indication of the code you used it is impossible to say what is wrong – David Carlisle Sep 24 '17 at 10:41
  • 1
    Did you use the \centering directive for your long table, per chance? – Bernard Sep 24 '17 at 10:42
  • @Benard, yes, I used the \centering directive for the long table – Abdulhameed Sep 24 '17 at 13:10
  • @Mico, loading \ragged2e in the package preamble works with \justifying as you mentioned. Thanks – Abdulhameed Sep 24 '17 at 13:17
  • 2
    not only are longtables centred automatically, \centering, \raggedright etc have no effect at all on longtable as the table is always the full width of the page, to allow page breaking. – David Carlisle Sep 24 '17 at 13:45
1

The crucial piece of information, which you provide in a comment in response to @Bernard's query, is that you use a \centering directive -- presumably to center the material in the longtable environment, right?

It appears to be the case that you failed to delimit the scope of the \centering directive (say, by surrounding its intended scope with \begingroup and \endgroup). Hence, the \centering directive applies to the entire remainder of the document, and not just to the longtable environment. Somewhat ironically, maybe, longtable isn't even affected by the \centering directive, as David Carlisle has pointed out in a comment. (longtable environments are set up to automatically occupy the full width of the text block; that's why centering them has no effect.)

The easiest, cleanest, and only sensible remedy is to simply omit the \centering directive.

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.