Document ClassesNag complains in the paper class. Why ?

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

Nag complains in the paper class. Why ?

Post by Cham »

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

Code: Select all

\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[11pt,twoside]{paper}
\usepackage[T1]{fontenc}

\begin{document}

\title{When Newton falled on an apple}
\author{Isaac Newton}

\maketitle
\tableofcontents

\section{Introduction}

Some text

\section{Title}

Some text.

\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 ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Nag complains in the paper class. Why ?

Post by Stefan Kottwitz »

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
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Nag complains in the paper class. Why ?

Post by Cham »

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: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Nag complains in the paper class. Why ?

Post by Stefan Kottwitz »

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
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Nag complains in the paper class. Why ?

Post by Cham »

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: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Nag complains in the paper class. Why ?

Post by Stefan Kottwitz »

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
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Nag complains in the paper class. Why ?

Post by Cham »

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: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Nag complains in the paper class. Why ?

Post by Stefan Kottwitz »

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
LaTeX.org admin
Post Reply