LaTeX forum ⇒ Document ClassesNag complains in the paper class. Why ? Topic is solved

Information and discussion about specific document classes and how to create your own document classes.
User avatar
Cham
Posts: 820
Joined: Sat Apr 02, 2011 4:06 pm

Nag complains in the paper class. Why ?

Postby Cham » Wed Nov 29, 2017 10:18 pm

I'm getting a complaint from the nag package with this MWE example, and I wonder why :

  1. \RequirePackage[l2tabu,orthodox]{nag}
  2. \documentclass[11pt,twoside]{paper}
  3. \usepackage[T1]{fontenc}
  4.  
  5. \begin{document}
  6.  
  7. \title{When Newton falled on an apple}
  8. \author{Isaac Newton}
  9.  
  10. \maketitle
  11. \tableofcontents
  12.  
  13. \section{Introduction}
  14.  
  15. Some text
  16.  
  17. \section{Title}
  18.  
  19. Some text.
  20.  
  21. \end{document}


Why this warning :

Package nag Warning: There is no environment ``raggedright''.
(nag) Maybe you want a grouped \raggedright on input line 11.

(/usr/local/texlive/2014/texmf-dist/tex/latex/base/t1cmss.fd) (./TSWLatexianTemp_000038.toc)

Package nag Warning: 1 complaints in total.


So what is wrong with this code ?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8541
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Nov 29, 2017 10:40 pm

That's a 20-25 years old class. It uses the syntax \begin{raggedright} which works but is not good, since it's actually a switch command that's turned into an environment that way. That's what nag means.

It has not been improved since 20 years, while LaTeX and classes were further developed. So I would not use it.

Stefan
Site admin

User avatar
Cham
Posts: 820
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Wed Nov 29, 2017 10:45 pm

Thanks Stefan. It's a non-obvious explanation ! So you suggest to abandon the paper class completely, and use its KOMA version instead (if there is one) ? What would be its "modern" equivalent ?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8541
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Nov 29, 2017 10:57 pm

The CTAN paper site shows what it is. Or what it said 20 years ago what it is. You can see the date. I would not use >20 years old version 1.0 stuff. ;-)

In all cases, CTAN information is worth a look, also a look into the file itself, so one can see what is defined.

paper is based on article, it offers a few macros in addition. So one could use scrartcl instead.

Stefan
Site admin

User avatar
Cham
Posts: 820
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Wed Nov 29, 2017 11:03 pm

Ok, thanks again. It's very clear. So another class to forget ! :o

Well, the class documentation is all in German only ! I don't read Deutsch...

User avatar
Stefan Kottwitz
Site Admin
Posts: 8541
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Nov 29, 2017 11:17 pm

There are translators for a quick basic understanding. ;-) By the way, the lack of an international documentation is another indication that it was not intended for wide usage.

Stefan
Site admin

User avatar
Cham
Posts: 820
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Wed Nov 29, 2017 11:26 pm

I'm also reading from several places that the KOMA-scripts versions were basically intended for the european conventions, especially for germans, while the older "classical" versions are more "american" oriented.

Do you have any arguments against using the book and article classes ?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8541
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Nov 30, 2017 1:21 am

Cham wrote:I'm also reading from several places that the KOMA-scripts versions were basically intended for the european conventions, especially for germans, while the older "classical" versions are more "american" oriented.


That was a reason for the classes many years ago. From this state, which means just a few defaults have been changed (margins, headings), it developed to feature rich classes that are customizable in many, many ways. Still, the "european" thought is remembered.

Cham wrote:Do you have any arguments against using the book and article classes ?


Well, they base on LaTeX2e of 1995 and haven't really been extended since then except occasional bug fixing. That's not bad, but life goes on, also for LaTeX. Any customization has to be programmed or one needs to use and to learn a new package, well - dozens. Customizing is done by re-programming that looks like hacking. Also not bad.

scrguide and scrbook belong to a modern suite of LaTeX classes and packages that have been continuously developed over the last years. Here, customizing is often already done by using the comprehensive capable class interface. There's a lot of possible class options for setting values. For example, changing headings font or spacing is just one line; good luck with article or book for changing section headings.

Stefan
Site admin


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 3 guests