TransWikia.com

Is it okay to use center and justify without endcenter and endjustify?

TeX - LaTeX Asked by John Kormylo on April 13, 2021

I would argue no. I know that endcenter and endjustify are not trivial (both call endtrivlist). While they do not generate error messages, that does not mean they don’t produce errors, just that the errors may be subtle and hard to trace. If I see code which uses them that behaves oddly, my first response is to comment them all out and see if that fixes the problem.

However, I don’t recall finding an actual case of errors caused by improperly nested center and justify environments. It is possible that they were designed to be used that way as well as with begin{center} etc?

One Answer

The declaration form for centering is centering (center should never be used: it is just the internal implementation of the center environment, certainly never use without the matching end)

Similarly, the ragged2e package which provides a justify environment provides a declaration form justifying (although there are few circumstances where either should be used.)

Correct answer by David Carlisle on April 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP