GeneralSeveral warnings in this small code. Why ?

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

I'm experiencing a few "serious" warnings with the following code, and I would like to fix them :

Code: Select all

\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[12pt,oneside]{article}
\usepackage[letterpaper,margin=1in]{geometry}
\usepackage{blindtext}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,every tick/.style={black}}
\usepackage{fancyhdr}

\begin{document}

\fancyhead[L]{left head}
\fancyhead[C]{center head}
\fancyhead[R]{right head}
\pagestyle{fancy}

\section*{First section}
\blindtext
\section*{Second section}
\blindtext
\subsection*{A sub-section}
\blindtext
\end{document}
Here are the typical warnings I get in the console after compilation :
Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing \pgfplotsset{compat=1.12} into your preamble.
on input line 10.

No complaints by nag.

Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 14.49998pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.

Package nag Warning: Command \rm is an old LaTeX 2.09 command.
(nag) Use \rmfamily or \textrm instead on input line 23.
How can I fix these ? And why the \rm nag warning ? There is no \rm in that code ! Is there an obsolete package here ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Several warnings in this small code. Why ?

Post by Stefan Kottwitz »

Hi Cham,

do you get the warnings really with that code? Sounds unlikely to me. Can you post the .log file of compiling this document?

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

Stefan, yes, I do get the weird warnings only with that simple code. I'm wondering why.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Several warnings in this small code. Why ?

Post by Stefan Kottwitz »

I don't get the warnings with that code. Can you post the .log file?

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

Hmm, weird, I don't get any log file for that code. Something is fishy here, I guess.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

In the case of my whole project, I'm getting the same warnings, and here's the log file.
TSWLatexianTemp_003037.log
(70.9 KiB) Downloaded 335 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Several warnings in this small code. Why ?

Post by Johannes_B »

You will get a log file each time LaTeX is running.
Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing \pgfplotsset{compat=1.12} into your preamble.
on input line 10.
pgfplots is running in compatibility mode, meaning some features are disabled. You should consider giving the compat level.

Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 14.49998pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.
You head height is to small. You should sett it to 15pt in the preamble. \setlength{\headheight}{15pt}


Package nag Warning: Command \rm is an old LaTeX 2.09 command.
(nag) Use \rmfamily or \textrm instead on input line 23.
You are using an old version of fancyhdr.

Looking at your log file: You whole installation is outdated. Updating it though might lead to an existing document failing to compile.





In your real document, make the head height at least 18pt. Also, load package lmodern as seen in the thread yesterday.

If you are having double backslashs in your document, i'll be furious.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

Johannes_B wrote: You are using an old version of fancyhdr.

Looking at your log file: You whole installation is outdated. Updating it though might lead to an existing document failing to compile.

If you are having double backslashs in your document, i'll be furious.
I'm using TexLive-2015. Is this really outdated ?

And what about the \\ ? I frequently use things like \\[12pt]. Why is it a mistake ? What should I use instead ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Several warnings in this small code. Why ?

Post by Johannes_B »

Current is TL 2016, with pretest for TL 2017 already started.

If you want to have a blank line in your output, then yes, \\12pt is wrong. You should use proper paragraph breaks.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

Johannes_B wrote:Current is TL 2016, with pretest for TL 2017 already started.

If you want to have a blank line in your output, then yes, \\12pt is wrong. You should use proper paragraph breaks.
Then it surprises me alot that version 2015 is already THAT outdated !

About the \\[12pt], I use it inside tables and equations, to change line (not a blank line). Why is it wrong ? What should I use in equations/tables instead of \\[12pt] ?

For example, I use this in the text :

Code: Select all

\begin{itemize}\renewcommand{\labelitemi}{$\bullet$}
	\item Bla bla bla : \\
	Bla bla bla bla.
	\item Another bla bla : \\
	Some bla bla bla.
\end{itemize}
What should I use instead of \\ ?
Post Reply