6

The popular question Regarding the `book`, `report`, and `article` document classes: what are the main differences? collects many differences between the book, report and article classes. In particular, some commands are not available in articles (like \chapter) while others are not defined for books (like \abstract). What is the reason for these differences in functionality/availability of commands?


Some details: It is obvious that the current system has some disadvantages if one likes to switch from one classes to another one. For example, 'downgrading' a report with chapters to an article does not even compile and needs some manual work (or workaround). On the other hand, I can see that certain commands don't apply literally to all kinds of documents. In an article one would probably not speak of chapters or include back matters. Nonetheless, viewing the corresponding commands just as a way to structure the document does make sense. That is, there is no problem in regarding \chapter as the highest level heading and \front|main|backmatteras a way to tell latex 'now comes the following thing, so maybe change the formatting accordingly'. Of course the styling and effect of these commands have to be different in an article vs book.

So the refined question is: what is the advantage of the current classes versus a base class providing the same commands with an option for the style.

11
  • 2
    I see no reason for switching from article to book; I see no reason for using report either.
    – egreg
    Commented Aug 29, 2015 at 14:27
  • 2
    There are some cases in which you want to switch the class. The project might develop from something small to a whole book. Or you simply want to reuse parts of an article directly in a book. Or send your supervisor the latest chapter in a complete and nicely formatted way. That is, you run into this situation nearly every time you don't know from the outset how big your final document will be. (Don't understand me wrong; I do know that each of these cases can be handled in some way or another...I simply don't understand why there should be an additional layer of difficulty). Commented Aug 29, 2015 at 14:34
  • "In an article one would probably not speak of chapters or include back matters." -- I expect that's largely the reason for the differences. If a division or other structuring element is irrelevant to a particular class, it's just not present. Alternatively, one could bite the bullet and move to the memoir class (from section 6.2): "When the article option is in effect, however, things are slightly different. New chapters do not necessarily start on a new page. The \mainmatter command just turns on sectional numbering ..." Commented Aug 29, 2015 at 15:57
  • Don't get me wrong, I love memoir, but using it correctly is a new learning curve from the regular document classes and commonly-used packages. Commented Aug 29, 2015 at 15:59
  • 2
    It could also be that you want to combine a bunch of articles to a book -- which is rather easy with the current code, you only need to set the titles as chapter, but would be difficult if the articles would already use \chapter. For me articles don't have chapters, and I don't think if is good markup to use the word \chapter only because it make some coding easier. If you need switchable commands define some wrapper command, e.g. \let\topsection\section and use this. Commented Aug 29, 2015 at 17:18

1 Answer 1

12

book, report and article are all generated from the same source (classes.dtx) and the differences that you mention are essentially the only differences there are. If they were no such differences then essentially there would only be one standard class.

By design, article omits the \chapter level, to make it slightly easier to combine articles into a report or book.

Book contains commands for frontmatter and backmatter that typically are not relevant in a journal article, and there are different defaults for twoside etc between the classes but essentially that is it.

You must log in to answer this question.

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