What is the advantage of using minimal document class over article document class when creating a standalone graphic?

Bonus question:

Before I have time to make a test by myself, is there anybody here know whether minimal will compile faster than article?

  • 10
    Good question. I have just been using the standalone class since it was specifically created for use in standalone graphics. Jun 17, 2011 at 6:10
  • 7
    @Peter, @all: Note that the standalone class (written by me) uses the article class internally. As Stefan points out minimal doesn't define some font related macros like the fonts size commands so it is not really useful for standalone drawings. However, any other class can be used using the class=<class name> as class option for standalone class. Jun 17, 2011 at 11:04
  • @Martin: The wildcard @all really works? Jun 17, 2011 at 11:08
  • @xport: No, it is just an indicator to show that I also want to address the general public. Jun 17, 2011 at 11:12
  • 2
    Thanks @Vivi, I planning to release v1.0 soon which will have some nice new features. Jun 17, 2011 at 13:17

3 Answers 3

  • The minimal class has already empty page style, so no page number is printed. There's no page number needed for a standalone graphic.

  • minimal doesn't define macros. There's less than in article which could disturb.

However, usually I would use minimal just for testing or for showing a minimal working example. Though for just displaying a graphic it might be sufficient.

For creating graphics you might miss features which are provided by other base classes. Just some examples, important if you create graphics with text:

  • You cannot use common font size commands such as \small and \large, they are undefined. minimal uses a 10pt font.

  • Obsolete LaTeX 2.09 commands such as \bf and \it are still supported in article, but not in minimal.

  • 2
    I agree. Also I personally don't see minimal as a real class, e.g. because of the missing font size commands and missing length settings. A minimal example which uses the minimal class might show different results as a real class so it should be avoided. IMHO minimal is just a "hello world" class. Jun 17, 2011 at 11:11
  • 2
    @Martin: I disagree. When using tikZ or pstricks without having text, it really makes sense to use the minimal class instead of another one.
    – user2478
    Jun 17, 2011 at 11:15
  • 3
    @Herbert: If you don't have any text, then maybe yes. I normally have some text in my diagram and then I often want to use different sizes. Is there a drawback of article in the no-text case? Jun 17, 2011 at 11:18
  • 4
    @Harald: The absence of the high level font size commands is a big impact on user-friendliness. Of course if you know how to do it then you don't need them. I personally don't know much about the internal font commands, and I'm sure beginners would be totally lost here. I still fail to see the benefit of using minimal in a document with text. Jun 17, 2011 at 13:14
  • 3
    Another (in my opinion big) problem with minimal is that it doesn't assign values to \arraycolsep, \tabcolsep, \arrayrulewidth, \doublerulesep, \fboxsep, \fboxrule so standard environments such as tabular and array won't behave as expected in a class such as article (no separation between columns, no rules, for example). Jun 17, 2011 at 14:18

that is all, what minimal defines:

\pagenumbering{arabic}  % but no page numbers are printed because:
\pagestyle{empty}       % this is actually already in the kernel

Using minimal is simpler than using article for creating a graphics with a tight paper size.


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.